Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 234683

Summary: Browser.execute returns false in RAP but returns true in RCP
Product: [RT] RAP Reporter: Walter Mising name <kwchess>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: ivan
Version: 1.0   
Target Milestone: 1.1.1   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
complete code none

Description Walter Mising name CLA 2008-05-29 14:03:13 EDT
Build ID: 1.1 RC2

Steps To Reproduce:
Javascript cannot be executed in RAP using Browser.execute method.  However the same code seems to work fine in RCP.


More information:
Comment 1 Ivan Furnadjiev CLA 2008-05-30 06:02:04 EDT
Tested with the Controls Demo - BrowserTab. 
In Firefox 2.0.0.14/Safari JavaScript is executed (Browser.execute) with/without page loaded in the browser.
In IE7 it's possible to execute (Browser.execute) JavaScript ONLY if there IS a page loaded in the browser.
Comment 2 Walter Mising name CLA 2008-06-04 02:21:11 EDT
Created attachment 103508 [details]
complete code

Complete source code is provided.
Run the application
  Click => Test => TestCmd
  A Dialog box opens
    when clicking on the OK button, the javascript is called. 
  The alert box is not shown.
Comment 3 Ivan Furnadjiev CLA 2008-06-30 06:59:14 EDT
Some more clarifications:
1. If there is an external URL loaded (http://www.eclipse.org) in the browser, due to security restrictions the script is not executed in ALL browsers (Firefox/Safari/IE).
2. When the text is set, the HTML page with the text is created on the RAP app server. browser.execute is working in FF and Safari. The browser.execute is working on IE if there is a <script></script> tag defined in the text.
3. On initial browser creation there is a empty (<html></html>) page in the browser. The browser.execute is working in FF and Safari. If we change it to (<html><script></script></html>) the browser.execute is working in IE too.
Comment 4 RĂ¼diger Herrmann CLA 2008-07-02 17:22:33 EDT
Fixed in CVS HEAD