[PLUG] Javascript question.

Bill Ensley bill at bearprinting.com
Mon Sep 26 23:54:34 UTC 2005


Why must you use such a naming convention?

That knowledge would help.

-Bill Ensley
Bear Printing 

-----Original Message-----
From: plug-bounces at lists.pdxlinux.org
[mailto:plug-bounces at lists.pdxlinux.org] On Behalf Of David Mandel
Sent: Monday, September 26, 2005 4:52 PM
To: plug at pdxLinux.org
Subject: [PLUG] Javascript question.


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
   ======================================================================

_______________________________________________
PLUG mailing list
PLUG at lists.pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug




More information about the PLUG mailing list