URLs, parameters and Javascript question

D

Don Dean

Hi everyone.
I'm using FP2003 and don't know much about writing Javascript, but I need to
do something that I think can be easily done with Javascript. All I need is
a good example to start with that I could modify. Just need to know where I
can get the example, that would be Great!

I need to have a visitor, who is on one page of my website, click on a url
link that has a product parameter embeded in it. Then when the product page
comes up, there will be an inline frame that contains information on that
product.

Like this. Visitor clicks on one of the following links:

<body>
<a href="myproducts.htm parameterA">See Info on Product A</a>
<a href="myproducts.htm parameterB">See Info on Product B</a>
<a href="myproducts.htm parameterC">See Info on Product C</a>
(etc.)
</body>

Then on the myproducts.htm page, the following happens:
<head>
If parameter = A, then iframe address = http://distributor.com productA
If parameter = B, then iframe address = http://distributor.com productB
If parameter = C, then iframe address = http://distributor.com productC
(etc.)
Else, if no parameter is given or the browser is not running Javascript,
then default info would show:
iframe address = http://distributor.com productX
</head>

The result in the <body> of the page would be:
<iframe src="http://distributor.com productX"></iframe>

Thanks. Hope I sufficiently explained this.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top