flemingmike Posted June 9, 2010 Share Posted June 9, 2010 hello, im using the following code, and in any browser, it works, but i cannot view on a blackberry. any ideas? <html> <body> <script type="text/javascript"> if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.open("GET","http://www.durhamit.ca:8181/1.0/?method=player.getPlayQueue",false); xmlhttp.send(); xmlDoc=xmlhttp.responseXML; document.write("<table border='0'>"); var x=xmlDoc.getElementsByTagName("track"); for (i=0;i<x.length;i++) { document.write("<tr><td>"); document.write(x[i].getElementsByTagName("artist")[0].childNodes[0].nodeValue); document.write("</td><td>"); document.write(x[i].getElementsByTagName("title")[0].childNodes[0].nodeValue); document.write("</td><td>"); document.write(x[i].getElementsByTagName("album")[0].childNodes[0].nodeValue); document.write("</td></tr>"); } document.write("</table>"); </script> </body> </html> Link to comment https://forums.phpfreaks.com/topic/204296-php-not-working-on-blackberry/ Share on other sites More sharing options...
syed Posted June 9, 2010 Share Posted June 9, 2010 Does blackerry support full javascript? Link to comment https://forums.phpfreaks.com/topic/204296-php-not-working-on-blackberry/#findComment-1069985 Share on other sites More sharing options...
flemingmike Posted June 9, 2010 Author Share Posted June 9, 2010 thats what im unsure of. i also tried on an ipod touch, no go. is there maybe another way of getting the info from an xml? my xml is http://www.durhamit.ca:8181/1.0/?method=player.getPlayQueue Link to comment https://forums.phpfreaks.com/topic/204296-php-not-working-on-blackberry/#findComment-1069987 Share on other sites More sharing options...
kenrbnsn Posted June 9, 2010 Share Posted June 9, 2010 Use PHP instead of Javascript. Ken Link to comment https://forums.phpfreaks.com/topic/204296-php-not-working-on-blackberry/#findComment-1070043 Share on other sites More sharing options...
Alex Posted June 9, 2010 Share Posted June 9, 2010 What are you talking about? There's no PHP there at all. The browser client doesn't care what the server side language being used is, it never has to deal with it period (hence server-side). The browser just sends the request to the server, the server does whatever it's instructed to do and returns the response in the form of HTML. Link to comment https://forums.phpfreaks.com/topic/204296-php-not-working-on-blackberry/#findComment-1070108 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.