Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Trusted Contributor
Posts: 103
Registered: ‎03-31-2011
My Device: Curve 9330
My Carrier: Verizon

Re: How do I access MySql data from my webwords widget?

yes the button it self works.
New Developer
Posts: 78
Registered: ‎04-17-2011
My Device: BlackBerry Z10 LE
My Carrier: Bell

Re: How do I access MySql data from my webwords widget?

Cross domain security. Basically one domain can't access another.

So your PB or localhost can't access your website because it's not your PB or localhost.

 

In your Server-side code you have to add

header('Access-Control-Allow-Origin: *');

 

This is in PHP.

MaxxWares.com
Current apps:
-BBOS 10-
MaxxTransit - Coming soon
Trusted Contributor
Posts: 103
Registered: ‎03-31-2011
My Device: Curve 9330
My Carrier: Verizon

Re: How do I access MySql data from my webwords widget?

Awsome thanks.

 

Now it works in firefox so that was half the battle.  But still nothing happens in the simulator.  Can the simulator connect to the web?  

 

I have set my Permissions in the config file by adding my domains and cashe features to local the domains. Yet nothing still happens.

 

Do I have to test this on a real phone for it to work?

New Developer
Posts: 78
Registered: ‎04-17-2011
My Device: BlackBerry Z10 LE
My Carrier: Bell

Re: How do I access MySql data from my webwords widget?

On a phone/PB you're technically running localhost with Webworks. So unfortunately you need to give * access.

 

Also, I know PB has web access, not sure about phone simulators.

MaxxWares.com
Current apps:
-BBOS 10-
MaxxTransit - Coming soon
Trusted Contributor
Posts: 103
Registered: ‎03-31-2011
My Device: Curve 9330
My Carrier: Verizon

Re: How do I access MySql data from my webwords widget?

*access....... you mean domain access in the permissions section of the config.xml page? Sorry Im using vs2008
New Developer
Posts: 78
Registered: ‎04-17-2011
My Device: BlackBerry Z10 LE
My Carrier: Bell

Re: How do I access MySql data from my webwords widget?

No, I mean the header.

 

config.xml access I believe is only required when you have BB API code in your AJAX.

 

Not sure what the problem is now honestly.

MaxxWares.com
Current apps:
-BBOS 10-
MaxxTransit - Coming soon
Trusted Contributor
Posts: 103
Registered: ‎03-31-2011
My Device: Curve 9330
My Carrier: Verizon

Re: How do I access MySql data from my webwords widget?

ok this is a new problem from the original thread
Thanks for all your help Starting new thread with correct title.
I learned a lot here.