View Single Post
  #2 (permalink)  
Old 11-13-2007, 10:54 AM
wige's Avatar
wige wige is offline
Moderator
WebProWorld Moderator
 
Join Date: Jun 2006
Location: United States
Posts: 2,651
wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9
Default Re: AJAX and javascript calling javascript

If the javascript you are calling is a function that returns a value, you should be able to capture the return value the same as you would in a local function call.
HTML Code:
<!-- Include the Javascript containing the target function -->
<script type="text/javascript" src="http://remoteserver/remote.js"></script>
<script type="text/javascript">
   // Set the variable to be passed to the remote function
   var key="x";
   // Call the remote function, and store the return value in another variable
   var value = remoteFunction(key);
</script>
And for those of you that are wondering, yes, to bbb.com, this would be an exploit of a cross site scripting vulnerability. Javascript bad.
__________________
The best way to learn anything, is to question everything.

Last edited by wige; 11-13-2007 at 10:56 AM.
Reply With Quote