Subj : Re: Executing "Alert('Coucou')" on Rhino Shell ? To : netscape.public.mozilla.jseng From : 751 Date : Tue Apr 19 2005 07:34 am Thanks a lot, it's the reason that i want to know and you explain me very clearly why, i don't know how to tell it in english but " merci beucoup de votre aide, =E7a m' a aid=E9 =E0 avanc=E9 dans mon apprentissage" Martin Honnen wrote: > 751 wrote: > > > But why not can I use the javaScript key word on the Rhino Shell. Are > > there a way to write and execute on the shell Javascript programm with > > words like (Alert, prompt...) > > Have you ever managed to get > Alert('Coucou') > to do anything in a browser but throwing an error that Alert is undefined? > Even in a browser you would need > alert('Coucou') > if you wanted to display an modal dialog with the text. > > But the Rhino shell is no browser, it is a shell to allow to test the > Rhino implementation and to execute JavaScript files written for the > Rhino shell. > > As for alert being a key word in JavaScript, it is not, it is a function > implemented in browser environments that host a JavaScript engine like > Rhino or Spidermonkey. > If you want to test JavaScript to be used with HTML documents loaded in > a browser then use a browser supporting JavaScript, a shell will not > help you. >=20 > --=20 >=20 > Martin Honnen > http://JavaScript.FAQTs.com/ .