Please help me! I want to set it to me javascript writes and reads data from the mySql! In real time! 4 lavalair shoutbox! Thanks in advance!
My FaceBook clone: http://secafe.freehostia.com
Started on the old forum in November 2010 · view the original in the archive · old links redirect here
Please help me! I want to set it to me javascript writes and reads data from the mySql! In real time! 4 lavalair shoutbox! Thanks in advance!
My FaceBook clone: http://secafe.freehostia.com
i think you'll find it easier to use ajax... otherwise i don't think it's doable cause javascript runs client side n db is server side, so you'd need some kinda refresh i think, like you could do it as a j2me application, but not on a mobile site to my knowledge... I've asked around about similar stuff n a mate was explaining how to link javascript with database the other day, it's all hidden fields n posting n stuff...
C3 Themes: http://c3themes.wen.ru/index.html Find Files: http://mystarter.tk/?goto=X-search
ok! I am developing for the PC, in other words we create something in the style of facebook! So I need something to refresh me that part, without refreshing the whole page! :/
My FaceBook clone: http://secafe.freehostia.com
ok well i found this code on another site..
here if you wanna read whole topic...
<html> <body> <script type="text/javascript"> function Ajax(){ var xmlHttp; try{ xmlHttp=new XMLHttpRequest();// Firefox, Opera 8.0+, Safari } catch (e){ try{ xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); // Internet Explorer } catch (e){ try{ xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); } catch (e){ alert("No AJAX!?"); return false; } } } xmlHttp.onreadystatechange=function(){ if(xmlHttp.readyState==4){ document.getElementById('ReloadThis').innerHTML=xmlHttp.responseText; setTimeout('Ajax()',10000); } } xmlHttp.open("GET","http://www.example.com/the_page_that_contains_the_div_content",true); xmlHttp.send(null); } window.onload=function(){ setTimeout('Ajax()',10000); } </script>Default text
</body> </html>that should work... they posted something about not on ie, but apparently it works in mozilla chrome, opera, etc...
Added after 5 minutes:
but that's a mixture of ajax n javascript... won't work on most mobiles, maybe on smartphones with all the newfangled technology...
(note to whoever: ok, according to your auto spell check, or is it my browsers? I'm using chrome btw, javascript is a spelling mistake but newfangled isn't... go figure!)
C3 Themes: http://c3themes.wen.ru/index.html Find Files: http://mystarter.tk/?goto=X-search
Thanks! But this does not work! 🙁 I found some scripts that work with ajax, php and mysql! I hope to be able to do something! Thanks again! 😉
My FaceBook clone: http://secafe.freehostia.com
I know for jQuery! Junior alone in ajax and javascript! Well, I can not do bass with them, and php, mysql, html and wml know mint! And lavalair I studied a lot! That is why he reconstructs the open source community website! Of course only one version will be posted for download! 😉
My FaceBook clone: http://secafe.freehostia.com