Help Debug...

admin

Administrator
Staff member
I'm pretty sure it's this line, can anyone tell me what I'm doing wrong:

<a href=http://www.webdeveloper.com/forum/archive/index.php/"https://tester.test.com/testPubView01?source=+strSvr+">

Here is the rest of the script, if you need to see it:

<script>
function getNvp(strKey) {
strVal = window.location.search.substr(1);
if(strVal.indexOf(strKey) >= 0)
{
strVal = strVal.substr(strVal.indexOf(strKey) + strKey.length);
// Check for & or +
if(strVal.indexOf("&") >= 0)
{
strVal = strVal.substr(0, strVal.indexOf("&"));
}
else if(strVal.indexOf("+") >= 0)
{
strVal = strVal.substr(0, strVal.indexOf("+"));
}
}
else
{
strVal = "";
}

return strVal;
}

// Get the server name
strSvr = getNvp("source=");

strUrl = "<a href=http://test.com?source="; + strSvr+"><font
color=#cc0000><b>pre-application approval</b></font></a>";
document.write (strUrl)
</script>

Any ideas?
 
Back
Top