Javascript syntax for passing PHP variables

gewateroun

New Member
HELLO EVERYONE :DI am having some diffculties passing php varaibles through javascript.Basically this is the statement:\[code\]new Ajax.Updater( 'result', 'update_request.php?status='+status_change);\[/code\]and I need to pass another variable after status_change, the variable I need to pass is the id of the ticket that is being updated.So I tried this:\[code\]new Ajax.Updater( 'result', 'update_request.php?status='+status_change'&requestid='+request_id);\[/code\]However this gives me an error stated below:\[quote\] Webpage error details Message: Expected ')' Line: 128 Char: 77 Code: 0 URI: http://site_url/dev/time_off_new/main.php\[/quote\]I have tried double quotes, as well as a combination. I do not know why it is giving me such harrassment.I ran the php script that it is attached to, and everything is working fine. After debugging I have narrowed it down to this statement, so everthing else is working fine.Thank you ahead of time.Peace and love!
 
Back
Top