[ 3 posts ]

Jason Spight

  • Username: jspight92
  • Joined: Mon Feb 14, 2011 10:30 pm
  • Posts: 16
  • IRC: jspight92
  • Offline
  • Profile

Using formatButton to Call Div Tag for RTE

Post Posted: Mon Aug 08, 2011 5:26 am
+0-
Hi Everyone,

I would like to know if it's possible to call another javascript function using the formatter button code reference.

This is exactly what I need:

1. Call the Div Tag for RTE script like http://developer.yahoo.com/yui/examples ... ditor.html within datatable cell using a button.

2. Pass a id value to RTE script from datatable to retrieve or update field value

I have been trying to use function( elCellLiner, oRecord, oColumn, oData ) not quite sure how to make it work. Thanks for you help!

Todd Smith

YUI Contributor

  • Username: stlsmiths
  • Joined: Thu Nov 05, 2009 10:03 am
  • Posts: 675
  • GitHub: stlsmiths
  • Gists: stlsmiths
  • IRC: t_smith
  • Offline
  • Profile

Re: Using formatButton to Call Div Tag for RTE

Post Posted: Tue Aug 09, 2011 2:39 pm
+0-
Jason,

You can subscribe to the DataTable "buttonClickEvent" to capture a button within the DataTable (i.e. created within a formatter) with one handler. http://developer.yahoo.com/yui/docs/YAHOO.widget.DataTable.html#event_buttonClickEvent.

Use the .target argument that is passed in to determine which Column and Record was clicked, and then knock yourself out with whatever your handler wants to do.

Checkout the posting http://yuilibrary.com/forum/viewtopic.php?f=90&t=7982 which includes an example I posted that shows this.

As for RTE, you are on your own ... or ask for more help when you get to that point.

Todd

Jason Spight

  • Username: jspight92
  • Joined: Mon Feb 14, 2011 10:30 pm
  • Posts: 16
  • IRC: jspight92
  • Offline
  • Profile

Re: Using formatButton to Call Div Tag for RTE

Post Posted: Sun Aug 28, 2011 4:26 am
+0-
Thanks, Todd the example is what I need! I was able to create function to pass an id (from the datatable) to submit the form in a button. To finish I used window.open to pop-up a window from the datatable.
  [ 3 posts ]
Display posts from previous:  Sort by  
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