| | |
Showing results of a form in new window
Please support our HTML and CSS advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
Evening all, first post so be nice 
I want to know if it is possible to show the results of a form in a new window. So when you press the submit button on a post or get type of form, how do you get it to show the results in a new page?
I can post code if you want to but i think there is enough to go on.
Thanks and look forward to helping out too...
IK

I want to know if it is possible to show the results of a form in a new window. So when you press the submit button on a post or get type of form, how do you get it to show the results in a new page?
I can post code if you want to but i think there is enough to go on.
Thanks and look forward to helping out too...
IK
•
•
Join Date: Nov 2003
Posts: 207
Reputation:
Solved Threads: 1
Can be done in php, when yuo name the form's field, then you can export that as a $name variable.
Welcome to TTF!
The easiest way is to submit the form to target="_blank" - here's some sample code in HTML/PHP. The PHP code is just so the form doesn't get displayed:
[PHP]<?
if(isset($_POST['something'])) {
echo $_POST['something'];
}
else {
echo '
<form action="'.$_POST['SCRIPT_NAME'].'" method="post" target="_blank" >
Input Something: <input type="text" name="something">
<input type="submit" value="Submit">
</form>';
}
?> [/PHP]
Any questions, just ask.
The easiest way is to submit the form to target="_blank" - here's some sample code in HTML/PHP. The PHP code is just so the form doesn't get displayed:
[PHP]<?
if(isset($_POST['something'])) {
echo $_POST['something'];
}
else {
echo '
<form action="'.$_POST['SCRIPT_NAME'].'" method="post" target="_blank" >
Input Something: <input type="text" name="something">
<input type="submit" value="Submit">
</form>';
}
?> [/PHP]
Any questions, just ask.
Check out my blog at http://www.shinylight.com for more stuff about web dev.
•
•
•
•
Originally Posted by rixius
Can be done in php, when yuo name the form's field, then you can export that as a $name variable.
Check out my blog at http://www.shinylight.com for more stuff about web dev.
•
•
Join Date: Nov 2003
Posts: 207
Reputation:
Solved Threads: 1
HTML and CSS Syntax (Toggle Plain Text)
<form action=page.php method=post> <input type=text name=var> <input type=text name=var2> </form>
You could export the content of that form as $var and $var2.
How does that open up a new window and display the variables submitted? Sorry, not trying to be a dick about it, just not following.
Check out my blog at http://www.shinylight.com for more stuff about web dev.
Greetings.
How about using Javascript alone?
Is it possible to show the results of a form in a new window?
I have seen how things were done using Request.QueryString by decoding the url. But is there other alternative similar to the ASP's Request.Form("element") way? I'm trying to avoid using ASP, because the server doesn't have IIS. Please help.
How about using Javascript alone?
Is it possible to show the results of a form in a new window?
I have seen how things were done using Request.QueryString by decoding the url. But is there other alternative similar to the ASP's Request.Form("element") way? I'm trying to avoid using ASP, because the server doesn't have IIS. Please help.
![]() |
Similar Threads
- Open form in the same window (ASP.NET)
- HELP: created dreamweaver form, but how do i get results from form? (PHP)
Other Threads in the HTML and CSS Forum
- Previous Thread: Writing a coupon on HTML language
- Next Thread: non access to images on web
| Thread Tools | Search this Thread |
appointments asp background backgroundcolor beta browser bug calendar cart cgi code codeinjection corporateidentity css design development displayimageinsteadofflash dreamweaver emailmarketing epilepsy explorer firefox flash form format google griefers hackers hitcounter hover html ide ie7 ie8 iframe image images internet internetexplorer intranet iphone javascript jpeg layout macbook maps marketshare microsoft mozilla multimedia navigationbars news offshoreoutsourcingcompany opacity opera optimization pnginie6 positioning problem scroll seo shopping studio swf swf. textcolor timecolor titletags url urlseparatedwords visual visualization web webdevelopment webform website windows7






