HTML, JavaScript And CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingHTML, JavaScript And CSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old December 10th, 2003, 10:29 AM
CashGenerator CashGenerator is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Location: UK
Posts: 8 CashGenerator User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 20 sec
Reputation Power: 0
Question Passing Form values to a popup window

Hi,

I have a form on an asp page with multiple fields and also multiple submission buttons. When I click on submit1 I would like a new window (url1) to open with the form values embedded in the html. Submit2 opens another new window (url2), etc.

I have tried a form, action="samepage.asp" (feeds back on itself) (method=post) with an onclick="javascriptpen popup window" and request.form values on the target page but this doesn't seem to work, any ideas ?

thanks and regards,

Chris


http://www.gener8cash.co.uk

Reply With Quote
  #2  
Old December 12th, 2003, 08:49 AM
fhunth fhunth is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 15 fhunth User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Re: Passing Form values to a popup window

Use session variables

Quote:
Originally posted by CashGenerator
Hi,

I have a form on an asp page with multiple fields and also multiple submission buttons. When I click on submit1 I would like a new window (url1) to open with the form values embedded in the html. Submit2 opens another new window (url2), etc.

I have tried a form, action="samepage.asp" (feeds back on itself) (method=post) with an onclick="javascriptpen popup window" and request.form values on the target page but this doesn't seem to work, any ideas ?

thanks and regards,

Chris


http://www.gener8cash.co.uk

Reply With Quote
  #3  
Old December 12th, 2003, 10:14 AM
CashGenerator CashGenerator is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Location: UK
Posts: 8 CashGenerator User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 20 sec
Reputation Power: 0
Arrow sorted

yes, I had tried this to no avail.

nevertheless I have managed to sort it by using a target=blank and onClick="document.formname.action='targetpage.asp';"

thanks anyway ...

Reply With Quote
  #4  
Old June 25th, 2004, 03:10 PM
Code_007 Code_007 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 3 Code_007 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Great code... it was exactly what I was looking for.

I'm wondering if this code could also be modified so that the new window has no toolbars/menu bars, resizable, scrollbar etc.? Thanks for any help.

Quote:
Originally Posted by CashGenerator
yes, I had tried this to no avail.

nevertheless I have managed to sort it by using a target=blank and onClick="document.formname.action='targetpage.asp';"

thanks anyway ...

Reply With Quote
  #5  
Old June 28th, 2004, 10:26 AM
scrubs scrubs is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 42 scrubs User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
The only way I know of to do this is to do a window.open. You can build a querystring using asp to pass the values from your form.

ie:
window.open(<formname.asp?create your querystring here>,'', 'toolbar=0,menubar=0,resizable=0,scrollbars=0',tru e);

Reply With Quote
  #6  
Old June 29th, 2004, 01:00 AM
Code_007 Code_007 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 3 Code_007 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Unfortunately I don't know much about JavaScript. I just use scripts from here and there to make things work with a bit of modification if I can figure a bit of it out. So anyway I'm not sure how create a query string. Can you help me out with it?

Quote:
Originally Posted by scrubs
The only way I know of to do this is to do a window.open. You can build a querystring using asp to pass the values from your form.

ie:
window.open(<formname.asp?create your querystring here>,'', 'toolbar=0,menubar=0,resizable=0,scrollbars=0',tru e);

Reply With Quote
  #7  
Old June 29th, 2004, 08:32 AM
scrubs scrubs is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 42 scrubs User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Actually, the only way I know to do this is by using javascript.
Here's an example:

<% any initial asp stuff here...%>

<form name=formname target=popup.asp>
<input name=input1>
<input name=input2>
<input name=input3>
<input TYPE="button" VALUE="Press Me"
onclick="
var q1=document.formname.input1.value; //these variable aren't necessary, but make the window.open shorter
var q2=document.formname.input2.value;
var q3=document.formname.input3.value;
window.open('./<your asp age>.asp?arg1='+q1+'&arg2='+q2+'&arg3='+q3, '','toolbar=0,location=0,directories=0,status=0,me nubar=0,scrollbars=0,resizable=0',true);
">

</form>

Reply With Quote
  #8  
Old June 29th, 2004, 05:48 PM
Code_007 Code_007 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 3 Code_007 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks man. I'll give it a shot. Much appreciated.

Quote:
Originally Posted by scrubs
Actually, the only way I know to do this is by using javascript.
Here's an example:

<% any initial asp stuff here...%>

<form name=formname target=popup.asp>
<input name=input1>
<input name=input2>
<input name=input3>
<input TYPE="button" VALUE="Press Me"
onclick="
var q1=document.formname.input1.value; //these variable aren't necessary, but make the window.open shorter
var q2=document.formname.input2.value;
var q3=document.formname.input3.value;
window.open('./<your asp age>.asp?arg1='+q1+'&arg2='+q2+'&arg3='+q3, '','toolbar=0,location=0,directories=0,status=0,me nubar=0,scrollbars=0,resizable=0',true);
">

</form>

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingHTML, JavaScript And CSS Help > Passing Form values to a popup window


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump



 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT