pinkshiro
05-23-2005, 12:00 AM
Hey...
I only know very basic JS...and am having a bit of a problem that i hope someone can help me out with. 99% sure its a simple mistake, but not to sure.
I have the following script on my page used to take a string out of the url...for example contact.html&name=mike ....this JS is supposed to take 'mike' out of the url...
<!--script forces url into form above as a text string, and then discards everything except the name-->
<script type="text/javascript">
var locate = window.location
document.staff.member.value = locate
var text = document.staff.member.value
function delineate(str)
{
theleft = str.indexOf("=") + 1
return(str.substring(theleft));
}
</script>
OKay......I want to be able to go to this page without having to send a vale along the url sometimes. When I do this however, IE declares that the page is loaded but with error on page, specifically:
Line 74 (theleft = str.indexOf("=") + 1)
'Undefined' is null or not an object
Since im a JS noob i dont know what this means and what i would have to do to fix it. Can someone please help me out here? would be much appreiciated! Thanks!
BTW, this error doesnt come up when you come to this page via sending a value along the url.
I only know very basic JS...and am having a bit of a problem that i hope someone can help me out with. 99% sure its a simple mistake, but not to sure.
I have the following script on my page used to take a string out of the url...for example contact.html&name=mike ....this JS is supposed to take 'mike' out of the url...
<!--script forces url into form above as a text string, and then discards everything except the name-->
<script type="text/javascript">
var locate = window.location
document.staff.member.value = locate
var text = document.staff.member.value
function delineate(str)
{
theleft = str.indexOf("=") + 1
return(str.substring(theleft));
}
</script>
OKay......I want to be able to go to this page without having to send a vale along the url sometimes. When I do this however, IE declares that the page is loaded but with error on page, specifically:
Line 74 (theleft = str.indexOf("=") + 1)
'Undefined' is null or not an object
Since im a JS noob i dont know what this means and what i would have to do to fix it. Can someone please help me out here? would be much appreiciated! Thanks!
BTW, this error doesnt come up when you come to this page via sending a value along the url.