473,695 Members | 2,737 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Submit with using Frameset

3 New Member
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[1].form1.action = "testBody2.asp" ;
document.frames[1].form1.target = "mainFrame" ;
document.frames[1].form1.submit() ;
}

Below is the code for my bottom frame
<form name="form1" method="post" action="testBod y2.asp">
set no <input name="setNo" type="text" readonly="true" value="4">
name <input name="StudName" type="text">
<input type="submit" name="Submit" value="Submit">
</form>


The code for my top frame is not working. It is not submitting the form.
Jun 19 '06 #1
4 5956
Banfa
9,065 Recognized Expert Moderator Expert
if((min == 1) && ((sec >= 8) && (sec < 9 )))
{
document.frames[1].form1.action = "testBody2.asp" ;
document.frames[1].form1.target = "mainFrame" ;
document.frames[1].form1.submit() ;
}
You are referencing the document in the top frame, the document in the top frame has no frames you need to access the frame document that is the document at the top level something like

Expand|Select|Wrap|Line Numbers
  1. if((min == 1) && ((sec >= 8) && (sec  < 9 ))) 
  2. {      
  3.     window.top.document.frames[1].form1.action = "testBody2.asp";
  4.     window.top.document.frames[1].form1.target = "mainFrame";
  5.     window.top.document.frames[1].form1.submit();
  6. }
(I think)


Also next time please try to post Web Design problems in the web design forum, ta :)
Jun 19 '06 #2
malambing57
3 New Member
I am working with frames and the top frame has a timer.
When time is over, it redirects the bottom frame to another page using the script below.

top.frames[1].document.form1 .action = "test.asp";
top.frames[1].document.form1 .target = "mainFrame" ;
top.frames[1].document.form1 .submit();

test.asp has the following code
myAnswer=reques t.form("answers ")

My problem is this;
Since the submit action was sent by the top frame, and the text box is on the bottom frame, I am getting a null value.
Is there a command where I can specify that the values for the request.form be extracted from the bottom frame.

I would appreciate any help as this had been driving me nuts.
Jul 13 '06 #3
malambing57
3 New Member
I am working with frames and the top frame has a timer.
When time is over, it redirects the bottom frame to another page using the script below.

top.frames[1].document.form1 .action = "test.asp";
top.frames[1].document.form1 .target = "mainFrame" ;
top.frames[1].document.form1 .submit();

test.asp has the following code
myAnswer=reques t.form("answers ")

My problem is this;
Since the submit action was sent by the top frame, and the text box is on the bottom frame, I am getting a null value.
Is there a command where I can specify that the values for the request.form be extracted from the bottom frame.

I would appreciate any help as this had been driving me nuts.
Jul 13 '06 #4
iam_clint
1,208 Recognized Expert Top Contributor
Why not use a hidden text field in the top frame and in the bottom frame do an on change update the top hidden field. i don't completely get what your trying to do post some more code if you would.
Jul 14 '06 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

1
3237
by: Joe | last post by:
In the following code, page1.asp is inside the frame of main.html. When the user click submit button in page1.asp, it will submit the for and open a new window called page2.asp. When the user clicks submit button on page2.asp, I expected to open a new window called page3.asp Unfortunately, it just open page3.asp in the same window as page2.asp, an now page2.asp is gone. However, if I just open page1.asp, and begins from there, it is fine...
2
3985
by: Kuntal Joisher | last post by:
I have a frameset -- which has 3 HTML pages. its something like ----------------------- | main | | | -----------------------
7
9008
by: Scott | last post by:
I need help to modify the code below to pass url variables from a framset. The click to run this will be in the mainFrame. This script works well in a non-frame page. Grabs the current url variables and adds them to my url. <script type="text/javascript"> //<!]> </script>
1
2184
by: rbowie | last post by:
Hi there im tryin to nav to a frame using javascript. I have a frameset within a frameset. I want to be able to navigate from the inner most frameset to an outer frame. So frame i have only managed to nav to a frame within the current framset using the following code:
5
10982
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?
5
2069
by: Michelle Stone | last post by:
Hi everybody I am writing a simple asp.net application using form authentication. I store the list of all users and their passwords in an SQL Server database table. My client recently told me that he wants me to do something through which only one user can login using any given account name. I mean to say, for example, when a user called "abc" is online, another person shouldn't be
3
1740
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 update my objects, before
1
1576
by: MaryA | last post by:
Here is my problem : I have a frameset and in one of the frames i have an aspx page in that page and on click of the save button i am doing some validation using javascript also on the same button i have a vbscript that saves the data entered. What i am facing here is when the data entered is not valid i need the the page keeps the data entered and dont submit But my page is submitting on the whole window Anyone can help me
8
2185
by: BrendanMcPherson | last post by:
Hello, Im trying to make a "Search Many Sites from One Location". Heres my problem: I have a form on my page which allows the user to enter a search term and select which site he would like the results from. (the sites dont allow URL pasting) the sites are library catalogues.
0
8585
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9004
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8864
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8835
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7681
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5842
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4351
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4590
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2285
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.