TeddyKiller Posted March 27, 2010 Share Posted March 27, 2010 When you submit a form, it loads the page to the form action. Instead I'm wanting it to open it in another tab/window How can I do this? thanks. Quote Link to comment https://forums.phpfreaks.com/topic/196727-submitting-a-form-how-to-get-it-to-open-a-new-windowtab-instead-of-reloading/ Share on other sites More sharing options...
DaiLaughing Posted March 28, 2010 Share Posted March 28, 2010 You do that in HTML or transitional XHTML using the attribute target="_blank" in the A tag: <a href="fred.html" target="_blank"> Some people use _top. Quote Link to comment https://forums.phpfreaks.com/topic/196727-submitting-a-form-how-to-get-it-to-open-a-new-windowtab-instead-of-reloading/#findComment-1032921 Share on other sites More sharing options...
TeddyKiller Posted March 28, 2010 Author Share Posted March 28, 2010 How will that submit a form though? I don't understand. edit: Don't worry, I used _blank in the form tag. It works Quote Link to comment https://forums.phpfreaks.com/topic/196727-submitting-a-form-how-to-get-it-to-open-a-new-windowtab-instead-of-reloading/#findComment-1032969 Share on other sites More sharing options...
DaiLaughing Posted March 28, 2010 Share Posted March 28, 2010 Sorry I didn't read your message properly. I can sort of see it might be possible but I have never done it. Wouldn't there be problems with pop up blockers? If not could you just open a new Window (the PHP page) and send the data in a GET string created by Javascript from the form inputs? Quote Link to comment https://forums.phpfreaks.com/topic/196727-submitting-a-form-how-to-get-it-to-open-a-new-windowtab-instead-of-reloading/#findComment-1033048 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.