Dynamic url for src= http://www.webdeveloper.com/forum/archi

wxdqz

New Member
Hi all,
I'm having problems generating a url for src=http://www.webdeveloper.com/forum/archive/index.php/"...." in Javascript.
The scenario is, I need to call a page with a variable, parse that
variable to create two variables for a src="...." statement. I cant
get it to work.

I call <!-- m --><a class="postlink" href="http://localhost/brochure.htm?P=1234R4567">http://localhost/brochure.htm?P=1234R4567</a><!-- m --> and brochure.htm
is as below but the call to brochure.cgi does not contain any values.
Agentid and Propref are set correctly but the values do not get passed
to the cgi script.

Any ideas would be gratefully received - I'm at my wits end!

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<head></head>
<body>
<SCRIPT language="javascript"
urlquery=location.href.split("?");
Propref=urlquery[1].split("=");
Agentid=Propref[1].split("R");
Propref=Propref[1];
Agentid=Agentid[0];
src="http://localhost/cgi-bin/r/brochure.cgi?A=" + Agentid + "&P=" + Propref;
>
</script>

<noscript>
You need to enable Javascript to view this page<br>
Click <b>Tools, Internet Options, Security, Custom, Scripting Enable</b>
</noscript>
</body>
</html>
 
Back
Top