[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

js_eval vs execScript

John John gouda

5/1/2009 6:58:00 AM

He guys,

I have a problem making any of the following running:

Browser.document.js_eval("alert('boo');");
Browser.document.js_eval("document.getElementById('ctl00_cntMainContent_Txt_Message_RTB').value='testing'");

I made the following script to write some string in tinymce editor

if $BrowserName == "FF" then
Browser.document.js_eval("tinyMCE.execInstanceCommand('ctl00_cntMainContent_Txt_Message_RTB',
'mceSetContent', false, 'Test Mail')");
else
Browser.document.parentWindow.execScript("tinyMCE.execInstanceCommand('ctl00_cntMainContent_Txt_Message_RTB',
'mceSetContent', false, 'Test Mail')")
end


The one for IE working great, but js_eval is not working, even if I use
simpler JS like alert('Hi');

Any advice please?

Really appreciate your help.
Thanks!
--
Posted via http://www.ruby-....

1 Answer

John John gouda

5/8/2009 11:37:00 AM

0

Hey guys,

Please any idea, how to make js_eval works?
I need to show a confirm dialog as a start.
Then I need to execute JS in FF, any replacement for js_eval

Many thanks.
--
Posted via http://www.ruby-....