VERSUS opening with Submit Buttons

Results 1 to 2 of 2

Thread: VERSUS opening with Submit Buttons

  1. #1
    Vipul Desai Guest

    Default VERSUS opening with Submit Buttons

    I have a question about opening up a window using Javascript and passing parameters between forms. I know that it is a breeze to pass Form level objects between different ASP pages if one uses the Action Parameter with the Form tag. The problem of using this method is that it does not allow a program to disable things like the toolbar and so on. <BR><BR>One way around this is to use the mywindow =<BR>(&#039one.asp&#039, &#039myname&#039, &#039toolbar=no,height=100&#039) method of opening up a new form within Javascript. <BR><BR>The question I have is that I cannot have any access to the Form level variables like text boxes (and so on) when I use this method because I lose this information. <BR><BR>Can someone please suggest a way I could get my applications to both open up a window where I can specify its properties and also have application state.<BR><BR>Thanks,<BR><BR>VIpul<BR>

  2. #2
    Hema S Guest

    Default RE: VERSUS opening with Submit Buttons

    What you&#039ll have to do is to pass the form parameters in your JavaScript function explicitly, by writing a function in the OnClick event of your button. Pass all parameters to this function, make up a string and pass it to a new window. Rough idea of the code (probably requires a few modifications.)<BR><BR>function passparam(){<BR> var x, y;<BR>// build the string<BR> x = "whichpage.asp?"<BR> x = x + "field1=" + document.all.field1.value<BR> x = x + "&field2=" + document.all.field2.value<BR>// call new window<BR> y = newWindow(x, height, width, ..other parameters)<BR> window.close()<BR>}<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts