martinlangley Posted December 14, 2012 Posted December 14, 2012 Guys Hi hope yr well I'm sure you'll be pleased to know we're making real progress with the ecommerce store, now found at: http://87.113.35.183/catalog/ (Apologies if my ISP changes the IP while I'm not looking!) In tweaking the calender code to remove hourly recording I've come across some rather dense javascript which I'm having trouble fathoming 'cos it seems to use code libraries you may know much more about than me. here's the code: <tr> <td class="main" align="right"><span class="tdbLink"> <button id="add" type="submit"><?php echo IMAGE_BUTTON_INSERT; ?></button></span><script type="text/javascript">$("#add").button({icons:{primary:"ui-icon-plus"}}).addClass("ui-priority-secondary").parent().removeClass("tdbLink");</script> </td> </tr> It seems it depends on a code library jquery.js and the "#add" statement performs a database insertion (mysql) but that's as far as I've been able to get with it. Any chance you could explain what's going on? Cheers Martin
Bob Terveuren Posted December 14, 2012 Posted December 14, 2012 Hi Martin What you are looking at is a bit of jQuery javascript that's not adding to the database - what it's doing is some shenaigans with an element with an id of add - likely swapping out an icon/button type thingy http://api.jquery.com/id-selector/
burt Posted December 14, 2012 Posted December 14, 2012 Nothing to do with insertion to DB. The #add is a .css call. The javascript can also use it to produce a nice looking button.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.