473,554 Members | 3,008 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1497
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.FRAMENA ME) {
do_submit_funct ion()
} else {
setTimeout("thi s_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******** ******@TK2MSFTN GP09.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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
29579
by: Scott Castillo | last post by:
Does anybody know how to auto-submit a form in PHP without Javascript? For instance, submit form variables to self, validate the data in PHP on same page, then, if no errors, auto-submit the data via post rather than URL. Could serialize a few fields to URL, but there is a larger comments field that I think needs to be posted instead. ...
0
6254
by: Stephen Witter | last post by:
I have two asp pages. Both have similar purposes. I am trying to get the inline frame in both pages to update (submit) when a user clicks on a drop-down box (I would prefer the change or after update events but couldn't get them to work the way I wanted) This process works for one page but not thte other I am using frontpage. Here is...
2
18304
by: Halldór Ísak Gylfason | last post by:
In my application I have an iframe that is empty (and not visible) initially, however when a user presses a button a form is programmatically submitted and the target is set to the IFrame. I want to detect when the frame has been loaded with the result of the form submit. Of course I have tried some event handlers like onload, onactivate,...
2
2240
by: Colin McKinnon | last post by:
Hi all, I've got two frames, one with a form ('main') and one with some clickable images ('tp'). The clickable images call a function in 'main' (code below) which in turn calls the .submit() or .reset() methods of the form. The submit call does what is expected. But the reset call throws an error in Mozilla (1.2.1) 'widget.reset is not a...
0
1130
by: tony wong | last post by:
i have a page with top frame (html) and bottom frame (asp) the top frame come with choices and then submit value to bottom asp page by submit button how can i do it if i wish the bottom asp to run automatically in specific value when the html is loaded. then the user can change the choices after.
5
10976
by: Scott | last post by:
How can I tell a form to submit itself in the code-behind in vs.net? In other words, in javascript I can do blah.submit() - how do I do this in vs.net code-behind?
3
1737
by: Robin | last post by:
Hi, I have a question: If I have a frameset, frame1 and frame2. On frame2 I have a datagrid, on which I can add/update/delete rows. If I submit that page, I catch these changes in events and update my objects with it. Now do I want a button in frame1, which does save. The problem is that I first want to submit the page in frame2 to...
3
7522
by: Larry | last post by:
I have a page that uses 2 frames. In the upper frame are buttons that add text things to the form text boxes in the lower frame using javascript. The form is then submitted to another page. Is it possible to have a Submit button in the upper frame that will submit the form in the lower frame? Thanks much, Larry
4
5948
by: malambing57 | last post by:
How do I submit using framet set. I want the top frame to submit the form on my bottom frame when time is up. On my top frame, I have the following code; if((min == 1) && ((sec >= 8) && (sec < 9 ))) { document.frames.form1.action = "testBody2.asp"; document.frames.form1.target = "mainFrame"; ...
0
7596
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7519
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7798
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8039
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7887
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5152
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3556
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1130
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
838
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.