06-14-2012 06:36 AM
Question to developers writing applications for BlackBerry in WebWorks. In the application I open my browser using command 'blackberry.invoke'. On the site. Everything would be ok if not the fact that after submitting the form, script automatically redirects me to the mobile site that contains id post which I added.
It's a bit "not nice" way to inform the user that the application added his post. I tried to send the form in the background using AJAX but unfortunately I can't because the form must include parameter "action", because otherwise there is no user authentication and the script does not execute. Immediately emphasize that I don't have the possibility of interference in the page which redirects me to the form because it uses an external API. Maybe someone has an idea how to do it with Ajax, if there is such a solution that will perform the action form the background when you click 'submit'?
Thinking on a solution, I got the idea that maybe there is something like closing the browser automatically when it detects an appropriate content? I know that such a thing is possible in Java, in in WebWorks unfortunately I haven't found anything like that ...
Thanks and best regards!
06-15-2012 12:31 PM
Are you using an actual <form> element to submit an HTTP request? If so that will reload the current page, and the net result may be to
Check out the following page for a code sample: