form submit problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Kuntal Joisher

    form submit problem

    I have a frameset -- which has 3 HTML pages.

    its something like

    -----------------------
    |
    main |
    |
    |
    -----------------------
    | |
    results | track |
    -----------------------

    main frame has a quiz.
    track frame has a hidden form.
    and results frame starts of as blank.

    when user completes a quiz, then some values in track form are set and
    a post is done using --

    if (quizcompleted) {
    ........
    ........
    ........
    track.document. trackingForm.co mmand.value = "complete"
    track.document. trackingForm.se ssion_id.value = aiccSid;
    track.document. trackingForm.su bmit();
    }

    I just want to know that what could be the cases where the HTTP post
    being done when the quiz is complete can fail..as in:

    *Can a User environment stop the Post from happening??
    *Could there be some problems with the way above (frameset +
    javascript submit) which could make the post fail -- I mean something
    browser specific?
    *Could there be some software on the Users machine which might be
    filtering Javascript based submits??

    PS: One thing I am sure about is that -- there is no problem on the
    server side -- because I am observing the Logs and I donot get the
    Posts at all..Also the User is able to do Posts from normal forms
    (where the user needs to put in some data in the form) and is also
    able to login to the site via the login form..but only in case when we
    are trying to post hidden forms via form.submit() it somehow seems to
    fail..

    comments awaited..

    Kuntal.
  • Richard Cornford

    #2
    Re: form submit problem

    "Kuntal Joisher" <kuntalj@rediff mail.com> wrote in message
    news:3e3caef3.0 307091900.11c44 7db@posting.goo gle.com...
    <snip>[color=blue]
    >if (quizcompleted) {
    >.......
    >.......
    >.......
    >track.document .trackingForm.c ommand.value = "complete"
    >track.document .trackingForm.s ession_id.value = aiccSid;
    >track.document .trackingForm.s ubmit();
    >}
    >
    >I just want to know that what could be the cases where the
    >HTTP post being done when the quiz is complete can fail..as in:
    >
    >*Can a User environment stop the Post from happening??[/color]

    Not being connected to the internet at the time would stop a post.
    [color=blue]
    >*Could there be some problems with the way above (frameset +
    >javascript submit) which could make the post fail -- I mean
    >something browser specific?[/color]

    You have not provided sufficient context for the code above to be able
    to tell. It isn't even clear which frame the code provided is executing
    in, let alone how it is being called. If it is called in the context of
    the main frame and the "track" reference has not been explicitly set up
    by you then it may be unresolved.
    [color=blue]
    >*Could there be some software on the Users machine which
    >might be filtering Javascript based submits??[/color]
    <snip>

    Very possible, content inserting/re-writing proxies (often if the form
    of pop-up killers) are quite capable of doing that. I believe
    Proximitron even has a built in filter to eliminate the use of the
    submit function on forms.

    Richard.


    Comment

    • Daniel

      #3
      Re: form submit problem


      "Kuntal Joisher" <kuntalj@rediff mail.com> wrote in message
      news:3e3caef3.0 307091900.11c44 7db@posting.goo gle.com...[color=blue]
      > when user completes a quiz, then some values in track form are set and
      > a post is done using --
      >
      > if (quizcompleted) {
      > .......
      > .......
      > .......
      > track.document. trackingForm.co mmand.value = "complete"
      > track.document. trackingForm.se ssion_id.value = aiccSid;
      > track.document. trackingForm.su bmit();
      > }[/color]

      From where exactly is this function called? If anywhere else but at the
      frameset "top", I'm pretty sure the "track." reference is your culprit. If
      you're referencing from another frame, you should start from the top and
      lose the "document." bit, as in

      top.track.track ingForm.command .value

      - only if the code is executed in the top frame should you ommit the "top."
      bit:

      track.trackingF orm.command.val ue

      Might be sleep depraved here, though (someone please kick me in the nackers
      if I am)...

      Works?

      Daniel




      --
      There are 10 kinds of people: Those who know binary and those who don't.


      Comment

      Working...