Hi all,
i have this code:
where "f_url" and "poptitle" are text fields.
It should always output:
but it stops working if the value of "poptitle" field is made of
more than one word,like:
It seems that the space(s) between 2 or more words inside "poptitle" field
affects and breaks the synthax of the code producing stange outputs like:
so it truncates the value to the first word.
I need some help,of course.
Where i am wrong?
Thanks in advance,ralf.
i have this code:
Code:
var popupSrc = document.getElementById("f_url").value;
var popupTitle = document.getElementById("poptitle").value;
html = "<a href=javascript:myPopImage(";
html += "'" + popupSrc + "',";
html += "'" + popupTitle + "'";
html += ")>";
where "f_url" and "poptitle" are text fields.
It should always output:
Code:
<a href=javascript:myPopImage('[URL unfurl="true"]http://www.sampleurl.com/image.jpg','Popuptitle')">[/URL]
but it stops working if the value of "poptitle" field is made of
more than one word,like:
Code:
<a href=javascript:myPopImage('[URL unfurl="true"]http://www.sampleurl.com/image.jpg','My[/URL] Popup Title')">
It seems that the space(s) between 2 or more words inside "poptitle" field
affects and breaks the synthax of the code producing stange outputs like:
Code:
<a href=javascript:myPopImage('[URL unfurl="true"]http://www.sampleurl.com/image.jpg','My)">[/URL]
so it truncates the value to the first word.
I need some help,of course.
Where i am wrong?
Thanks in advance,ralf.