Welcome Guest, Not a member yet? Register   Sign In
Jquery with CI
#5

[eluser]finord[/eluser]
I use this example form a some forum to do this, and with this code work, i test it.

index.html
Code:
<html>
    <head>
        -script type="text/javascript" src="jquery.js">[removed]
        <title>GET Example</title>
        -script type="text/javascript">
        function post() {
            $.post("post.php",{  fname:$("#fname").val()  , te2:$("#te2").val() , lname:$("#lname").val()  },function(response) {
                $("#update").html(response);
            });
        }
        -/script>
    </head>
    <body>
        First Name: <input type="text" name="fname" id="fname" /><br />
        Last Name: <input type="text" name="lname" id="lname" /><br />
        Eso <input type="text" name="te2" id="te2"><br>
        <input type="button"><br />
        <div id="update" style="border: 1px dotted red;"></div>
    &lt;/body&gt;
&lt;/html&gt;

And the Post.php
Code:
$fname = $_POST['fname'];
    $lname = $_POST['lname'];
    echo "Your full name is $fname $lname. Welcome to the site!";

I try to use jquery docs, but cant do it work, for hat use this example.

Thanks


Messages In This Thread
Jquery with CI - by El Forum - 10-03-2008, 07:43 AM
Jquery with CI - by El Forum - 10-03-2008, 08:58 AM
Jquery with CI - by El Forum - 10-03-2008, 11:39 AM
Jquery with CI - by El Forum - 10-03-2008, 01:01 PM
Jquery with CI - by El Forum - 10-04-2008, 04:13 AM
Jquery with CI - by El Forum - 11-06-2008, 03:42 PM
Jquery with CI - by El Forum - 11-07-2008, 03:40 PM
Jquery with CI - by El Forum - 11-07-2008, 05:14 PM



Theme © iAndrew 2016 - Forum software by © MyBB