Jump to content

frames in html...


overmind

Recommended Posts

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.

Link to comment
Share on other sites

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>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.