| Page 1 of 1 | [ 1 post ] |
|
I have a datatable ( scrolling data table ) in which I have a column whose data is a URL, but I have created a formatter that shows it as a "<button>" with a label. "elCell.innerHTML = '<button >Click Here</button >'".
I also have the following function: Code: Y.notesDataTable.subscribe( "buttonClickEvent", function(oArgs){ var elButton = oArgs.target; var oRecord = this.getRecord(elButton); var myData = oRecord.getData(); window.open( myData.ref_url, 'Orig', 'address=yes,toolbar=yes,scrollbars=yes,location=yes,statusbar=yes,menubar=yes,resizable=yes', true ); alert( "got here" ); return true; }); As expected, I get a new window containing the contents of the web page pointed to by myData.ref_url, and I get the alert message now that I have added it for debugging. What I also seem to be getting is a reload of the whole page enclosing the Data Table, which is NOT wanted. I have tried "return false" and "return true" with no effect. The API documentation doesn't say anything about the effect of buttonClickEvent, only that it fires. I am sure that this will look like Javascript 101, but it is unexpected, to me at least, and I would appreciate guidance. Any suggestions? Thanks, Brian |
| Page 1 of 1 | [ 1 post ] |
| You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum |
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info
Powered by phpBB® Forum Software © phpBB Group