This is the command line from page 1:
<a href=http://www.webdeveloper.com/forum/archive/index.php/"wow01.htm?divagallery01&01&01&01"></a>
divagallery01 = photo gallery
1st 01 = gallery number
2nd 01 = page number
3rd 01 = used to determine which wrestler name to display
This is code is page 02:
<script>
<!--
var gallerydir = location.search.substr(1,13).split("&");
var gallerynum = location.search.substr(15,2).split("&");
var pagenum = location.search.substr(18,2).split("&");
var wrestlernumber = location.search.substr(21,2).split("&");
//-->
</script>
<script language="JavaScript1.1" src="selectwrestler.js"></script>
This is selectwrestler.js:
// Determine which Wrestler
var selectwrestler = " ";
switch (wrestlernumber)
{
case 01 : selectwrestler = "Stacy Keibler"; break;
case 02 : selectwrestler = "Torrie Wilson"; break;
case 03 : selectwrestler = "Lilian Garcia"; break;
case 04 : selectwrestler = "Trish Stratus"; break;
case 05 : selectwrestler = "Stephanie McMahon"; break;
}
document.title = "'Da Man' Bill 'The Annihilator' Goldberg's -- Diva Gallery: " + selectwrestler + " -- Gallery: " +
gallerynum + " --- " + " Page: " + pagenum;
Here is the problem:
when the command line is passed all the variables are getting picked up in the variable names. When I call selectwrestler.js, based on what wrestlernumber is it is supposed to set selectwrestler to a specific wrestler, but it is blank and nothing is displayed, everything else is displayed correctly. do i need to convert wrestlernumber to an integer, if so how is that done?
thanks....
<a href=http://www.webdeveloper.com/forum/archive/index.php/"wow01.htm?divagallery01&01&01&01"></a>
divagallery01 = photo gallery
1st 01 = gallery number
2nd 01 = page number
3rd 01 = used to determine which wrestler name to display
This is code is page 02:
<script>
<!--
var gallerydir = location.search.substr(1,13).split("&");
var gallerynum = location.search.substr(15,2).split("&");
var pagenum = location.search.substr(18,2).split("&");
var wrestlernumber = location.search.substr(21,2).split("&");
//-->
</script>
<script language="JavaScript1.1" src="selectwrestler.js"></script>
This is selectwrestler.js:
// Determine which Wrestler
var selectwrestler = " ";
switch (wrestlernumber)
{
case 01 : selectwrestler = "Stacy Keibler"; break;
case 02 : selectwrestler = "Torrie Wilson"; break;
case 03 : selectwrestler = "Lilian Garcia"; break;
case 04 : selectwrestler = "Trish Stratus"; break;
case 05 : selectwrestler = "Stephanie McMahon"; break;
}
document.title = "'Da Man' Bill 'The Annihilator' Goldberg's -- Diva Gallery: " + selectwrestler + " -- Gallery: " +
gallerynum + " --- " + " Page: " + pagenum;
Here is the problem:
when the command line is passed all the variables are getting picked up in the variable names. When I call selectwrestler.js, based on what wrestlernumber is it is supposed to set selectwrestler to a specific wrestler, but it is blank and nothing is displayed, everything else is displayed correctly. do i need to convert wrestlernumber to an integer, if so how is that done?
thanks....