473,396 Members | 1,799 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Submit with using Frameset

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="testBody2.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 5940
Banfa
9,065 Expert Mod 8TB
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
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=request.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
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=request.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 Expert 1GB
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
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...
2
by: Kuntal Joisher | last post by:
I have a frameset -- which has 3 HTML pages. its something like ----------------------- | main | | | -----------------------
7
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...
1
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...
5
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
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...
3
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...
1
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...
8
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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...
0
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...

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.