I'm displaying a form within an iFrame.
The form is from another site which I don't control.
Once the form is submitted (via the submit button), I would like the user to be taken to the resulting page but don't want them to have to view that resulting page within the iFrame.
Currently, that 2nd page loads within the iFrame too.
How do I have it break out of the iFrame upon submit?
I'm doing all this on a wordpress page.
JH
Related
So basically i want to embed a form from one page(daughter) inside a different page(parent) and when people click the submit button in that form 2 things happen:1. the details are saved to the owner of the page(daughter) 2. the parent page gets redirect to another page.
is that possible?
Is it possible to submit a form from a page to another page that has an iframe ? The page with iframe inside already has a submit form that submits to iframe.
So, I need page A to submit to page B which submits to iframe within.
No, you can do one of two things:
The one that makes the most sense is to submit directly to the URL of the iframe within Page B
You can also include the iframe on page A, and place a target attribute on the form itself to submit to the iframe.
The way you have it set up, with the man in the middle, won't work. Most browsers won't let you automatically submit a form without some sort of user interaction, like a mouse click or keyboard event.
I have a back and next buttons and Iframe in main page.
On pressing next button next pages (which are forms to take input) are displayed in Iframe from server side.
I want to save data of current page in DB and then load 2nd page in Iframe. On clicking again save data of Page2 in DB and then load 3rd page in Iframe.
Similarly if user clicks back button he should get data of previous page.
Please suggest me how it can be achieved.
Thanks
To chane iframe src just use JS
function changeFrm(NewSrc){
document.getElementById('YOUR IFRAME ID').src=NewSrc;
};
And in your button add onClick="ChangeFrm('NEW SOURCE');"
Good luck!
i am using c# aspx , what i'm trying to do is to change a button.visible value from another page.
my page is build from 1 main page and 2 iframes ,the main page uses as a menu, iframe 1 is a login page and iframe 2 is the pages of my site.
on the menu page i have an admin control button which allows me to edit my database , this button visibility is false by default, then , if an administrator is logged in at the login iframe, the button should get visible.
i have tried in so many way to change that button but none worked ,
what i have tried so far:
1) send the button in a session ,recive on other page and change -not working
2) send the whole page and change - not working .
3) make the button public static and change - not working .
i have noticed that even when i change the text on the button on the other page ,on the menu page (the page where the button lays) the button didn't changed it's text.
anothere thing i have noticed is when i press a button on a page , the page is sort of updating (like refreshing but keeps values) , is there a way to make this kind of update manualy?
thanks .
I am assuming from your description that you are trying to change the visibility of the button on the other frame from a post back within the log in frame. The short answer is that this will not work because there is nothing being sent from the server to the client for the other frame.
Your would need to set the visibility of the button in a post back of the page containing the button (which is in the other frame).
It may be better to remove the use of frames and use a master page to provide the log in portion of your page/site as this would allow you to change the visibility of the button in a post back for any page on your site.
For the attempts that you have tried, all three of these should be avoided because the controls are recreated every post back when the page is recreated and will also be disposed every post back in the unload of the page. Since the control and page would be disposed on the first request if you access it on a subsequent call to the server there is no guarantee that the state of the page or control is valid.
For more details on the life cycle of a page, look at the ASP.NET Page Life Cycle Overview:
http://msdn.microsoft.com/en-us/library/ms178472.aspx
I have one static page that have one menu and one updatepanel tag. by selecting menu items i want to load another page into update panel now i use iFrame tag for do this and on menu items click i have change iFrame's src property but it have some major problems
I want to load another page into current page in asp.net ajaxly without using IFrame tag like blogger , getclicky and other popular sites.
you could wrap your page content into user control rather whole new asp.net page itself. Then by selecting menu items you hide and display right user controls.
http://msdn.microsoft.com/en-us/library/fb3w5b53.aspx#Y700