Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: Using a variable for hyperlinks


Message #1 by "Doresa Smith" <doresa@h...> on Thu, 12 Oct 2000 16:22:16 +0100
I would like to use a variable for my hyperlinks because we are using two copies one on the development
server and the other on the production server.

<script language="javascript">
var prod 
prod = false
function product(){
	if (prod==false){ 
		server = "http://dspartneragree.asp"
			}
	else{
		server = "https://dspartneragree.asp"
			}		
}
</script>


I use this to set the value of server which works.

<body bgcolor=#000000 text=#ffffff link=#ffff00 vlink=#ffff00 onload="product()" >


This part where I am referring to the the hyperlink by using the variable doesn't work.  Could you help me with my syntax for doing
this or any suggestions on a better way.

<FORM method=post NAME=frmPartnersSignUp action=server>

  Return to Index