form submit problem

K

Kuntal Joisher

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.command.value = "complete"
track.document.trackingForm.session_id.value = aiccSid;
track.document.trackingForm.submit();
}

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.
 
R

Richard Cornford

if (quizcompleted) {
.......
.......
.......
track.document.trackingForm.command.value = "complete"
track.document.trackingForm.session_id.value = aiccSid;
track.document.trackingForm.submit();
}

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??

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

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.
*Could there be some software on the Users machine which
might be filtering Javascript based submits??
<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.
 
D

Daniel

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

if (quizcompleted) {
.......
.......
.......
track.document.trackingForm.command.value = "complete"
track.document.trackingForm.session_id.value = aiccSid;
track.document.trackingForm.submit();
}

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.trackingForm.command.value

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

track.trackingForm.command.value

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

Works?

Daniel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,042
Latest member
icassiem

Latest Threads

Top