5 Replies Latest reply on Dec 2, 2014 5:41 AM by joel_pau

    Understand the Adobe Edge & AJAX, PHP Transition

    justincode Level 1

      Hi all..

       

      I have done a fair bit in adobe edge, what a fab program.

       

      But i am yet to pass data into and out of it, below is a simple HTML, AJAX, PHP file that asks the user to click one of 5 radio buttons, each radio button has a value set to it. Once the user clicks one of these radio buttons the value is posted to a php file using ajax.

       

      I need a little push from you professionals to help me understand how i transfer this simple script into Adobe Edge, please dont think that i am just trying to get a quick answer, the project is much larger than just this little script. Please if you could shed a little light on how to do this the rest should fall into place for me...

       

      many many thanks!

       

      <!doctype html>

      <html>

      <head>


      <script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js'>

      </script>

       

      <meta charset="utf-8">

      <title>TEST</title>

      </head>

      <body>

       

      <h1>Scores Page</h1>

        

        <form action="updatescore.php" method="post">

       

      <form>

          <input type="radio" name="newScore" value="1" >1

          <br>

          <input type="radio" name="newScore" value="2" >2

          <br>

          <input type="radio" name="newScore" value="3" >3

          <br>

          <input type="radio" name="newScore" value="4" >4

          <br>

          <input type="radio" name="newScore" value="5" >5

          <br>

      </form>

       

      </body>

       

      <script>

      $(document).ready(function() {

          $('input[name=newScore]').change(function(){

              var newScore = $(this).val();

              $.post('updatescore.php', {newScore:newScore}, function(data){

              });

          });

      });

      </script>

       

      </html>