469,271 Members | 1,017 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,271 developers. It's quick & easy.

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 1431
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
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.