开发者

Passing a Email Address To a 3rd Party Website

We have an internal website which has lots of links to 3rd party websites. One of the major requests is to hav开发者_Python百科e the logged in users email passed to the 3rd Party Site once the link is click and populate the email field i.e. on a login page. We are using IE6 which does not save passwords or saves cookies.

Is there any javascript out there that will find a id on a page and populate it by click on a link. Thanks for any help.


Well, jQuery can do that quite easily:

$('a#special_link_thing').click(function()
{
  $('#other_element').val('foo@bar.com');
});

Whoops, wrong code. You can't request content from an external page unless it is on the same domain as the JS file. You could create a PHP wrapper which accepts a URL and returns it's source code:

<?php echo file_get_contents($_GET['url']); ?>

Now, if you do AJAX, just call wrapper.php?url=http://www.google.com/, and you can do it with JS.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜