View Complete Thread | FoxWeb Forum Home
Search:
Date:    Msg ID:   
From:    Thread:   
Subject:   
You can do this:
 
var jsnote='<%=(m.notes)%>'
writeText('notes', jsnote, 400, 200, true, false);

...or this:

writeText('notes', '<%=(m.notes)%>', 400, 200, true, false);

 

FoxWeb Support Team
support@foxweb.com email

Sent by Joe Goldsmith on 05/31/2004 11:09:20 AM:
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