Current location: Hot Scripts Forums » Programming Languages » PHP » Passing a PHP variable in Javascript???


Passing a PHP variable in Javascript???

Reply
  #1 (permalink)  
Old 01-04-05, 02:33 PM
todayscoffee todayscoffee is offline
Newbie Coder
 
Join Date: Oct 2004
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Passing a PHP variable in Javascript???

Hi all i'm posting this question both PHP and Javscript forums in hopes that someone will have the solution.

Here's the deal:
I have a drop down style menu that i'm using, that's written in js and i want to use a php variable within it:

Code:
var pmLink10 = new PopMenu('Link','','a','page.php?user=$user','Go to this page');
$user is the variable that i want to pass through it but i'm not sure how or if there a way to declare it as php within the exsisiting js code or should i take another route?

Thanks
__________________
One may say "They're losing their marbles." I would ask, "Who gave them the marbles in the first place?"
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 01-04-05, 02:50 PM
ben.periton ben.periton is offline
Wannabe Coder
 
Join Date: Oct 2004
Posts: 183
Thanks: 0
Thanked 0 Times in 0 Posts
var pmLink10 = new PopMenu('Link','','a','page.php?user=<?=$user?>',' Go to this page');
__________________
Ben Periton
http://ben.periton.co.uk
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 01-04-05, 02:56 PM
todayscoffee todayscoffee is offline
Newbie Coder
 
Join Date: Oct 2004
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Thank you very much. I really appreciate your help. Saluda.
__________________
One may say "They're losing their marbles." I would ask, "Who gave them the marbles in the first place?"
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


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

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Passing a PHP variable in Javascript??? todayscoffee JavaScript 2 01-08-05 10:45 AM
Need Help In PHP Programming for a single code suggestion !! CyberRomeo PHP 1 11-27-04 11:38 AM
javascript and php clashes, need expert help nassau JavaScript 2 11-12-04 08:19 AM
javascript multiple select menu for php? isaacmlee JavaScript 1 10-15-04 10:53 AM
javascript variable passed to JSP workaround! peejay Everything Java 0 08-05-04 01:41 AM


All times are GMT -5. The time now is 07:17 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.