On Load Submit is not working in FF ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Soniad
    New Member
    • Jan 2009
    • 66

    On Load Submit is not working in FF ?

    Hi,

    I have ASP page,Say "page1.asp" .
    Ater filling proper information,whe n "page1.asp" is submitted ;it goes to "page2.asp" .
    On This "page2.asp",onl y VBScript Coding is done (DB Related).
    Now,On "Page2.asp" after VBScript coding is done ,I have taken a message into hidden field (that needs to be displayed on "Page1.asp" ) And written script at the End of the page to submit that page back to "Page1.asp" .
    Now the problem is,This works in IE .In IE,the page is submitted back to "Page1.asp" , But Doesn't work in FireFox.
    In FireFox, The VBScript Code is getting Executed;But Stops there only after exceution is done.
    If I write only 'response.Redir ect("Page1.asp" )' OR 'window.locatio n.href="Page1.a sp"'.This works in BOTH.
    But I want to show that message in "Page1.asp",Hen ce I am posting back that "Page2.asp" .

    I dont want to send that message as QueryString.


    Page2.asp Sample :

    Code:
    <% Dim StrDispMsg
    
     'CODE
    
     StrDispMsg = "Test Message"
    %>
    <form name="FrmPage2" method="post"><input type="hidden" name="HidMessage" value="<%=StrDispMsg%>" />
    <script type="text/javascript">
    FrmPage2.action = "Page1.asp";
    FrmPage2.method = "post";
    FrmPage2.submit();
    </script>
    </form>
    Any Suggesstion.

    Regards,

    "D"
  • Soniad
    New Member
    • Jan 2009
    • 66

    #2
    Hi,

    Finally after a long try, this issue has been solved.
    Instead of using Hidden field ,If I put that message in input filed of type "Text" it works. Both in IE And FF.
    Instead Of This line :
    Code:
    <input type="hidden" name="HidMessage" value="<%=StrDispMsg%>" />
    I Wrote This Line:
    Code:
    <input type="Text" name="HidMessage" value="<%=StrDispMsg%>" style="display:none;"/>
    Final Code :
    Code:
    <% Dim StrDispMsg 
      
     'CODE 
      
     StrDispMsg = "Test Message" 
    %> 
    <form name="FrmPage2" method="post">
    <input type="Text" name="HidMessage" value="<%=StrDispMsg%>" style="display:none;"/> 
    <script type="text/javascript"> 
    FrmPage2.action = "Page1.asp"; 
    FrmPage2.method = "post"; 
    FrmPage2.submit(); 
    </script> 
    </form>
    Regards,
    "D"

    Comment

    Working...