SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Nov 2007
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    submit() trouble in iframe - firefox

    Hi all,

    Im new to this forum... any help would be greatly appreciated.

    I have a hidden "in between" page where I dynamically create a form and
    hidden inputs using ASP that should submit to a second page where this data
    will be used.

    The form is automatically submitted using javascript. This code works in IE
    and in Firefox.

    The problem I am facing now is that the series of these same pages I am working with are now being used inside an iframe. Since this change, the javascript submit no longer works in Firefox, but does in IE.

    Please see code below and tell me what I am doing wrong.

    Thanks!

    <html>
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
    <body onload="document.getElementById('answer').submit();">
    <form method=POST name='answer' id='answer' action=pagename.asp'>")
    <input type=hidden name=Section value="1">
    <input type=hidden name=survey value="10">
    <input type=hidden name=resumeAt value='0'>
    <input type=hidden name=Counter value="1">
    </form>
    </body>
    </html>

  2. #2
    SitePoint Wizard
    Join Date
    Nov 2004
    Location
    Nelson BC
    Posts
    2,310
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Missing quote in action attribute of form?

  3. #3
    SitePoint Member
    Join Date
    Nov 2007
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks, actually no, that was a type on my part. I copied the code over but changed the page name and accidentally deleted the '.

  4. #4
    SitePoint Wizard
    Join Date
    Nov 2004
    Location
    Nelson BC
    Posts
    2,310
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is working for me in IE and firefox:

    fr1.html
    Code:
    <html>
    <head></head>
    <body>
    <iframe src="fr2.html"></iframe>
    </body>
    </html>
    fr2.html
    Code:
    <html>
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
    <body onload="document.getElementById('answer').submit();">
    <form method="POST" name="answer" id="answer" action="pagename.asp">
    <input type=hidden name="Section" value="1">
    <input type=hidden name="survey" value="10">
    <input type=hidden name="resumeAt" value="0">
    <input type=hidden name="Counter" value="1">
    </form>
    </body>
    </html>
    At the end of the <form> tag line I removed the erroneous ")

    Could it have been that?


Bookmarks

Posting Permissions

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