Reputation: 673
So,
I have a loop that outputs a bunch of stuff from an SQL database. It also outputs a form with some of those outputs.
that entire loop sequence is displayed through an iframe embedded into one column on my site.
I dont know that this is a proper approach but it seemed to work well.
However, when users click "submit" in the form. The link functions correctly, BUT the page it brings the users to is still displayed within the iframe.
I instead want them to be taken to the new page in full.
Any advice?
I should clarify: the purpose of the iframe was to create a scrollable window/box so that if the outpuot was more lines then my template it wouldnt be an issue. Maybe there is another solution thats simpler.
Upvotes: 0
Views: 110
Reputation: 700372
You don't need an iframe to make a scrollable box. Just specify size for an element and use the overflow
style to make it scrollable.
Example:
.formContainer { width: 300px; height: 500px; overflow: auto; }
Upvotes: 2
Reputation: 4405
I'm not really sure I'd use an IFrame for this simply because it acts on it's own. I'd suggest looking into using AJAX. W3schools has a pretty good article on this if you're not sure where to get started.
Upvotes: 1
Reputation: 97672
In the form specify a target
attribute so it will load in the full window
<form target="_top">
Upvotes: 1