Showing results of a form in new window

Reply

Join Date: Jan 2004
Posts: 10
Reputation: IbnKuldun is an unknown quantity at this point 
Solved Threads: 0
IbnKuldun's Avatar
IbnKuldun IbnKuldun is offline Offline
Newbie Poster

Showing results of a form in new window

 
0
  #1
Jan 6th, 2004
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
Reply With Quote Quick reply to this message  
Join Date: Nov 2003
Posts: 207
Reputation: rixius is an unknown quantity at this point 
Solved Threads: 1
rixius rixius is offline Offline
Posting Whiz in Training

Re: Showing results of a form in new window

 
0
  #2
Jan 6th, 2004
Can be done in php, when yuo name the form's field, then you can export that as a $name variable.
Reply With Quote Quick reply to this message  
Join Date: Feb 2002
Posts: 1,135
Reputation: samaru is just really nice samaru is just really nice samaru is just really nice samaru is just really nice 
Solved Threads: 5
Team Colleague
samaru's Avatar
samaru samaru is offline Offline
a.k.a inscissor

Re: Showing results of a form in new window

 
0
  #3
Jan 7th, 2004
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.
Check out my blog at http://www.shinylight.com for more stuff about web dev.
Reply With Quote Quick reply to this message  
Join Date: Jan 2004
Posts: 10
Reputation: IbnKuldun is an unknown quantity at this point 
Solved Threads: 0
IbnKuldun's Avatar
IbnKuldun IbnKuldun is offline Offline
Newbie Poster

Re: Showing results of a form in new window

 
0
  #4
Jan 7th, 2004
Thanks for the welcome guys and a successful one at that.

I didnt realise you could use the target variable in the form tag.

Thanks!
Reply With Quote Quick reply to this message  
Join Date: Feb 2002
Posts: 1,135
Reputation: samaru is just really nice samaru is just really nice samaru is just really nice samaru is just really nice 
Solved Threads: 5
Team Colleague
samaru's Avatar
samaru samaru is offline Offline
a.k.a inscissor

Re: Showing results of a form in new window

 
0
  #5
Jan 9th, 2004
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.
Hmm? What do you mean? What's the other way to do it? I can't think of any right this minute, so maybe you can clear it up.
Check out my blog at http://www.shinylight.com for more stuff about web dev.
Reply With Quote Quick reply to this message  
Join Date: Nov 2003
Posts: 207
Reputation: rixius is an unknown quantity at this point 
Solved Threads: 1
rixius rixius is offline Offline
Posting Whiz in Training

Re: Showing results of a form in new window

 
0
  #6
Jan 10th, 2004
HTML and CSS Syntax (Toggle Plain Text)
  1. <form action=page.php method=post>
  2. <input type=text name=var>
  3. <input type=text name=var2>
  4. </form>

You could export the content of that form as $var and $var2.
Reply With Quote Quick reply to this message  
Join Date: Feb 2002
Posts: 1,135
Reputation: samaru is just really nice samaru is just really nice samaru is just really nice samaru is just really nice 
Solved Threads: 5
Team Colleague
samaru's Avatar
samaru samaru is offline Offline
a.k.a inscissor

Re: Showing results of a form in new window

 
0
  #7
Jan 11th, 2004
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.
Reply With Quote Quick reply to this message  
Join Date: Jun 2003
Posts: 313
Reputation: red_evolve is on a distinguished road 
Solved Threads: 0
red_evolve's Avatar
red_evolve red_evolve is offline Offline
Posting Whiz

Re: Showing results of a form in new window

 
0
  #8
May 26th, 2004
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.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC