PDA

View Full Version : Passing Parameters


JoeP
08-31-2002, 04:01 PM
Is it possible to pass a parameter from an HTML Hyperlink to the called HTML page.

I have looked at <?VAR></?VAR>, but don't really know if that is the way or not.

TIA

joh6nn
08-31-2002, 10:53 PM
can you give me an example of what you mean? i think i know you want, but i'm not sure.

JoeP
08-31-2002, 11:15 PM
I was building a page for my Signature Links and I originally had it completely in Html. I wanted to pass the option 1 / 2 / 3 / or 4 etc. with the click on the hyperlink in the signature.

I already knew how to do it in ASP and just wondered if I could pass it to an HTML page.

The links in my signature hyperlinks carry the option to an asp page where I use Request("Choice"). I didn't know if <?VAR> tag was what you would use in replace of Request(), or if you could even do it in HTML or Javascript.

joh6nn
08-31-2002, 11:40 PM
html is only formatting, not programming, so you can't do it with only html. with javascript, you could do it, in about the same way. you tack it onto the end of the url, and javascript reads the search string.

<script>
if (window.location.search) {
var choice = window.location.search.slice(1);
if ( choice == 1 ) { /* whatever */ ; }
if ( choice == 2 ) { /* etc */ ; }
}
</script>

if you've already got it with asp, though, then there's no reason to switch to javascript.

JoeP
08-31-2002, 11:48 PM
Thank You!