RSS Forums RSS
Please support our HTML and CSS advertiser: Lunarpages Web Hosting
Views: 17713 | Replies: 7
Reply
Join Date: Jan 2004
Posts: 10
Reputation: IbnKuldun is an unknown quantity at this point 
Rep Power: 5
Solved Threads: 0
IbnKuldun's Avatar
IbnKuldun IbnKuldun is offline Offline
Newbie Poster

Showing results of a form in new window

  #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
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Nov 2003
Location: California
Posts: 203
Reputation: rixius is an unknown quantity at this point 
Rep Power: 6
Solved Threads: 1
rixius rixius is offline Offline
Posting Whiz in Training

Re: Showing results of a form in new window

  #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  
Join Date: Feb 2002
Location: Long Island, NY
Posts: 1,134
Reputation: samaru is just really nice samaru is just really nice samaru is just really nice samaru is just really nice 
Rep Power: 12
Solved Threads: 4
Colleague
samaru's Avatar
samaru samaru is offline Offline
a.k.a inscissor

Re: Showing results of a form in new window

  #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.
_.:: my websites ::._
blog @ www.samaru.net * engi No Jutsu @ www.narutorp.net * portfolio @ shinylight.com
deviantART: inscissor
Reply With Quote  
Join Date: Jan 2004
Posts: 10
Reputation: IbnKuldun is an unknown quantity at this point 
Rep Power: 5
Solved Threads: 0
IbnKuldun's Avatar
IbnKuldun IbnKuldun is offline Offline
Newbie Poster

Re: Showing results of a form in new window

  #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  
Join Date: Feb 2002
Location: Long Island, NY
Posts: 1,134
Reputation: samaru is just really nice samaru is just really nice samaru is just really nice samaru is just really nice 
Rep Power: 12
Solved Threads: 4
Colleague
samaru's Avatar
samaru samaru is offline Offline
a.k.a inscissor

Re: Showing results of a form in new window

  #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.
_.:: my websites ::._
blog @ www.samaru.net * engi No Jutsu @ www.narutorp.net * portfolio @ shinylight.com
deviantART: inscissor
Reply With Quote  
Join Date: Nov 2003
Location: California
Posts: 203
Reputation: rixius is an unknown quantity at this point 
Rep Power: 6
Solved Threads: 1
rixius rixius is offline Offline
Posting Whiz in Training

Re: Showing results of a form in new window

  #6  
Jan 10th, 2004
<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.
Reply With Quote  
Join Date: Feb 2002
Location: Long Island, NY
Posts: 1,134
Reputation: samaru is just really nice samaru is just really nice samaru is just really nice samaru is just really nice 
Rep Power: 12
Solved Threads: 4
Colleague
samaru's Avatar
samaru samaru is offline Offline
a.k.a inscissor

Re: Showing results of a form in new window

  #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.
_.:: my websites ::._
blog @ www.samaru.net * engi No Jutsu @ www.narutorp.net * portfolio @ shinylight.com
deviantART: inscissor
Reply With Quote  
Join Date: Jun 2003
Location: Malaysia
Posts: 313
Reputation: red_evolve is on a distinguished road 
Rep Power: 6
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

  #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  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 12:14 pm.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC