[PLUG] Javascript question.
David Mandel
dmandel at pdxLinux.org
Mon Sep 26 23:51:50 UTC 2005
Does anyone know javascript?
I don't.
I'm using UMN MapServer and have gotten myself in a position where I have
to use javascript to set a parameter in my return URL.
Normally, I do this by using something like:
<script language="JavaScript">
document.main.layer_status_1999.value="PRECIP0";
document.main.submit();
</script>
and then this returns something like:
http://www.DavidMandel.com?stateext=US&size=med&layer_status%5B%5D=copyright...
lots-more- stuff...&layer_status_1999=PRECIP0.
This all works fine!
Unfortunately, in my environment I must use the name:
layer_status%5B1999%5D or layer_status[1999]
or other things don't work.
However, every variation of:
<script language="JavaScript">
document.main.layer_status%5B1999%5D.value="PRECIP0";
document.main.submit();
</script>
that I have tryed BLOWS UP.
It doesn't like these special characters in my name (quoted, escaped, or
not) and it doesn't like me to use a variable in this position.
Does anyone know a way of handling this problem?
My work around is terrible.
Sincerely,
David Mandel
Chief Activist
Portland Linux/Unix Group
560 SE Alexander
Corvallis, Oregon 97333
(541) 737-9153 at work (OSU)
(541) 730-5285 cell
======================================================================
David Mandel http://www.DavidMandel.com
Portland Linux/Unix Group http://pdxLinux.org
LinuxFund http://LinuxFund.org
======================================================================
More information about the PLUG
mailing list