1

HELLO EVERYONE :D

I am having some diffculties passing php varaibles through javascript.

Basically this is the statement:

new Ajax.Updater( 'result', 'update_request.php?status='+status_change);

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:

new Ajax.Updater( 'result', 'update_request.php?status='+status_change'&requestid='+request_id);

However this gives me an error stated below:

Webpage error details

Message: Expected ')' Line: 128 Char: 77 Code: 0 URI: http://site_url/dev/time_off_new/main.php

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!

1 Answer 1

2

You are missing a concatenation operator after the variable status_change

Try this

new Ajax.Updater( 'result', 'update_request.php?status='+status_change+'&requestid='+request_id);
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.