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
New Contributor
siamkom
Posts: 7
Registered: ‎05-24-2011
My Device: Bold 9700
My Carrier: Developer

problem to use WebWork and redirect to SSL page

Hi all,

   I've a probject WebWork & my index.html is as below

<html>
<head>
<meta name="viewport" id="viewport" content="height=device-height,width=device-width,user-scalable=no" />
<script type="text/javascript" >
function doGoto() {
   var pin = blackberry.identity.PIN; 
   var url = "https://m.myserver.com/myProgram/Login.aspx";
   var qrystr="PINID=";
   window.location = url + "?" + qrystr + pin;}
</script>
</head>

<body onload="doAlert()" >
<h1>Hello World</h1>
</body>
</html>

   The file Login.aspx will check PINID

   if exists in our database

         it will redirect to Login2.apsx?PINID=pinid (pinid come from Login.aspx)

   else

         it will go to Login1.aspx  (for user input User name & password).

 

   the problem is it always go to Login1.aspx although I input the correctly Pin Id that existing in my system.

   I try to opened BlackBerry Browser, it works fine, but if I opened from WebWork Icon in my BB, it doesn't work.

   Does anyone have the problem like me? How do you fix it?

Regards,

siamkom

Please use plain text.
Developer
SumiGhosh
Posts: 435
Registered: ‎09-20-2011
My Device: Z10 LE, Playbook, DevAlpha C, 9900, 9380
My Carrier: Vodafone

Re: problem to use WebWork and redirect to SSL page

hi...

      Most probably the error might be in your javascript code, where you comparing the pin with the database.

Please use plain text.
New Contributor
siamkom
Posts: 7
Registered: ‎05-24-2011
My Device: Bold 9700
My Carrier: Developer

Re: problem to use WebWork and redirect to SSL page

Hi,

   I think my javascript work ok, It alert my PIN value 21a3s203 and my data in the table of MSSQL is save 21A3S203.
but don't worry my program (login.aspx) are also force it to the small letter already.
   one more thing, there are some strange, if I opened it from BlackBerry Browser & Opened it from simulater (in my eclipse) it works fine, no error. but it work not complete if I test it in my device for a real situation.

   if you have any ideas, kindly inform me please.

best regards,

siamkom 

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

Re: problem to use WebWork and redirect to SSL page

On your redirect.. is it changing the domain of the page?  How is it doing a re-direct, server based re-direct, JavaScript etc.

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Please use plain text.
New Contributor
siamkom
Posts: 7
Registered: ‎05-24-2011
My Device: Bold 9700
My Carrier: Developer

Re: problem to use WebWork and redirect to SSL page

Hi,

   here is flow,

   JavaScript        ASP.NET

   index.html   --> Login.aspx  --> Login1.aspx

                                       L----------> Login2.aspx

   index.html will redirect by using JavaScript with querystring also.

   Login.aspx , retrieve querystring value, compare the PIN in database if exist goto Login1.aspx

   otherwise goto Login2.aspx.

   I think it errors on server base my BB goto Login.aspx only.

thank you,

siamkom

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

Re: problem to use WebWork and redirect to SSL page

have you debugged your login.aspx page to see if the proper data is coming down?

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Please use plain text.