JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
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 May 30th, 2000, 02:11 AM
mfkoo mfkoo is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2000
Posts: 65 mfkoo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
Hi, i am trying to get a value(variable setted in javascript) and during server side process, i need to use php the process that value... can i do that...

Reply With Quote
  #2  
Old May 30th, 2000, 08:36 AM
sglane sglane is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2000
Posts: 36 sglane User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
Send a message via ICQ to sglane
I had a hell of a time with the same prob. In the end, I just passed the variable in th e url. You can also use cookies.

------------------
-Gabe
"Save trees, eat beaver."
"y!php3++?"

Reply With Quote
  #3  
Old May 30th, 2000, 01:57 PM
jonherron jonherron is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2000
Posts: 24 jonherron User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Why not make a php function to write that section of your javascript?

<script language="JavaScript">

<?
echo("var myVar = $someVar;");
>?

Reply With Quote
  #4  
Old May 31st, 2000, 01:14 AM
sglane sglane is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2000
Posts: 36 sglane User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
Send a message via ICQ to sglane
The problem relies in the fact that php gets parsed and writes all the hard code <I>then</I> JavaScript takes control on the client side. The only way for this to work would be from more than one page so php can get a value.

Reply With Quote
  #5  
Old May 31st, 2000, 08:24 PM
mfkoo mfkoo is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2000
Posts: 65 mfkoo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
I javaScript, how to pass a variable value to the url like
www.testing.com/my?option1=yes,option2=no,option3=yes.....

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignJavaScript Development > Javascript value to php code...


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 | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway