document.form.submit() does not work after sometime!

Discussion in 'HTML and CSS' started by Curious89, Feb 20, 2010.

  1. Curious89

    Curious89

    Joined:
    Feb 20, 2010
    Messages:
    1
    Likes Received:
    0
    There are 3 buttons on a web page. On clicking each button a same popup window (say window1) opens up. Now there is another button on this popup window (window1), which further opens up to another popup window (say window2). On selecting some value from the 'window2', that value is passed onto the 'window1'. There is a 'Find' link on a 'window1', which calls a javascript function 'clicked()':

    <head>
    <%
    Dim command
    command = Request.Form("hid");
    Response.Write(“Value” & command); -- The value is not printed (Reason found after
    analysis that may be because the form is not submitted
    successfully)
    %>

    function clicked()
    {
    document.form.hid.value='FIND';
    alert("before"); -- This message box appears
    document.form.submit(); -- after a lot of analysis the conclusion is that
    this submit statement stops working (as on the status
    bar 'Opening https:.....File1.asp?form=...' is not
    displayed when 'after' message box appears
    alert("after"); -- This message box appears
    }

    <body.......>
    <% if command = "FIND" then
    Response.Write ("Inside Find"); -- This message is not printed.
    // some functonality

    %>
    <form ....>

    <input type="hidden" name="hid" value="">

    </form>
    </body>

    This full code works fine on my machine. But this code does not work properly when run on the client-side!, although the same server and the same deployed application is being accessed. There is no particular sequence/scenario but for eg.
    When say button1 clicked->window1 opens->window2 is opened->value selected->returned to window1->Clicked on Find-> clicked on Ok->returned on the main page.
    Then repeated the same scenario for say 3rd button.
    (Till now 'Find' link works fine).
    Now repeated the same scenario for 2nd button and here 'after' message is obtained but 'inside Find' is not printed!!
     
    Curious89, Feb 20, 2010
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. vizlab
    Replies:
    3
    Views:
    4,519
    Michael Bar-Sinai
    Oct 17, 2007
  2. Ray
    Replies:
    0
    Views:
    235
  3. Guest
    Replies:
    2
    Views:
    1,859
    Guest
    Oct 25, 2004
  4. Harry
    Replies:
    3
    Views:
    539
    Harry
    Jan 12, 2006
  5. Phillip Wu

    Submit form method does not work

    Phillip Wu, Jul 24, 2003, in forum: Javascript
    Replies:
    0
    Views:
    194
    Phillip Wu
    Jul 24, 2003
  6. Megha Vishwanath
    Replies:
    3
    Views:
    977
    Megha Vishwanath
    Jul 20, 2004
  7. alan_atwood
    Replies:
    2
    Views:
    304
  8. antonyliu2002@yahoo.com

    document.getElementById('myForm').submit() does not work

    antonyliu2002@yahoo.com, Sep 29, 2006, in forum: Javascript
    Replies:
    5
    Views:
    221
Loading...