Jump to content
alny

classificar filmes em ajax

Recommended Posts

alny

ola. não percebo muito bem de ajax e gostaria que me ajudasse a classificar um determinado filme

tenho ai o meu codigo

window.onload = function() {
   document.getElementById('classificar').onsubmit = classificarFilme;
};

function classificarFilme(){


   var classi = document.getElementById('c1');
   var classiFi = document.getElementById('idFil');

    $.get('database/OperacoesAluguer.php',{c1: classi.value, idFil:classiFi.value},
    function (valor){


     alert('classificassao: ' + valor);

    }
    .Field(function (){
       alert('error');
    })

a seguir este é meu html

<!DOCTYPE html>
<html>
   <head>
       <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
       <title></title>
       <script type="text/javascript" src="js/JQuery.js"></script>
       <script type="text/javascript" src="js/ClassificarFilme.js"></script>
   </head>
   <body>

       <input type="hidden" id=" idFil" value="<?php echo $_GET['filmeID'] ?>" />
       <select size="1"  id="c1">
           <option selected value="Cassifique">Cassifique!</option>
           <option value="1" >1</option>
           <option value="2" >2</option>
           <option value="3" >3</option>
           <option value="4" >4</option>
           <option value="5" >5</option>
           <input type="text" id="xx"/>
       </select>
       <button id="classificar">classificar</button>
   </body>
</html>

Edited by brunoais
geshi

Share this post


Link to post
Share on other sites
brunoais

"[Os jovens da actual geração]não lêem porque não envolve um telecomando que dê para mirar e atirar, não falam porque a trapalhice é rainha e o calão é rei" autor: thoga31

Life is a genetically transmitted disease, induced by sex, with death rate of 100%.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.