have the "Onclick" button command perform multiple

Find out why the . goes before the /

Moderator: Paul Tuersley

Post Reply
sgm
Posts: 3
Joined: May 2nd, 2005, 7:01 pm

hey all,
i'm a bit new to scripting so i appologize in advance if this is a dumb question. I am trying to find out how to a button to perform multiple actions when it is clicked. As of right now, if i try and perform more then one function, the last function is the only one that is carried through

thanks
-sgm
davestewart
Posts: 114
Joined: March 10th, 2005, 5:50 am
Location: London, UK
Contact:

Just nest the functions like so:

function fn1(){
alert('fn1')
}

function fn1(){
alert('fn2')
}

btn.onClick=function(){
fn1()
fn2()
}
Post Reply