• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Can't get Javascript to do anything - v5.5 - Syntax Error

Explorer ,
Mar 19, 2012 Mar 19, 2012

Copy link to clipboard

Copied

I know how to write javascript. I created an event on a slide and On Enter, I execute:

<script type="text/javascript">

alert('js doesnt work here');

</script>

That doesn't work. Syntax error. I try without the script tags = Syntax Error. I try without the semicolon =  Syntax Error. I try adding it to the standard.js and calling it from the slide = Syntax Error I try adding it to the <head> in myproject.htm and call from slide = Syntax Error.

<script type="text/javascript">

function test() {

    alert('js doesnt work here');

}

</script>

Why can I not get javascript to do anything at all? What is the correct syntax for the "Script_Window" ? Does it want the <script> tags? Does it want semicolons?

Been working on this for 2 hours trying to get a simple alert to say hi.

Or maybe it doesn't work with on enter/on exit events. I'll try buttons now, while I wait for a kind soul to hold my hand and teach me javascript.

Thanks!

Views

461

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 20, 2012 Mar 20, 2012

Copy link to clipboard

Copied

LATEST

Hello,

I'm only a newbie with JavaScript, but when I put this in the script window in Captivate, it works after publishing and in Preview in Browser mode:

alert("JS is working fine in Captivate");

Sometimes knowing too much is blocking, it seems that Captivate is adding all the other stuff, since you are typing in the Script window for JS.

BTW have a look at Jim Leichliter's blog, he is our JS-wizard:

http://captivatedev.com/

Look at the 'Tuts' part,


Lilybiri

PS you create a function, but are not calling that function or did I read it wrong?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Help resources