pass html as string

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

pass html as string

Will
Also, I need to take the "html" field value in jason, and either pass it as a parameter into the client side code, or on the client side, I need to gather the summary and bullets to turn them into a string of html and pass them to the server side.

The html text with line breaks are causing problems. Please suggest a clean way to handle this?
Reply | Threaded
Open this post in threaded view
|

Re: pass html as string

fschmidt
Administrator
Look at sr_saveEditWindow() in ed.html.luan .  Note the use of encodeURIComponent() and using postData for big data.
Reply | Threaded
Open this post in threaded view
|

Re: pass html as string

Will
I can see how to pass data to the server, but how do I pass data from server to client?

For example, I can parse the bullets on the server side, but how do I pass an array to the client side?

Or, I have a chunk of html code on the luan server side, how do I pass the chunk to the client side?

The luan code will be like this:

function calls.workSub()
        ...
   
        local summaryBullets = getHtmlOrArray ()
%>
workSubClientSide(<%=i%>, "<%=jobtitle%>", "<%=company%>", "<%=location%>", "<%=fromYear%>", "<%=fromMonth%>", "<%=toYear%>", "<%=toMonth%>", "<%=summaryBullets%>");
<%
end
Reply | Threaded
Open this post in threaded view
|

Re: pass html as string

fschmidt
Administrator