justmelat
asked on
How do I concatenate two textbox values into one variable in my php/javascript code?
I have the two fields shown belown; in my javascript, I want the BJ variable to hold both the Q_28 and Q_26 values. I tried to concatenate them, but it doesn't work. Could someone show me how to do this please?
<input id="text8" type="hidden" name="text8" value="<?php echo $_REQUEST['Q_28'];?>">
<input id="text4" type="hidden" name="text4" value="<?php echo $_REQUEST['Q_26'];?>">
var BJ. = document.getElementById('text8').value; //Project Title
var BJ. = document.getElementById('text4').value; //Project type
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
cxr:
perfecto!!! thank you.
perfecto!!! thank you.
var BJ = document.getElementById('t
BJ += ' ' + document.getElementById('t