equal
deleted
inserted
replaced
|
1 <%@ page import="org.symbian.tools.wrttools.previewer.http.WebAppInterface" %> |
|
2 <% |
|
3 String widget = WebAppInterface.decode(request.getParameter("widget")); |
|
4 String id = request.getParameter("session"); |
|
5 %> |
|
6 <html> |
|
7 <head> |
|
8 <title><%=widget %></title> |
|
9 <% WebAppInterface.connectDebugger(widget, id); %> |
|
10 <script type="text/javascript"> |
|
11 var req; |
|
12 |
|
13 function connect() { |
|
14 req = new XMLHttpRequest(); |
|
15 req.onreadystatechange = testconnection; |
|
16 req.open("GET", "<%=WebAppInterface.getAjaxUri(widget, id) %>", true); |
|
17 req.send(null); |
|
18 } |
|
19 |
|
20 function testconnection() { |
|
21 if (req.readyState == 4) { |
|
22 if (req.status == 200) { |
|
23 window.setTimeout(connect, 200); |
|
24 } else { |
|
25 window.location = '<%=WebAppInterface.getUrl(widget, id) %>'; |
|
26 } |
|
27 } |
|
28 } |
|
29 </script> |
|
30 </head> |
|
31 <body onload="connect()"> |
|
32 Establishing debug connection... |
|
33 </body> |