Click to See Complete Forum and Search --> : Calling more than one js functions for a single onlclick event??


shanuragu
09-02-2003, 02:46 AM
Hi

Is it possible to call more than one javascript functions for a single onclick event of a submit button/any html elements which support onclick event??
ex.
<script>
function toggleServices(sId)
{}

function checkValues(sId)
{}
</script>

<input type="submit" name="Save" value="Save" onclick="toggleServices(service_id); checkValues(service_id);">

Is the above code valid???

shara

Fang
09-02-2003, 02:50 AM
Like this:
onclick="toggleServices(service_id); checkValues(service_id);"
or
function toggleServices(sId) {
// do something
checkValues(sId)
}

cul8er23
09-02-2003, 02:52 AM
Hi,
just had the same problem yesterday!

Try:
onClick="javascript:function1();function2();"

Cheers
Fab