473,396 Members | 2,034 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.

forms and frames

*** post for FREE via your newsreader at post.newsfeed.com ***

hello,

i have a pages that loads 2 frames, the top is a "does this look all
right?" frame with 2 links, yes and no. the bottom is the page the user
is looking at. the top also contains a form with information to be passed
to the next page. i can't figure out how to break out of the frame on a
submit. if that is unclear, here is a bit of code:

frame.html:

....
<FRAMESET ROWS="80,*" FRAMEBORDER="no" BORDER="0" FRAMESPACING="0">
<FRAME NAME="top" SCROLLING="no" NORESIZE SRC="join_2_1.php?<?php
echo $src; ?>" />
<FRAME NAME="main" SCROLLING="auto" SRC="<?php echo $SiteUrl; ?>" />
</FRAMESET>
....

join_2_1.php:

....
<SCRIPT>
function submitForm(formIndex) {
var form = document.forms[0];

if (formIndex == 0) {
form.action = "join3.php";
} else if (formIndex == 1) {
form.action = "join.php";
}
form.submit();
}
</SCRIPT>
....
<TABLE BORDER="0">
<TR>
<TD COLSPAN="2">Does your site look OK without violating our rules?
</TD>
</TR>
<TR>
<TD ALIGN="center">
<A TARGET="_top" HREF="javascript:submitForm(0);">YES</A>
</TD>
<TD ALIGN="center">
<A TARGET="_top" HREF="javascript:submitForm(1);">NO</A>
</TD>
</TR>
</TABLE>
<FORM METHOD="post" ACTION="join3.php">
<INPUT TYPE="hidden" NAME="ref" VALUE="<?php echo $ref; ?>" />
<INPUT TYPE="hidden" NAME="Name" VALUE="<?php echo $Name; ?>" />
<INPUT TYPE="hidden" NAME="Email" VALUE="<?php echo $Email; ?>" />
<INPUT TYPE="hidden" NAME="pass1" VALUE="<?php echo $pass1; ?>" />
<INPUT TYPE="hidden" NAME="pass2" VALUE="<?php echo $pass2; ?>" />
<INPUT TYPE="hidden" NAME="ViewEmail" VALUE="<?php echo $ViewEmail;
?>" />
<INPUT TYPE="hidden" NAME="SiteName" VALUE="<?php echo $SiteName;
?>" />
<INPUT TYPE="hidden" NAME="SiteUrl" VALUE="<?php echo $SiteUrl; ?>" />
<INPUT TYPE="hidden" NAME="SiteLanguage" VALUE="<?php echo
$SiteLanguage; ?>" />
</FORM>
....

when i click a link in the top frame, the next document that loads does
not break out of the frame. any ideas?

andrew
-----= Posted via Newsfeed.Com, Uncensored Usenet News =-----
http://www.newsfeed.com - The #1 Newsgroup Service in the World!
-----== 100,000 Groups! - 19 Servers! - Unlimited Download! =-----

Jul 20 '05 #1
1 3562
You can use the TARGET attibute with a FORM to target the top frame.

Andrew Clark wrote:
*** post for FREE via your newsreader at post.newsfeed.com ***

hello,

i have a pages that loads 2 frames, the top is a "does this look all
right?" frame with 2 links, yes and no. the bottom is the page the user
is looking at. the top also contains a form with information to be passed
to the next page. i can't figure out how to break out of the frame on a
submit. if that is unclear, here is a bit of code:

frame.html:

...
<FRAMESET ROWS="80,*" FRAMEBORDER="no" BORDER="0" FRAMESPACING="0">
<FRAME NAME="top" SCROLLING="no" NORESIZE SRC="join_2_1.php?<?php
echo $src; ?>" />
<FRAME NAME="main" SCROLLING="auto" SRC="<?php echo $SiteUrl; ?>" />
</FRAMESET>
...

join_2_1.php:

...
<SCRIPT>
function submitForm(formIndex) {
var form = document.forms[0];

if (formIndex == 0) {
form.action = "join3.php";
} else if (formIndex == 1) {
form.action = "join.php";
}
form.submit();
}
</SCRIPT>
...
<TABLE BORDER="0">
<TR>
<TD COLSPAN="2">Does your site look OK without violating our rules?
</TD>
</TR>
<TR>
<TD ALIGN="center">
<A TARGET="_top" HREF="javascript:submitForm(0);">YES</A>
</TD>
<TD ALIGN="center">
<A TARGET="_top" HREF="javascript:submitForm(1);">NO</A>
</TD>
</TR>
</TABLE>
<FORM METHOD="post" ACTION="join3.php">
<INPUT TYPE="hidden" NAME="ref" VALUE="<?php echo $ref; ?>" />
<INPUT TYPE="hidden" NAME="Name" VALUE="<?php echo $Name; ?>" />
<INPUT TYPE="hidden" NAME="Email" VALUE="<?php echo $Email; ?>" />
<INPUT TYPE="hidden" NAME="pass1" VALUE="<?php echo $pass1; ?>" />
<INPUT TYPE="hidden" NAME="pass2" VALUE="<?php echo $pass2; ?>" />
<INPUT TYPE="hidden" NAME="ViewEmail" VALUE="<?php echo $ViewEmail;
?>" />
<INPUT TYPE="hidden" NAME="SiteName" VALUE="<?php echo $SiteName;
?>" />
<INPUT TYPE="hidden" NAME="SiteUrl" VALUE="<?php echo $SiteUrl; ?>" />
<INPUT TYPE="hidden" NAME="SiteLanguage" VALUE="<?php echo
$SiteLanguage; ?>" />
</FORM>
...

when i click a link in the top frame, the next document that loads does
not break out of the frame. any ideas?

andrew

-----= Posted via Newsfeed.Com, Uncensored Usenet News =-----
http://www.newsfeed.com - The #1 Newsgroup Service in the World!
-----== 100,000 Groups! - 19 Servers! - Unlimited Download! =-----


Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Billy Jacobs | last post by:
I have a web application which is using Forms Authentication. The main page of the site is a frames page. If I type in the url to the frames page, it loads the login page inside of the main...
1
by: JoeBaker | last post by:
i'm trying to use javascript to change the content of a textbox in a different frame. by clicking on a 'folder' link in 'leftFrame' i want to put the value assigned by that link into the...
3
by: Audrius | last post by:
Hello, I have to iframes within one page. When I triger action in one frame, I need to update the content's of other frame's selection list. How to access second frame's form element from my...
2
by: sushi | last post by:
Hello, I have an web site which uses forms authentication. The application uses frames. When the authentication time out occurs and if we click on any one of the frames, each individual pages...
2
by: Andy Fish | last post by:
Hi, I have a problem using forms based authentication with a frameset. I made sure the containing frameset is an aspx so the first time the user tries to access the application he just gets...
0
by: Lee | last post by:
Hi all ;) Preamble -------- I'm using URL rewriting to enforce a frames policy (yeah, I know frames are 'bad' :) - i.e. if a request comes in for a page which should be nested within a...
8
by: J.S. | last post by:
I was under the impression that frames could be used in Windows forms in earlier version of VB. However, in VB 2005 Express I don't see any such tool/control. Is SplitContainer used for this...
9
by: Yuk Tang | last post by:
I'm trying to create webpage-style frames on a form, and all the get parent size and resize children malarkey is giving me a headache. What I would like to do is define some frames on the parent...
1
by: troytabor | last post by:
I was having an issue at www.logolounge.com where the form in the bottom frame was no longer accessible through javascript in FireFox 1.5.0.8. I found the solution and wanted to share it. The...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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...
0
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,...

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.