steve4king
IS-IT--Management
FYI, I'm a complete newb when it comes to JQuery, and pretty new to LAMP dev in general.. so please.. be gentle haha.
I'm updating a web application built on LAMP using PHP, JS, JQuery, Backbone.js, and Yii.
I have a series of buttons(php widget) which call javascript functions.
Some of these call the JS function directly using an onclick property, some do this using just their id to call a jQuery:
Does the JQuery call expose properties that the direct JS call does not?
Thanks,
-Stephen
I'm updating a web application built on LAMP using PHP, JS, JQuery, Backbone.js, and Yii.
I have a series of buttons(php widget) which call javascript functions.
Some of these call the JS function directly using an onclick property, some do this using just their id to call a jQuery:
Code:
//somefile.php
$this->widget('application.components.buttonGroup.MyButtonGroup', array(
'items' => array(
array(
'type' => "button",
'htmlOptions' => array(
'onClick' => 'javascript:csv();',
)
),
array(
'type' => 'button',
'htmlOptions' => array(
'id' => 'exportPdf',
)
)
),
'htmlOptions' => array()
));
Code:
//somefile.js
$('#runReport').live('click', function () {
"use strict";
//do stuff
});
function csv() {
"use strict";
//do stuff
}
Does the JQuery call expose properties that the direct JS call does not?
Thanks,
-Stephen