SOLVED: using javascript in UDT

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
noborders

SOLVED: using javascript in UDT

Post by noborders »

Hello,

I hope someone can help me with a small chalenge I'm facing. I'm using javascript in UDT. The code is:

echo '
bla bla bla
var WINDOW_HTML = 'Het achterhuis.';
bla bla bla
';

however just before the start and the end of the div tag I need to use the symbol ' . This symbol closes the echo statement and return an error. Could anyone tell me what I need to use to prevent the echo from stopping?

I hope I explain my self well.

Thanks for your help.

Regards,

Robert.
Last edited by noborders on Mon Aug 06, 2007 8:16 am, edited 1 time in total.
noborders

Re: using javascript in UDT

Post by noborders »

found it!

by using:

echo <<< END
blabla
END;
manurevah
Forum Members
Forum Members
Posts: 37
Joined: Fri Aug 03, 2007 2:24 pm

Re: SOLVED: using javascript in UDT

Post by manurevah »

i have the SAME issue and i was given a few solutions among which the "echo <<< END" solution, however i must be missing something crucial because this does not work for me and it is making me so sad...

this is what i put in for starters (the real script is alot longer, hence if i could manage not backslashing..)
:

Code: Select all

echo <<< END
<__script__ src="http://maps.google.com/maps?file=api&key=My_Key" type="text/javascript"></__script>
<__script__ type="text/javascript"> ";
END;
even:

Code: Select all

echo <<< END
blah blah
END;
does not work..
Last edited by manurevah on Mon Aug 06, 2007 10:48 am, edited 1 time in total.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: SOLVED: using javascript in UDT

Post by Dr.CSS »

Have you tried the literal trick...

{literal} your code {/literal}
manurevah
Forum Members
Forum Members
Posts: 37
Joined: Fri Aug 03, 2007 2:24 pm

Re: SOLVED: using javascript in UDT

Post by manurevah »

yes i did, i even retried it just in case..  :  ]
Locked

Return to “CMSMS Core”