javascript onclick alert not working

Ask questions and get answers here

Moderator: gt

javascript onclick alert not working

Postby chrisrjcox » Tue Mar 09, 2010 7:00 am

Hi,

I'm following the help file and have got to the Attributes page in the Editing a webpage section.

I have created a new <div> within the <div id="content" > and have followed the instructions to create the onclick action with, alert("hello!") , as the value, shown in the help file. However when opening the file in Preview, firefox or safari it does nothing, is there something missing from the instructions?

Thanks Chris :?
thanks, Chris
chrisrjcox
 
Posts: 5
Joined: Fri Mar 05, 2010 8:32 pm
Location: Berkshire, UK

Re: javascript onclick alert not working

Postby Blond » Tue Mar 09, 2010 9:35 am

There is a typo with the syntax I think.
You want
alert('Hello!')
Single quotes within brackets.

If you use the Actions Palette and select simple and alert it will enter the correct format for you. Well worth a look MT has added a load of new features here to allow a lot of effects and they all work via the simple interface.

MT - please amend the typo and am I right in thinking that the simple js actions do not need a .js file. Is it built into browser? Please a little background.
Mac Pro Quad core Intel Xeon 2.66Ghz, 6 GB SDRAM.
Blond
 
Posts: 1001
Joined: Sun Nov 02, 2008 9:44 am
Location: Kent, England

Re: javascript onclick alert not working

Postby chrisrjcox » Tue Mar 09, 2010 6:05 pm

Excellent Blond, I wish we could allocate points to helpful people in this forum...

replaced javascript as you said and "all is good"

MT - Would be great if you can update the help document with this. (but I know its up to me to learn javascript :) )
thanks, Chris
chrisrjcox
 
Posts: 5
Joined: Fri Mar 05, 2010 8:32 pm
Location: Berkshire, UK

Re: javascript onclick alert not working

Postby admin » Wed Mar 10, 2010 7:42 pm

Hi all,

I don't know how this mistake happened, I will rectify it ASAP.

Cheers!

MT
admin
Site Admin
 
Posts: 1356
Joined: Thu Sep 06, 2007 12:37 pm


Return to Flux Solutions

Who is online

Users browsing this forum: No registered users and 2 guests