Date:  05/31/2004 11:09:20 AM Msg ID:  002085
From:  Joe Goldsmith Thread:  002085
Subject:  Converting JS string to var
I have the following javascript that only uses a hard string in the second position:
 
writeText('notes', 'Some Text', 400, 200, true, false);
 
What I need to do is to place a foxpro variable in the second position such as:
 
var jsnote=<%=(m.notes)%>
writeText('notes', jsnote, 400, 200, true, false);
 
I have used, to no avail:
writeText('notes', jsnote, 400, 200, true, false);
writeText('notes', 'jsnote', 400, 200, true, false);
writeText('notes', <%=EVAL(=(m.notes)%>, 400, 200, true, false);
 
And most everything else I can think of. The only thing That works is
writeText('notes', 'Some Text', 400, 200, true, false);
 
How do I put a foxpro variable in a JS call in the second position so that it is properly passed to a JS function please?
 
Joe