hello friends i am having two frames, each frame has a html form which should redirect to other page, but here the problem is when any of the page is redirecting the target page is seen only in that particular frame only....
when any of the frame's form is submitted how to redirect completely into the whole page...
i am using
<frameset cols="40%,60%">
<frame src="pmode.html" frameborder="0">
<frame src="create.html"frameborder="0">
</frameset>
For this purpose we have the target attribute of the form:
<form action="newpage.html" target="_top">
This means: "the target of this form is the top most page, not the current frame".
You can also try... <form action="newpage.html" target="_blank">
if you wish to open page in new tab
Jus put target="_blank" in the button link of the other page (pmode.html or create.html)
Related
I have a problem using in FRAMESET.
Scenario:
I'm using frameset. I have 5 links in my menu, when I click the home page its okay but when I open it in new tab or new window the design is not included.
Is there a way to bundled the design either the user open it using the new window or new tab?
Here's my code for frameset:
<frameset rows="120,*,30" border ="0">
<frame name ="top" src="header.php">
</frame>
<frameset cols="200,*" border ="0">
<frame src="menu.php" name="menu">
<frame src="index.php" name="main" scrolling="yes">
</frame>
</frameset>
<frame name="bottom" src="footer.php">
</frameset>
Here's my code for my menu:
<body bgcolor = "#585858">
<b>User Menu :</b>
<ul>
<li>Home</li>
<li>Playlist</li>
<li>View Weeks</li>
<li>Network</li>
<li>Station & Building</li>
</ul>
</body>
I already tried the _top, _self, _parent, _blank but not one of them I'm looking at.
Advance thank you.
That's by design.
If you want to work around it and force the framesets to be present in new windows, only viable option that comes to my mind is to have a javascript check on top of every child page for the frameset, and if there are none, redirect back to frameset page.
var isFramesetAvailable = (window.top !== window.self);
if (!isFramesetAvailable) {
window.location.href = 'your_frameset_page.html#target_page';
}
and then your frameset page would check for the #target_page url fragment, and if it exists, load that frame.
So i'm submiting form with jquery to ifram like this $('.form').submit() here is my iframe and form html
<form id="upload_image_form" src="#" target="iframeTarget" method="post" enctype="multipart/form-data"></form>
<iframe class="iframe" src="<?=url::base()?>user/upload_image/" name="iframeTarget"></iframe>
So when i load page i get my iframe load right page but when i submit my form iframe for some reason loads the same page i'm on not the user/upload_image why is this happening, maybe my form or iframe is incorrect?
You have to set your form action attribute to user/upload_image.
Does the iframe id need to also be set to "iframeTarget"?
And i think Dmitry is right, you need an action to post back to. Don't src is needed.
Iam a web page that redirects you to the page managersigning.html
<frameset rows="40%,*" noresize>
<frame src="managerhomepage.jsp" name="actionwindow" noresize frameborder="0">
<frame src="" name="resultwindow" frameborder="0">
</frameset>
</html>
Now what ever the links i added in managerhomepage.jsp will be displayed in second frame since i used it as a target.
<h2>MANAGER'S HOME PAGE</h2>
<form>
<%String flag="ok";%>
<a target="resultwindow" href="salesplan.jsp"><img src="images/salesplan.jpg"></a>
<a target="resultwindow" href="managertracking.jsp"><img src="images/tracking.jpg"/></a>
<a target="resultwindow" href=""><img src="images/reports.jpg"></a>
<img src="images/exit.jpg"/>
My problem is when ever exit button is clicked(last link ) it is displayed in the first frame since i didn't specified the target here. If i specified the target it will be displayed in second frame. But i want to display the logoutpage.html in entire screen instead of one of the frames. What to do..?
Use the target="_top" attribute in your link. This will "break" out of the frames.
<a target="_top" href="logoutpage.html"><img src="images/exit.jpg"/></a>
FYI, most designers avoid frames - You can accomplish the same thing with a bit more work but no frames, and your users will thank you for it.
On your logout page link change it to this.
<img src="images/exit.jpg"/>
And you should be set
index.html is :
<iframe src="/changeDataAndBack"></iframe>
but the html file return back is show in the iframe ,
how to show page on the parent of the iframe
thanks
updated:
i changeed to this,but nothing happend :
<iframe src="/_openid/login?continue=/" target="_top"></iframe>
Targets apply to links, not frames.
<a href="..." target="_top">
If you want to redirect, do it server side.
it is ok now ,i add target="_parent" to iframe page :
<form class="openid" method="post" action="{{login_url}}" target="_parent">
i have main html page which have two frames frame1 and frame2. frame1 is showing tree.php page
and i want that when i click on node of tree displayed in tree.php some html or php page should be displayed in frame2. how i can achieve this???
Give frame2 a name
<frameset cols="35%,65%">
<frame src="page1.php">
<frame src="page2.php" name="MainWindow">
</frameset>
And set the target of the linking node to that name
<a href="page3.php" target="MainWindow">