hi, I have a javascript function that takes in a parameter that is given by a php session.
This works well except when the value is from a text area that contains a newline character.
I guess it appears as if I'm passing in a parameter and then the newline indicates I have stopped or something like that. Please advise on how to fix this. I tried using nl2br but it gives a similar error as passing in <br />
is making it think that I forgot to close off the parameter delimiter
addElement('textarea', 'contact_address', 'Address:', '<?=isset($_SESSION['contact_address']) ? $_SESSION['contact_address'] : "" ?>');
I am guessing I need to get rid of the newline character but I'm not sure of the best way to go about this so that the textarea value maintains its original format.