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
Contributor
hrushikesh
Posts: 19
Registered: ‎11-18-2010
My Device: touch 9800,9700

Re: Problem to post data to php file in widget.

 

            Thanks For reply,

 

                     I have reference the given site and also set the variable and uri. but still i am getting the same error. as follow :

 

 for that i have done the following code but still i am getting the below given error:

 

 

 <access subdomains="true" uri="http://myurl/mypage.php">
     <feature id="blackberry.pim.Memo" required="true" version="1.0.0.0"/>
   </access>
   <access subdomains="true" uri="http://myurl/mypage.php">
     <feature id="blackberry.pim.Memo" required="true" version="1.0.0.0"/>
   </access>

<access subdomains="true" uri="http://www.myphpurl.com">    <feature id="blackberry.pim.Memo" required="true" version="1.0.0.0"/>  </access>  <access subdomains="true" uri="http://www.myurl.com">    <feature id="blackberry.pim.Memo" required="true" version="1.0.0.0"/>  </access>

 

 

  The resource- http:// my url/ - could not be retrieved because it was not found in the config.xml.  

                     Please verify the <access> elements in the widget config.Contact your service provider if the problem persists.

 

                        As above i have set all the value and sending the data with form tag in form action.when i am submit the form at that time i am getting the above given error.

 

 Please help me . i have to complete the task as soon as possible.

Please use plain text.
Developer
agungeddy
Posts: 164
Registered: ‎08-26-2010
My Device: Not Specified

Re: Problem to post data to php file in widget.

[ Edited ]

for now, try to simplify your config above in just 2 lines like this:

 

 <access uri="*" />
<feature id="blackberry.pim.Memo" />

 then test your application..

 

Please use plain text.
Contributor
hrushikesh
Posts: 19
Registered: ‎11-18-2010
My Device: touch 9800,9700

Re: Problem to post data to php file in widget.

 

          Thanks for the reply to me,

 

                  I have tryed as you given source code in the config.xml file  as given below:

 

                          <access uri="*"/>
                                 <feature id="blackberry.pim.Memo" />
 
                         <access uri="*" />
                                  <feature id="blackberry.pim.Memo" />                     

 

              As you given me in the previous post . but still i am getting the same error :

 

                      The resource- http:// my url/ - could not be retrieved because it was not found in the config.xml.  

                     Please verify the <access> elements in the widget config.Contact your service provider if the problem persists.

 

 

             Sorry for this but i am still very affraid about it. and i have also tried the other way but still the same as it is.

 

            one thing i have note that when i am giving the action tho the form to redirect to the google page it can easlly transfer to the google or other destination page. but when i am giving the url where i want to post data at that time the simulator is giving the above error.

 

            Please help me.

Please use plain text.
Developer
agungeddy
Posts: 164
Registered: ‎08-26-2010
My Device: Not Specified

Re: Problem to post data to php file in widget.

Did you test your application in simulator or in real blackberry device? Both give the same error result??

Please use plain text.
Contributor
hrushikesh
Posts: 19
Registered: ‎11-18-2010
My Device: touch 9800,9700

Re: Problem to post data to php file in widget.

 

 

              Thanks Sir,

 

             I have test the application on simulator and device both. but both are given the same error.

Please use plain text.
Developer
agungeddy
Posts: 164
Registered: ‎08-26-2010
My Device: Not Specified

Re: Problem to post data to php file in widget.

[ Edited ]

If you dont bother, please you can:

 

1. Show your full config.xml here (with access tag use uri="*" )

2. Give your JQuery method here, of course with show your real url (place a testing file in your url, ex: test.php)

 

Then maybe someone else in this forum (including me) will try your codes and we' will see the results...

Please use plain text.
Contributor
hrushikesh
Posts: 19
Registered: ‎11-18-2010
My Device: touch 9800,9700

Re: Problem to post data to php file in widget.

 

             Yes sir,

 

                    Following given code is my full code for the config and javascript code:

 

                        config.xml

 

                       <?xml version="1.0" encoding="UTF-8"?>
                             <widget xmlns="http://www.w3.org/ns/widgets" xmlns:rim="http://www.blackberry.com/ns/widgets" version="1.0.0.0">
                            <name>DTAFinal</name>
                            <feature id="blackberry.identity" required="true" version="1.0.0.0"/>
                           
                            <access uri="http://www.datetrackeralert.com/text.php" />
                                    <feature id="blackberry.pim.Memo" />
 
                            <icon rim:hover="false" src="icon.png"/>
                            <content src="index.html"/>
                     </widget>

 

 

                    index.html

 

                    <script type="text/javascript">

                              $(document).ready(function (){

                                  $('#submit').click(function(){
                
                                    var username = $('input[name=username]');
                                    var password = $('input[name=password]');

                                    var data = 'username=' +username.val()+ 'password=' +password.val());

                                    $.ajax({

                                            url: "http://www.datetrackeralert.com/text.php",

                                           type:"GET",

                                          data: data,

                                         cache: false,

                                         success: function (msg) {

                                                 alert('success.');
                    
                                         }
                
                               });
                               return false;
                        });
                 });

            </script>

 

           <form action="http://www.datetrackeralert.com/text.php" method="post">
  <div class="main">
    <div class="logo_img"><img src="images/logo.png" class="logo_dec" alt="" /></div>
      <div class="main_box">
      <div class="box_top"><img src="images/login_box_top.png" alt="" /></div>
      <div class="box_middle" style="background-image:url('images/login_box_middle.png');background-position:center; ">
      
        <div class="user_name">
          <p class="text1">User Name:</p>
          <input type="text" value="" name="username" id="username" class="input_text"  />
        </div>
        <div class="user_name">
          <p class="text1">Password:</p>
          <input type="password" value="" name="password" id="password" class="input_text"  />
        </div>
        <div class="reg_line1">
          <input type="checkbox" value="" name="remember_me" id="remember_me" class="input_text2"  />
          <p class="text5">Remember me</p>
        </div>
        <div class="login_main">
          <input type="submit" id="submit" value="" class="login_btn"  />
          
        </div>
        <div class="face_prob">
          <div class="text2" id="newuserlink" ><a href="newuser.html">New User? Register Here</a></div>
          <br/>
          <div class="text2" id="forgetpasslink" ><a href="">Forgot Password?</a></div>
         
        </div>
      </div>
      <div class="box_top"><img src="images/login_box_bottom.png" alt="" /></div>
    </div>
  </div>
 </form>

 

 

              I am using as above code for the posting the data.

Please use plain text.
Developer
agungeddy
Posts: 164
Registered: ‎08-26-2010
My Device: Not Specified

Re: Problem to post data to php file in widget.

[ Edited ]

Sorry, but when i checked, there is no text.php file in http://www.datetrackeralert.com/ like written in your codes.

Please use plain text.
Contributor
hrushikesh
Posts: 19
Registered: ‎11-18-2010
My Device: touch 9800,9700

Re: Problem to post data to php file in widget.

          Thanks for the reply to all,

 

                    I i have got the solution of the above given error that i was giving the full path in th config.xml file but i have to give only domain name so this was the problem.

 

                    Go to the config.xml file give the domain path in the <access> element. after that you can easily run the application.

Please use plain text.
Developer
agungeddy
Posts: 164
Registered: ‎08-26-2010
My Device: Not Specified

Re: Problem to post data to php file in widget.

Congratulation sir...

Please use plain text.