Ver Mensaje Individual
  #1 (permalink)  
Antiguo 17/04/2015, 21:05
silviosinger
 
Fecha de Ingreso: abril-2015
Mensajes: 7
Antigüedad: 9 años
Puntos: 0
creacion de archivo .php desde un .js

Hola compañeros tengo un archivo .js q obtuve de una web hace algun tiempo pero lo obtuve incompleto debido a q solicita un archivo php el cual no poseo y q necesito crear a partir del .js q tengo espeero q alguien me pueda orientar por aca dejo mi .js

Código:
function show(val) {    $("#content").empty().append('<center><img src="images/load.gif"><br>Loading web module,Please wait...</center>');


    $.ajax(
    {


        type: "POST",
        url: "includes/core.php",
        data: "content=" + val + "&module=content",
        cache: false,
        success: function(msg)
        {
            $("#content").empty().append(msg).hide().fadeIn("slow");


        }
    });    


}
el archivo q habria q crear seria el core.php el cual le diria al .js a q archivo llamar con la funcion show q en todo caso para hacer el llamado seria algo asi

Código:
<a onClick="show('news')">Main Page</a>
espero sus prontas respuestas.

Última edición por silviosinger; 17/04/2015 a las 21:07 Razón: agregando codigo