Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest sNews - sNews 1.7 - with its own forums - for discussion and user mods.

Author Topic: Javascript in sNews  (Read 2367 times)

curiousEngine

  • Newbie
  • *
  • Karma: 0
  • Posts: 18
Javascript in sNews
« on: December 26, 2007, 11:04:27 am »

is it possible to include:
<script type="text/javascript">
document.write("Hello World!");
</script>

in an article?

how to get a javascript executed??
Logged

centered

  • Guest
Re: Javascript in sNews
« Reply #1 on: December 26, 2007, 01:03:49 pm »

Just tried that script in an article in the default single user, and yes it does work
Logged

curiousEngine

  • Newbie
  • *
  • Karma: 0
  • Posts: 18
Re: Javascript in sNews
« Reply #2 on: December 27, 2007, 03:34:30 am »

Yes in fact it works in run-time.
BUT NOT IN PREVIEW.

thank you.
Logged

Joost

  • Guest
Re: Javascript in sNews
« Reply #3 on: December 27, 2007, 11:19:22 am »

@curiousEngine

preview is executed by javascript as well.  So if you want to test your script before publishing, than you will have to create a html file or find an editor that can execute your scripts in preview.
Logged