[development] Passing a client value back to Drupal

jeff at ayendesigns.com jeff at ayendesigns.com
Tue Mar 29 23:20:45 UTC 2011


It probably seems that I am using this list as my first line of defense, 
since it's been fairly inactive between my posts! But honestly, I have 
spent hours and hours and hours in issue queue, IRC (including 
##javascript #jquery), Google, source code, handbook pages...   I feel 
like the guy amongst the trees looking for a forest.

Part of this is documented at http://drupal.org/node/1106358, for 
background...the last 2 or 3 responses being most applicable. Basically, 
I am doing a hook_form_alter and adding a #suffix to the node edit form 
body to provide a ctools link beneath the body box that results in a 
modal form being loaded during the creation of a node, if the link is 
clicked. This works fine, including putting a form in the modal window 
inside a table (yes, tabular data).

The issue is that the contents of the body text area at that point are 
needed by my module in order to send back the proper content in the 
modal window, and I can't seem to get that information back to Drupal. I 
do -have- the data...I get it via js from the CKEDITOR object with a 
getdata() call. I suspect there is some way to then give it to ctools to 
pass back with its ajax call, but cannot find an example. What I've 
tried, in lieu of that, is to add it onto the url that the link is 
calling. I discovered that even though ctools is using a click handler 
to process the link, "onclick" still works, executes first, and does not 
interfere with or prevent ctools from performing its stuff once 
finished. So, I changed the link to have an onclick that simply puts the 
body text into this.sort, making the url be appended by ?body=xxxx    I 
can't seem to discover if that's viable, and if so, what to do at that 
point, as it doesn't appear to be in $_GET, $_POST, or available by 
changing the ctools callback page arguments from array(1) to array(1,2).

Jeff
-- 
/I am a non sequitur. Beware, the contents were packaged where peanuts 
are processed./

Ayen Designs
388 Bullsboro Drive #105 · Newnan, Georgia 30263
404-271-9734
Web:ayendesigns.com <http://ayendesigns.com/>
Blog: theAccidentalCoder.com <http://theaccidentalcoder.com/>
Drupal: j. ayen green <http://drupal.org/user/367108> (367108)
IRQ: j_ayen_green
IM (Yahoo) baalwww    (MSN) baalwww at yahoo.com
Skype: ayendesigns | Facebook: ayendesigns | Twitter: @ayendesigns



Ayen Designs is the computer services division of

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20110329/344951a0/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ayenlogo
Type: image/jpeg
Size: 8316 bytes
Desc: not available
Url : http://lists.drupal.org/pipermail/development/attachments/20110329/344951a0/attachment-0002.jpe 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: acmelogo
Type: image/jpeg
Size: 1462 bytes
Desc: not available
Url : http://lists.drupal.org/pipermail/development/attachments/20110329/344951a0/attachment-0003.jpe 


More information about the development mailing list