Click to See Complete Forum and Search --> : Javascript in Velocity


Ptaz
04-29-2004, 04:20 AM
I am trying to use JavaScrpit in velocity. Dose anyone know how I go aabout doing so. I have tried vaious tages like <script> #scriptstart(), etc...but it dosent seem to work. I woul dlike to know if anyone knows how I can go about making Javascripts work in velocit pages.

Phil Karras
04-29-2004, 10:39 AM
Is velocity another browser?

First, the correct script tag is:

<script language="JavaScript" type="text/javascript"> <!--

and close with:

// --> </script>

Assuming that still does not work you may need to turn scripting on for the browser.

Again, if velocity is not a browser I have no idea wht it is or how to "add" JavaScript to it.

Ptaz
04-29-2004, 10:53 AM
its not a browser, but a template. It use scripts that can be run on linux box.

I have tried taht, so I dn't know why it doesnt work. Will have to look harder now.

Thanks for all you help.

Ptaz.

buntine
04-29-2004, 11:44 AM
Velocity is an alternative to JSP for linux users. I have had no real experience in the environment, however.

Is the source embedded into a HTML page like ASP, JSP and PHP? Or must you write the entire page as a script like CGI?

It not the latter, you could simply break the script using the extermination sequence (eg %> in ASP) and write your JavaScript in from there.

Regards,
Andrew Buntine.

Phil Karras
04-29-2004, 11:56 AM
If the template is for Linux, ahh looks like buntine has the info you need.

I was going to say that JavaScript will not work in your page because it is only active in a browser and I didn't think you were using it that way.

But, buntine has the info you need so I'll leave it at that.