Event association with Button

I just wanna know , how to associate an event with Button . Like in js , we have onSubmit ,onReset() and onClick() fuctions how can we call a function on a BUTTON event ?
Secondly, then i want my function to open a new window .How can that be done?

you can use onClick() , jQuery -> $(‘button’).click() , $(‘button’).bind(‘click’, … )

I want to do it with PHP .basically i want to call a PHP function inside onClick()=""
function PHPFunc()
{

1…code…
2.Open a new window
}

No experiences with jquery here. :frowning:

you cant call a PHP function using Javascript … only way is you can $.get , $.post to the page with javascript and retrieve info/content from that page using ajax …

Sponsor our Newsletter | Privacy Policy | Terms of Service