I need to add a value to a link, based on the value of a variable. (This is because my site is not allowed to use cookies.) I am passing this variable from one page to another by means of a function:
<script language="JavaScript"><!--
//this function will take a passed URL and add the ?db= segment.
//Do NOT call this for pages going to the correct Basic/Advanced pages.
function intercept(what) {
what.href += '?db=' + db; //adds the correct db scenario (?db=...) to the end of the URL
}
//--></script>
However, there are a few times where I need to add this to the URL itself--instead of basic/basic.htm I want the user to go to basic/basic_"valueofdb".htm.
I can't figure out how to do this! I can write code that will put the correct path into a variable, but cannot return this variable to the link.
ANy advice?
N
<script language="JavaScript"><!--
//this function will take a passed URL and add the ?db= segment.
//Do NOT call this for pages going to the correct Basic/Advanced pages.
function intercept(what) {
what.href += '?db=' + db; //adds the correct db scenario (?db=...) to the end of the URL
}
//--></script>
However, there are a few times where I need to add this to the URL itself--instead of basic/basic.htm I want the user to go to basic/basic_"valueofdb".htm.
I can't figure out how to do this! I can write code that will put the correct path into a variable, but cannot return this variable to the link.
ANy advice?
N