SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member
    Join Date
    Mar 2005
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Submitting An Iframe's Form

    First off, before I get flamed for this let me explain that I have googled, I have yahood, and I have searched many forums for this answer. I have tried each an every suggested solution that I have found, and none work.

    Now let me explain my problem. I have page A, page A has iframe B with a page loaded that has a form, in A I have an action that updates the form in B, then tries to submit it. However for some reason the normal way of submitting forms in Javascript will not work.

    I have tried:
    frames["b"].document.formname.submit();
    frames["b"].document.forms[1].submit();
    frames["b"].document.getElementById("formid").submit();
    As well as other variations.

    Thanks for the help.

  2. #2
    SitePoint Wizard
    Join Date
    Nov 2004
    Location
    Nelson BC
    Posts
    2,310
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you have a form element with NAME="submit" doncha. change it

  3. #3
    SitePoint Member
    Join Date
    Mar 2005
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Actually no. Question though, can you submit forms on a different domain name?

  4. #4
    SitePoint Wizard
    Join Date
    Nov 2004
    Location
    Nelson BC
    Posts
    2,310
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Submit forms TO a diff domain? Like action="anotherdomain.meh" ? Yes you can.

    If the iframe is FROM another domain then you wouldn't be able to control it, you'd get a security error.

  5. #5
    SitePoint Member
    Join Date
    Mar 2005
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by jimfraser
    Submit forms TO a diff domain? Like action="anotherdomain.meh" ? Yes you can.

    If the iframe is FROM another domain then you wouldn't be able to control it, you'd get a security error.
    Ah, ok then, that explains it.

    Thanks for the help.


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
  •