|
-
Feb 15th, 2002, 07:03 PM
#1
Thread Starter
Fanatic Member
javascript variable gettin cut short at the '?'
i have the followin code in a html page:
VB Code:
<script>
function countinue()
{
var url = "/cgi-bin/anonymous.pl?get=url=" + ourl.value + "?updatelinks=" + updatelinks.checked + "?popupwindows=" + removepopupads.checked + "?removeads=" + removeads.checked + "?removehiddencharacters=" + removehiddencharacters.checked + "?textcolor=" + textcolor.value;
window.location = url;
}
</script>
but when i call the function it just goes to mysite/cgi-bin/anonymous.pl and then stops at the question mark. how can i make it load the part of the variable that would be after the question mark?
Last edited by flamewavetech; Feb 15th, 2002 at 08:05 PM.
FlameWave Technologies - internet tools
-
Feb 15th, 2002, 10:25 PM
#2
Member
Hi,
I'm a little curious about your format. Why do you have multiple question marks (?) ? The usual practice (afaik) is to separate var/val pairs with an ampersand "&". Also what is 'get='? I'm presuming 'url' goes with 'ourl.value'
In other words, try the following:
var url = "/cgi-bin/anonymous.pl?url=" + ourl.value + "&updatelinks=" + updatelinks.checked + "&popupwindows=" + removepopupads.checked + "&removeads=" + removeads.checked + "&removehiddencharacters=" + removehiddencharacters.checked + "&textcolor=" + textcolor.value;
Another problem spot is the length (I think 256 bytes is the limit, but I can be wrong, so check a manual). If I'm right, you might consider shortening your var names, especially 'removehiddencharacters'
Vinny
Vinny
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|