02-03-2011 04:48 PM - edited 02-03-2011 04:50 PM
I am having problems with my compiled Webworks application.
The application works fine "as source" in Firefox and as an AIR application using Aptana Studio.
However, when I compile the HTML/Javascript files the app does not compile as expected.
When I use
onclick="window.open('index.html?foo=bar')"it gives "network error" (see picture below), while it's just opening itself with a querystring.
The $functions of Jquery get ignored too for example a piece of code like this:
$(
function(){
loadSelectedFoto();
setDiff();
loadHs();
$( "div.puzzle, p" ).puzzle( memdiv );
}
);
Is this due to Webworks Beta status, or am I doing something that just can't be done this way (before the PB offer
)
Solved! Go to Solution.
02-03-2011 10:26 PM
Are you remotely loading jQuery or packaging it in your WebWorks application. If you are bringing in outside resources into your WebWorks application you will need to white list the domain. This is done in the <access> element in the config.xml file.
02-04-2011 03:56 AM - edited 02-04-2011 03:59 AM
I package it in the application. It's working standalone without internet connection.
With compressed jQuery 1.5 completely pasted in a .js file.
02-04-2011 10:58 AM
I may be wrong.. but I believe that window.open() without specifying a target will assume "_blank", which I am pretty sure is meant to open a new window.
http://www.w3schools.com/jsref/met_win_open.asp
In the browser this "may" open a new tab, but there isn't multiple tab/window support inside a webworks application. This could be the source of the problem
I unfortunately don't knwo what may be going on with the jQuery function
02-04-2011 03:53 PM
function changePic() {
window.location = "index.html?foo=bar";
}
Gives the network error.
location.ref and window.open instead of window.location all give the exact same network error as in the picture of my original posting ![]()
Today I tried using the code of the WebWorks application given in september in the San Fransisco Lab (DEV45: BlackBerry Widget Bootcamp and Code-a-thon).
My Eclipse compiles the sources as it should for the phone, but the Playbook WW compiler does not give the same result.
Network Errors when navigating.
02-05-2011 02:50 PM - edited 02-05-2011 02:51 PM
Ah.. I believe this is a problem I also reported in the beta.. It has since been fixed but has not yet been released.. stay tuned an update is coming soon.
Basically I believe it is the query string parameters on the end of the URL that is causing the issue. For now you will likely have to pass the data through cookies or other means until this bug gets released in the next Beta drop.
This issue also shows itself when making local requests. It also affects local AJAX or populating an iframe with a local URL that has query string parameters.
02-05-2011 03:03 PM
Okidoki I'll just wait for the next beta then, thank you very much for the explanation.
03-19-2011 12:09 PM
Can somebody confirm if this issue is definitely now fixed, and what release the fix was delivered in?
03-19-2011 01:02 PM
03-19-2011 01:03 PM - edited 03-19-2011 04:32 PM
It is fixed in the sdk released at the time the 0.9.4 simulator was unleashed.
WebWorks SDK v1.0.0.23 Beta3
Cheers