471,887 Members | 722 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,887 software developers and data experts.

a question about auto submit to a frame

Hi,
There are two frames in an asp page.When a frame loads,I submit a form
to the other frame in onload event.Sometimes the code works fine,but
sometimes it will submit to a new window.
Why does it happen? how to resolve it?

Thanks in advance!

jack
Jul 19 '05 #1
1 1466
simply means that the other framewasn't loaded yet, so it didn't really
'exist'

make sure that 'the other frame' is loaded before you try posting to it...

do something like
if (window.FRAMENAME) {
do_submit_function()
} else {
setTimeout("this_function()", 2000)
}

so if 'the other frame' isn't loaded yet, it'll wait 2 secs and try again...

careful tho, coz it'll keep trying so make sure that 'the other frame' WILL
be there.

cheers and good luck

"jack.lee" <le***@21cn.com> wrote in message
news:O5**************@TK2MSFTNGP09.phx.gbl...
Hi,
There are two frames in an asp page.When a frame loads,I submit a form
to the other frame in onload event.Sometimes the code works fine,but
sometimes it will submit to a new window.
Why does it happen? how to resolve it?

Thanks in advance!

jack

Jul 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Scott Castillo | last post: by
reply views Thread by Stephen Witter | last post: by
2 posts views Thread by Halldór Ísak Gylfason | last post: by
2 posts views Thread by Colin McKinnon | last post: by
reply views Thread by tony wong | last post: by
5 posts views Thread by Scott | last post: by
3 posts views Thread by Larry | last post: by
reply views Thread by YellowAndGreen | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.