Dear All, I'm working in UWA Widgets (Netvibes) and want to include our fancy script.aculo.us effects. In particular, I would like to use the Autocompletion. Because Netvibes has there own Objects/Element Definitions, I have to put prototype+s.a.u in an iframe (please correct me, if there is another possibility). In the end, what I do is this:
var src = ['<html>', '<head>', '<script type="text/javascript" src="lib/ prototype.js"><\/script>', '<script type="text/javascript" src="src/builder.js">< \/script>', '<script type="text/javascript" src="src/effects.js">< \/script>', '<script type="text/javascript" src="src/ controls.js"><\/script>', '<script type="text/javascript" src="src/ dragdrop.js"><\/script>', '<script type="text/javascript" src="src/slider.js">< \/script>', '<script type="text/javascript" src="src/sound.js"><\/ script>', '<script type="text/javascript" src="src/ unittest.js"><\/script>', '</head>', '<body>', '<input id="ac3" type="text"/>', '<div id="ac3update" style="display:none;border:1px solid black;background-color:white;"></div>', '<script type="text/javascript" language="javascript">', 'new Ajax.Autocompleter(window.parent.top.document.getElementById(\'what \'),window.parent.top.document.getElementById(\'whatid\'),\'test.html \');', '<\/script>', '</body>', '</html>'].join(''); var frame = widget.createElement( 'iframe' ); frame.setAttribute( 'frameborder', '0' ); frame.style.width = '0px'; frame.style.height = '0px'; frame.id = "myframe"; widget.body.appendChild( frame ); var win = frame.contentWindow, doc = win.document; doc.open(); doc.write( src ); doc.close(); var timer = setInterval( function() { if( win.load ) { clearInterval( timer ); win.load( widget ); } }, 100 ); Now my coding so far works pretty fine. In fact, it does almost everything: It reads the 'what' id input field, It catches the test.html It places its content in the invisible whatdid- div tag underneath. However, as soon as effects should appear, problems start. When tracking it down, the very first problem appears when calling the function down() - which it suddenly doesn't know anymore. Now my assumption is, that because in the mainframe (that constructs this iframe) there is no real prototype 1.6, it does not know about down(). Question is: How can I tell him, to continue using the information in the frame - like it did for all the other operations before? If you wanna firebug a bit, please look at http://dev.public.jacobs-university.de/live/develop.html for a life demo of my problem. There you will additionally find the frame being displayed and additionally holding the autocompletion within the frame - which works perfectly fine. I'm seriously desperate after 2 days wasted on this and really appreciate any new ideas. many thanks, John --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---