I am using (or attempting to use, anyway) an AJAX solution for use in posting client-side information to update database values on my website. I have the AJAX portion working and calling a page to process the database update, but I'm having problems getting the values from the client-side javascript to use in my local AJAX javascript function.
For instance, I run website www.aaa.com, and within my site, there is a call to a javascript at an external website, bbb.com which I use to display certain information within my site.
So, I call bbb.com's javascript as such:
Now, I want to take the return value (an integer ranging from 0-1000) from the above javascript call and place use it in a variable within my local javascript. Can this be done?Code:<script type="text/javascript" src="http://www.bbb.com/jsfunction.js?a=30&key=deadbeef"></script>
Something like:
Any pointers you all can give would be greatly appreciated.Code:<script type="text/javascript"> var key = "<?= $item_key ?>"; var xyz = document.write("<script type='text/javascript' src='http://www.bbb.com/jsfunction.js?a=30&key="'+key+'"><\/script>'); ajaxFunction('update', xyz); </script>
Thanks.
Submit Your Article
Forum Rules

Reply With Quote