overmind Posted June 18, 2008 Share Posted June 18, 2008 hi everyone.. i have created a page that has two frames. each frame calls a separate page namely loginx.php and mainx.php.. <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>PREDICT</title> </head> <frameset rows="90,*"> <frame src="loginx.php"> <frame src="mainx.php"> </frameset> </html> below is the code of loginx.php.. <html> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <form action="admin.php" method="post"> <TABLE> <TR> <TD ALIGN="RIGHT">User:</TD> <TD><INPUT TYPE="TEXT" NAME="USER"></TD> </TR> <TR> <TD ALIGN="RIGHT">Password:</TD> <TD><INPUT TYPE="TEXT" NAME="PASS"></TD> </TR> <TR> <TD></TD> <TD><INPUT TYPE="SUBMIT" VALUE="ADMIN"></TD> </TR> </TABLE> </FORM> </BODY> </HTML> my problem now is that when i click the submit button, the admin.php which is the target of loginx.php is only shown at the frame where loginx.php is located. what i want is that it will be shown in the entire page. can anybody please help me? thanks in advance. Quote Link to comment Share on other sites More sharing options...
xtopolis Posted June 18, 2008 Share Posted June 18, 2008 First, I would say don't use frames unless you have to, or have a good reason (not because you like them), a functionality reason. That way when the page submits it takes the whole browser to the new page. If you use frames still, I recall something about having to set something about setting the target of the frame. Read this here on the w3c site FRAMES <- SCROLL DOWN TO SECTION 16.3 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd"> <HTML> <HEAD> <TITLE>A frameset document</TITLE> </HEAD> <FRAMESET rows="50%,50%"> <FRAME name="fixed" src="init_fixed.html"> <FRAME name="dynamic" src="init_dynamic.html"> </FRAMESET> </HTML> Then, in init_dynamic.html, we link to the frame named "dynamic". <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <HTML> <HEAD> <TITLE>A document with anchors with specific targets</TITLE> </HEAD> <BODY> ...beginning of the document... <P>Now you may advance to <A href="slide2.html" target="dynamic">slide 2.</A> ...more document... <P>You're doing great. Now on to <A href="slide3.html" target="dynamic">slide 3.</A> </BODY> </HTML> Quote Link to comment Share on other sites More sharing options...
lonewolf217 Posted June 18, 2008 Share Posted June 18, 2008 have a read on this http://www.w3.org/TR/html401/types.html#type-frame-target I believe what you need to do is set the target="_parent" attribute in your <form> tag Quote Link to comment Share on other sites More sharing options...
overmind Posted June 19, 2008 Author Share Posted June 19, 2008 have a read on this http://www.w3.org/TR/html401/types.html#type-frame-target I believe what you need to do is set the target="_parent" attribute in your <form> tag thanks lonewolf217.. your solution really solved my problem.. Quote Link to comment Share on other sites More sharing options...
dannyb785 Posted June 23, 2008 Share Posted June 23, 2008 I'll just resay it. DON'T USE FRAMES. EVER. seriously. ever. There's never a beneficial reason to using them. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.