Developer forum

Forum » Templates » DW tag and javascript

DW tag and javascript


Reply
Hey Can i use a dw tag like this @Global:Paragraph.Content(11) with javascript? I'm getting an unterminated string literal error because of the (11). I'm new to javascript so don't know a workaround. I have tried both replace and splitting up the tag. That removes the error but then DW can't read it. Hope somebody can help me :) Best regards

---EDIT---
Nevermind - i just use hidden fields.

Replies

 
Reply
When using tags in javascript you must remember to qualify them as strings by enclosing them in quote signs:

alert("<!--@Global:Paragraph.Content(11)-->");

 

You must be logged in to post in the forum