JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsWeb DesignJavaScript Development

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 Dev Shed Forums Sponsor:
  #1  
Old December 22nd, 2001, 10:24 PM
preemi preemi is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2001
Location: Chicago
Posts: 81 preemi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 12
passing php variables in a javascript OpenWindow script

I am developing a page for a private school in which you can enroll online. After you enroll and the data goes to the database, you receive an email with a link to click on and it tells you to print the page you see. The link was made in the parsing form and sends all the variables back to the users email so when they click the link, all their info is on the signup sheet. However, there are three sheets that need to be printed and I want to improve upon my methods and put in a control panel with javascript. The URL i specify is something like this:

https://web17.omnis.com/exceld/print_page.php?fname=$fname



This control panel then has three form buttons with all the persons info in each form so when they click on one, it will bring the page with their info. The problem is this. (or at least i think it is this) Since the javascript is client side, it executes and the link looks just like above. Then the php executes but it doesnt pass the variables to the script to open a new window. So anyways, I cant pass the needed variables from the link in the users mailbox to the print_page.php page to the control_panel.php page. Any and all help is greatly appreciated. Thanks a lot,
kevin

Reply With Quote
  #2  
Old December 24th, 2001, 04:18 PM
Netbuilder Netbuilder is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2001
Posts: 2 Netbuilder User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Hy,

I don't know if I misunderstood you, but for me, the answer is quite simple.

You get $fname by url,
now you create a jsfunction in the head:

function somefunction(var) {
window.open(); /* whatever you want "var" to change */
}

call the function in the body with:

onClick="somefunction(<? echo $fname; ?>);"

I hope it was helpful.

Regards

Stefan

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignJavaScript Development > passing php variables in a javascript OpenWindow script

Developer Shed Advertisers and Affiliates



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

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


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap