Link to home
Start Free TrialLog in
Avatar of ALaRiva
ALaRivaFlag for United States of America

asked on

Javascript: Change form action of form on Opener

I'm terrible with Javascript, mainly because of the case-sensitivity, however, I'm now doing something that I have only done once or twice, but I can't remember exactly what syntax I used, so I'm not sure if I'm missing something or if I have a case-sensitive issue.

Here's what I have:


      <script language="javascript">
                  
            if EVAL(window.opener.document.frmAdd)
                     {
                  window.opener.frmAdd.action = "AddInstallation.asp?ptype=postback";
                  window.opener.frmAdd.Submit();
                   }
            else {
                  window.opener.frmEdit.action = "EditInstallation.asp?ptype=postback";
                  window.opener.frmEdit.Submit();                        
                          }
      </script>

What I'm trying to do is determine if a specific form exists on the opener (form that opened the popup) and if it exists, then change the action property of it, and submit the form.

Anyone see what I'm missing.

Thanks
-Anthony
ASKER CERTIFIED SOLUTION
Avatar of Zyloch
Zyloch
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ALaRiva

ASKER

Perfect Zyloch!   Thank You.

BTW - I posted a solution to that Flash File and DHTML Menu question you were involved in.  Just in case you don't come across it.

-Anthony
Yeah I saw. What was that wmode thing anyways? I think that's a great solution that you got there :)
Avatar of ALaRiva

ASKER

It's the window mode of the flash file.  If you set it to Opaque it allows other objects (i.e. DHTML Menus) to be displayed above it.  Sort of getting around the Z-Index issue you mentioned.

There is also a way of saving the Flash File with an Opaque setting already defined, but I don't have Flash in front of me so I couldn't give direction on which menus to look at.

-Anthony