Technical support This forum is closed.
Version 1.x > Technical support > Can we use javascript inside transformation of document template? View modes: 
User avatar
Member
Member
astajl - 10/25/2005 6:54:47 PM
   
Can we use javascript inside transformation of document template?
if so, can you give me a very simple example?

All I want to do is to display 5 buttons (or hyperlink) in "SelectedNodeTransformation", when user clicks button1, photo will display, when user clicks button2, price will display, and so on...

I think I should use different "layers" to "store" the photo and price etc. by javascript.

if cannot use javascript, can you suggest a way for me to do?

User avatar
Guest
admin - 10/26/2005 7:05:47 AM
   
Re: Can we use javascript inside transformation of document template?
Hello,

you can certainly use JavaScript in transformations. Here's an example or code you can use in your ASCX transformation:

<span onclick="javascript:alert('The name of this product is <%# DataBinder.Eval(Container, "DataItem.ProductName") %>')"><%# DataBinder.Eval(Container, "DataItem.ProductName") %></span>

Best Regards,