lulu50
asked on
Passing a text to parent window
Hi,
I have a parent page and a child page that I am passing a string from the child page to the parent page.
the problem is when the text has ' my javascript will not work .
Thank you
Lulu
I have a parent page and a child page that I am passing a string from the child page to the parent page.
the problem is when the text has ' my javascript will not work .
on the parent page I have
<textarea name="Headline" id="Headline" cols="8" rows="3" style="vertical-align:top;width:600px;color:#555555; font-size:12px;"></textarea>
on the child page
function SendValue(GetCQTicket,GetHeadLine)
{
window.parent.document.getElementById('CQTicketID').value = GetCQTicket;
window.parent.document.getElementById('Headline').value = GetHeadLine;
window.parent.$('#ViewFindTicketdialog:visible').dialog('close');
}
<SPAN onclick="SendValue('ent00116901','Add '0180 Leave of Absence' to the bed type drop down menu for BH UM cases.');" style="CURSOR: pointer; COLOR: #4a79a5">ent00116901</SPAN>
Note: the headline data has ' that's why my javascript is not working
How can I pass the data correct ?
Thank you
Lulu
ASKER
Tom,
I have no control of what the headline is going to be.
I can't change the data in the headline and I tried the " but it did not work.
onclick="SendValue('#CQtic ketSearchR esult.id#' ,'"'#CQtic ketSearchR esult.Head line#'"'); "
I have no control of what the headline is going to be.
I can't change the data in the headline and I tried the " but it did not work.
onclick="SendValue('#CQtic
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Found a solution to my string
Open in new window
Or you can use double quotes on the outside.Open in new window