Java script and mySql

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Java script and mySql

    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!

    #2
    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

    Comment


      #3
      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! :/

      Comment


        #4
        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=xm lHttp.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>

        <div id="ReloadThis">Default text</div>

        </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!)
        Last edited by pmbguy; 09.11.10, 23:16.
        C3 Themes: http://c3themes.wen.ru/index.html
        Find Files: http://mystarter.tk/?goto=X-search

        Comment


          #5
          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! ;)

          Comment


            #6
            jquery can solve your problem..jquery has lot of functions including ajax.

            Added after 2 minutes:

            or create a flash based shoutbox..
            Last edited by ramciv14; 11.11.10, 22:13.

            Comment


              #7
              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! ;)

              Comment

              Working...
              X