SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Enthusiast Michael-from-Earth's Avatar
    Join Date
    Apr 2001
    Location
    Springfield, IL
    Posts
    34
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Pop-up form submission

    I'm having a few problems... none are caused by my browser, so they are proving hard to troubleshoot. A user has pointed a couple out to me.

    I have this code as part of a script:

    (I have inserted hard breaks to make the post look better)
    ----------------------------------
    window.open("http://www.site.com/loading.htm","confirmation","screenX=10,screenY
    =10,left=0,top=10,toolbar=0,location=0,status=0,menubar=0,scrollbars
    =1,resizable=0,width=250,height=250");

    document.subForm.submit();
    ----------------------------------

    "subForm" targets "confirmation". The user is getting two windows instead of one. One contains the initial window document and the other contains the form action. Also, she says they are both big... the size (of at least one) should be 250x250. She is running AOL 6 and IE 5.5 on the related computer.

    Perhaps a timeout would help the 2 window situation? Why are the windows big and not 250x250? If you know what's going on please let me in on it.

    This same user has a laptop that runs AOL 4 and IE 4 (she thinks). On that computer the form is submitting to one window, but none of the data is making it to the new window. I am guessing this has to do with the way I have the "form" and "table" tags within the javascript document.write statements. Does anyone know a good web page on this subject? OR What else the problem might be?

    Ok, next issue! I am trying to submit a form using Netscape 4.03. When the submit button calls the related function I receive: "subForm is not defined". Here is the line that is throwing the error:

    ----------------------------------
    eml = subForm.email.value;
    ----------------------------------

    The final problem is regarding the same form. When I hit the submit button in N6... nothing happens.

    Like I said, I am not experiencing any of these errors in my regular browser ( IE 5.01 ). (good browser... want a treat boy? submit the form. GOOD browser!)

    Thanks for any help,
    Michael
    Last edited by Michael-from-Earth; Aug 14, 2001 at 15:36.

  2. #2
    SitePoint Guru Vincent Puglia's Avatar
    Join Date
    Feb 2000
    Location
    where the World once stood
    Posts
    700
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Michael from Earth,

    Since you haven't posted enough code, all of this is conjecture.
    1) Netscape 4: you didn't close a tag -- either the </form>, or a </td>
    2) aol/ie -- you are using a submit button and the document.formname.submit() -- although aol is an IE-cripple, it doesn't seem to operate the same with submissions -- kill the "doc....submit()" Someone at JavascriptCity had a similiar problem
    3) nn6 -- i have no idea -- what does the error message say?

    Vinny
    Where the World Once Stood
    the blades of grass
    cut me still

  3. #3
    You talkin to me? Anarchos's Avatar
    Join Date
    Oct 2000
    Location
    Austin, TX
    Posts
    1,438
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't know about the AOL stuff to get it to work in netscape you'll need to reference forms from the document object: document.subForm.email.value
    ck :: bringing chris to the masses.

  4. #4
    SitePoint Enthusiast Michael-from-Earth's Avatar
    Join Date
    Apr 2001
    Location
    Springfield, IL
    Posts
    34
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Haven't had time to post, but I am back now!

    Originally posted by Anarchos
    I don't know about the AOL stuff to get it to work in netscape you'll need to reference forms from the document object: document.subForm.email.value
    I had that suspicion, but I thought I had read somewhere that the "document" part wasn't necessary. That "document" was the default if left off. Anyway, regardless, it has worked since I changed it. Thanks!
    Originally posted by Vincent Puglia
    Hi Michael from Earth,
    Since you haven't posted enough code, all of this is conjecture.
    I felt my explanations were detailed enough to get some input. The full script is about 250 lines of code and posting it for troubleshooting didn't seem realistic. Anyway, I am posting a bit more code and explanation below relating to the remaining issues if you have any input.
    Originally posted by Vincent Puglia
    1) Netscape 4: you didn't close a tag -- either the </form>, or a </td>
    Actually, it turned out to be what Anarchos said.
    Originally posted by Vincent Puglia
    2) aol/ie -- you are using a submit button and the document.formname.submit() -- although aol is an IE-cripple, it doesn't seem to operate the same with submissions -- kill the "doc....submit()" Someone at JavascriptCity had a similiar problem
    I have to validate the data... can't really do that without that portion , can I?
    Originally posted by Vincent Puglia
    3) nn6 -- i have no idea -- what does the error message say?
    Vinny
    There wasn't an error message... nothing happened at all. I clicked "submit" over and over with no result. It doesn't matter now anyway because when I was hacking at the code to fix some other problems it seems I unintentionally fixed this one.

    Remaining Issues
    User is running AOL 4.0
    1) User is getting 2 pop-up windows instead of one upon form submission.
    The 1st window contains the document specified by "window.open".
    The 2nd window contains the action of the form submitted.
    2) None of the form data is making it to the new window. OR Maybe it is making it to the extra window and not the window containing the form action document.

    Code
    Here is an example of the type of code involved.

    (I have inserted hard breaks to make the post look better)

    function reportProblems()
    {window.open("http://www.site.com/interface/loading.htm","report_window",
    "screenX=10,screenY=10,left=0,top=10,toolbar=0,location=0,status=0,
    menubar=0,scrollbars=1,resizable=0,width=400,height=400");
    document.reportForm.submit();}

    mem_id = "xxxxxx";

    document.write("<a href='javascript:reportProblems()'
    onMouseover='window.status=\"Report Problems\"; return true;'>
    Report Problems<\/a>");

    document.write("<form name='reportForm'
    action='http://www.site.com/interface/report_problem.asp'
    method='post' target='report_window'><input type='hidden'
    name='hostname' value='" + location.hostname + "'><input
    type='hidden' name='browser' value='" + navigator.appName + "'><input
    type='hidden' name='browser_version' value='" + navigator.appVersion
    + "'><input type='hidden' name='browser_codename' value='" +
    navigator.appCodeName + "'><input type='hidden' name='user_agent'
    value='" + navigator.userAgent + "'><input type='hidden'
    name='mem_id' value='" + mem_id + "'><input type='hidden' name='host'
    value='" + location.host + "'><input type='hidden'
    name='page_location' value='" + location.href + "'><\/form>");


    Thanks for any constructive input.

    -Michael
    Last edited by Michael-from-Earth; Aug 28, 2001 at 14:59.

  5. #5
    SitePoint Enthusiast Michael-from-Earth's Avatar
    Join Date
    Apr 2001
    Location
    Springfield, IL
    Posts
    34
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Still dealing with these issues...

    Is there anyone out there who has had similar experiences with AOL and found a solution?

    Regards,
    Michael


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
  •