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
usr501
Posts: 222
Registered: ‎03-03-2012
My Device: Ripple, LE Z10, Dev Alpha _C, Playbook, Bold 9900
My Carrier: rogers

Re: Smartphone Application crashed every time

Post HTML content :smileyvery-happy:

Please use plain text.
New Contributor
Anansy
Posts: 9
Registered: ‎02-15-2010
My Device: Torch | Playbook
My Carrier: Digicel

Re: Smartphone Application crashed every time

<!DOCTYPE html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<meta name="viewport" content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, width=device-width, height=device-height, user-scalable=0"/>

 

 

<script language="javascript">  

function highlight(e) {     

 e.setAttribute("style","background-color: #09F; border-color:#333;");   

 }            

 

 function unhighlight(e) {        

 e.setAttribute("style","");     

 }

</script>

 

<style type="text/css">

/////css stuff

 </style>

 

</head>

 

<body >

 

<div id="top_cont" align="center">

<img src="images/banner.png">

</div>

 

<div id="search" align="center">  

<form id="searchform">  

<input id="search" type="text" style="text-align: center" maxlength="50" value="Search for movie titles"/>  </form>  </div>

 

<div id="main_container">      

 

<div id="top_row">   

                

<a href="#" >            

<div class="buttons" x-blackberry-focusable="true" x-blackberry-initialFocus="true" onMouseOver="highlight(this);" onMouseOut="unhighlight(this);"><img src="images/icons-1.png" class="top_space"><br>BUT1</div>           </a>         

 

<div class="button_spacer_vert"></div>

 

<a href="#" >

<div class="buttons" x-blackberry-focusable="true" onMouseOver="highlight(this);" onMouseOut="unhighlight(this);"><img src="images/icons-2.png" class="top_space"><br> BUT2</div>             

</a>

 

</div>      

 

 

<div id="middle_row">          

 

<a href="#" >           

<div class="buttons" x-blackberry-focusable="true" onMouseOver="highlight(this);" onMouseOut="unhighlight(this);"> <img src="images/icons-6.png" class="top_space"> <br> BUT3 </div>          

</a>        

 

<div class="button_spacer_vert"></div>                

 

<a href="#" >          

<div class="buttons" x-blackberry-focusable="true" onMouseOver="highlight(this);" onMouseOut="unhighlight(this);"> <img src="images/icons-3.png" class="top_space"><br>BUT4 </div>         

</a>    

 

</div>        

 

<div id="bottom_row" >      

<a href="#" > 

<div class="buttons" x-blackberry-focusable="true" onMouseOver="highlight(this);" onMouseOut="unhighlight(this);"> <img src="images/icons-5.png" class="top_space"><br>BUT5 </div>

</a>        

 

<div class="button_spacer_vert"></div>     

           

<a href="#" ><div class="buttons" x-blackberry-focusable="true" onMouseOver="highlight(this);"onMouseOut="unhighlight(this);"> <img src="images/icons-9.png" class="top_space"> <br>  BUT6</div>

</a>  

 

</div> 

</div>

 

 

</body>

</html>

Please use plain text.
New Contributor
Anansy
Posts: 9
Registered: ‎02-15-2010
My Device: Torch | Playbook
My Carrier: Digicel

Re: Smartphone Application crashed every time

[ Edited ]

usr501 , i took your advice and did the chrome ripple ext. and it found no errors. Yet the app crashes after the index finish loading.

Please use plain text.
Trusted Contributor
usr501
Posts: 222
Registered: ‎03-03-2012
My Device: Ripple, LE Z10, Dev Alpha _C, Playbook, Bold 9900
My Carrier: rogers

Re: Smartphone Application crashed every time

Anansy,

cleaned html .

 <!DOCTYPE html>
<head>
<meta  charset=utf-8" />
 <title>?</title>
<meta name="viewport" content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, width=device-width, height=device-height, user-scalable=0"/>
<!--style type="text/css">  ?
/////css stuff
</style-->
<script language="javascript">  
function highlight(e) {     
e.setAttribute("style","background-color: #09F; border-color:#333");   

 }            
function unhighlight(e) {        
e.setAttribute("style","");     

 }
</script>
</head>
<body>
<div id="top_cont" align="center"><img src="images/banner.png" /></div>
<div id="search" align="center"> <form id="searchform"><input id="search" type="text" style="text-align: center" maxlength="50" value="Search for movie titles" /></form></div><br />
<div id="main_container">      
<div id="1"><a href="#" class="buttons" x-blackberry-focusable="true" x-blackberry-initialFocus="true" onMouseOver="highlight(this);" onMouseOut="unhighlight(this);"><img src="images/icons-1.png" class="top_space"><br>BUT1 </a> </div>                 
<div id="2"><a href="#" class="buttons" x-blackberry-focusable="true" onMouseOver="highlight(this);" onMouseOut="unhighlight(this);"><img src="images/icons-2.png" class="top_space"><br /> BUT2</a></div>             
<div id="3"><a href="#" class="buttons" x-blackberry-focusable="true" onMouseOver="highlight(this);" onMouseOut="unhighlight(this);"><img src="images/icons-6.png" class="top_space"><br /> BUT3 </a></div>          
<div id="4"><a href="#" class="buttons" x-blackberry-focusable="true" onMouseOver="highlight(this);" onMouseOut="unhighlight(this);"><img src="images/icons-3.png" class="top_space"><br />BUT4 </a></div>         
<div id="5"><a href="#" class="buttons" x-blackberry-focusable="true" onMouseOver="highlight(this);" onMouseOut="unhighlight(this);"><img src="images/icons-5.png" class="top_space"><br />BUT5 </a></div>
<div id="6"><a href="#" class="buttons" x-blackberry-focusable="true" onMouseOver="highlight(this);"onMouseOut="unhighlight(this);"><img src="images/icons-9.png" class="top_space"> <br />  BUT6</a></div>
</div><!--/endmain-->
</body>
</html>

Found:

  1. Document has no title,
  2. did you omit the CSS,
  3. the javascript styling in the head section can be reproduced using CSS.
  4. Document has one too many divs. etc.
  5. You've posted  a search box and six links. Is that all you have built at this time?
  6. :Rockon:
Please use plain text.
New Contributor
Anansy
Posts: 9
Registered: ‎02-15-2010
My Device: Torch | Playbook
My Carrier: Digicel

Re: Smartphone Application crashed every time

usr501, Thanks alot i really appreciate your help.

 

The title is really not important. The css was omitted intentionally. I think some devices dont recognise css :hover events for focus driven menus. I dont think thats alot of divs for a simple menu.

 

I resolved the issue with the help of the chrome plugin you recommended. It seems it was crossdomain issue. Apparently "http://mydomain.com" and "http://www.mydomain.com" are very different in this environment. And the links were pointing to other full blown html pages, rather than page fragments provisioned for div.innerHTML. 

 

Thanks again. If youre ever in Jamaica, let me know. I owe you a drink.

Please use plain text.