cfdoubt
06-21-2003, 03:04 PM
Hi,
I have an URL ,say www.abc.d/e.asp?param1=val1 which will return me the following ( i mean to say that when i give this URL in the browser ,it asks me if i want to save a .js file which will have this content below)
document.write('<a href="http://www.xyz.a/index.cgi?param2=val2" target="_new"><img src="http://www.xyz.a/images/img.gif" alt="image"></A>');
I need to get hold of this returned code before it goes to the browser; so that i can extract the value of href,src etc. in my program.
The call is made as :
<script language="javascript"
src="www.abc.d/e.asp?param1=val1">
</script>
This will give the output to the browser and all i can see is the image and the link;over which i have no control
Please advise if there is a better way to call the page and get the data returned into a variable.All this should be in the background ( i mean no windows should pop up and current content should not be affected in any way)
The basic idea is that based on the values of param1, the abc.d site will return me a href and a link to an image which i need to use elsewhere on my site.
Hope i am clear.
Thanks,
<cfdoubt>
PS : this can be easily done using CFHTTP tag in ColdFusion, but it has got some threading issues ; so we are looking for alternate solutions (say javascript).
I have an URL ,say www.abc.d/e.asp?param1=val1 which will return me the following ( i mean to say that when i give this URL in the browser ,it asks me if i want to save a .js file which will have this content below)
document.write('<a href="http://www.xyz.a/index.cgi?param2=val2" target="_new"><img src="http://www.xyz.a/images/img.gif" alt="image"></A>');
I need to get hold of this returned code before it goes to the browser; so that i can extract the value of href,src etc. in my program.
The call is made as :
<script language="javascript"
src="www.abc.d/e.asp?param1=val1">
</script>
This will give the output to the browser and all i can see is the image and the link;over which i have no control
Please advise if there is a better way to call the page and get the data returned into a variable.All this should be in the background ( i mean no windows should pop up and current content should not be affected in any way)
The basic idea is that based on the values of param1, the abc.d site will return me a href and a link to an image which i need to use elsewhere on my site.
Hope i am clear.
Thanks,
<cfdoubt>
PS : this can be easily done using CFHTTP tag in ColdFusion, but it has got some threading issues ; so we are looking for alternate solutions (say javascript).