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
Developer
cassidyd
Posts: 25
Registered: ‎07-24-2008
My Device: Not Specified
Accepted Solution

blackberry.utils.parseURL problem

[ Edited ]

Hi

 

the following line is breaking in my application.

 

var url = blackberry.utils.parseURL(location.href);

 

location.href is:  local:///MyForm?name=davy%20&?age=26&?id=row3

Am I doing something wrong?

I have the blackberry.utils feature added to my config.xml.

 

I'm using the Visual Studio 2.0 plug in for 2008 running Windows XP SP and simulator 2.13.0.56

 

Thanks

Davy

Please use plain text.
Retired
tneil
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: blackberry.utils.parseURL problem

Hi Davy,

 

What is the error that is being thrown?

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Please use plain text.
Developer
cassidyd
Posts: 25
Registered: ‎07-24-2008
My Device: Not Specified

Re: blackberry.utils.parseURL problem

Hi Tim

 

Sorry - its:

 

Java.lang.IllegalArgumentException: illegal host string: starts with '/'

 

Thanks

 

Davy

Please use plain text.
Retired
tneil
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: blackberry.utils.parseURL problem

Try doing a string replace of the "local:///" with "local://" so that there are only two slashes instead of three before passing it to the parseURL() function.

 

I have a request into the development team to look into this one.  But I think performing the above step should get you going.

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Please use plain text.
Developer
cassidyd
Posts: 25
Registered: ‎07-24-2008
My Device: Not Specified

Re: blackberry.utils.parseURL problem

Thanks Tim - that worked.

 

I've got another one for - this time with gears.  I'll do a new post shortly. :smileyhappy:

 

Davy

Please use plain text.