04-30-2012 09:36 AM
Hello guys,
I am new to BB Dev and just would like to know why my onclick does not work. I have read some previous posts about the 4.5 browser not supporting some features. My App works like this, I only have one html file and use JS to dynamically load the content into it using innerHTML. My question is this, if some browsers do not support this, then what is the alternative? I presume having different html files but Ripple will not access them, saying 404 not found, how do i make Ripple access files other than index.html. I know JS works because it is enabled and alert box works. Just the innerHTML. Thanks in advance.
04-30-2012 11:07 AM
innerHTML does work. I use it on all my apps..
Make sure the syntax is as follows:
document.body.innerHTML="put html code here";
not if u need to put quotes inside the two quotes u need to put a backwards slash like \" to make the quote work.
Also another way to write is
document.body.innerHTML=""; //clears page
document.write("html code goes here"); //starts writing html code