09-06-2010 08:53 AM
hallo,
i try to develop a small offline-application for blckberrys, which runs in the browser (i use html, javascript and dom).
i have several html-files and you have to click through with buttons
for example:
input.setAttribute("onClick", "window.location ='confirm.html?param1="+usTradeNameString+"¶m2
this works fine on ie and firefox (on pc)without any problem. also on blackberry simulators 6.0 it works perfect (i mount a directory with the sd-card function and open my file in the browser).
but on blackberry simulators 5.xx it does not work which is really bad, because my application has to run on bb9650 for example...
when i click the button there is an error message "invalid adress:file:///SDCard/confirm.html?param1...."
if i delete the parameters, so that the target ist only 'confirm.html' it works without any problem.
why do my parameters cause that problem? and why only on the old simulators? is there any alternative to send parameters?
thank you
timo
09-06-2010 12:26 PM
Hi timo,
Maybe you re having problems cause you re missing the href property in location.
Try with something like this:
input.setAttribute("onClick", "window.location.href ='confirm.html?param1="+usTradeNameString+"¶m2
Hope it helps.
09-06-2010 12:52 PM
you have to tell the BlackBerry where "confirm.html" is. If it is a file in a widget package, then use "local:///confirm.html/ + querystring". If it is a local file on the SDcard then use file:///SDCard/confirm.htm + querystring if it is on a remote server then use the full address....etc etc.
09-07-2010 02:46 AM
Hi,
thank you for your answers.
i have tested, but i didn´t find the solution.
i can use the href and/or the full path without any paramater and it works - but if there is a parameter it does not run on the older 5.x versions of Blackberry-simulators (makes no difference here).
is there any other possibility to transfer parameters?
i just can´t understand what the reason is - its nothing special i mean...
Timo