Foros de discusión

javascript in .vm

thumbnail
sujay paul, modificado hace 12 años.

javascript in .vm

Regular Member Mensajes: 164 Fecha de incorporación: 28/10/11 Mensajes recientes
Hi,

I want to add 3 javascripts on click of 3 icon in my portal-normal.vm. I want to create a seperate .js file .
Is it possible to do this?
Any idea?
Thanks in avvance.
thumbnail
David H Nebinger, modificado hace 12 años.

RE: javascript in .vm

Liferay Legend Mensajes: 14916 Fecha de incorporación: 2/09/06 Mensajes recientes
You don't want to load js on a button click, it should just be there.

In your theme, put the JS pages there and include them in the template.

Done.
thumbnail
sujay paul, modificado hace 12 años.

RE: javascript in .vm

Regular Member Mensajes: 164 Fecha de incorporación: 28/10/11 Mensajes recientes
Thanks for help.

can i add a javascript in main.js?
thumbnail
Mayur Patel, modificado hace 12 años.

RE: javascript in .vm

Expert Mensajes: 358 Fecha de incorporación: 17/11/10 Mensajes recientes
Check this for css and js,
http://www.liferay.com/community/forums/-/message_boards/message/5577832