Welcome Guest, Not a member yet? Register   Sign In
jquery load in CI, how?
#1

[eluser]searain[/eluser]
Code:
<html>
    <head>
        <title>AJAX with jQuery Example</title>
        [removed][removed]
        <style type="text/css">
        #wrapper {
            width: 240px;
            height: 80px;
            margin: auto;
            padding: 10px;
            margin-top: 10px;
            border: 1px solid black;
            text-align: center;
        }
        </style>
    </head>
    <body>
        <div id="wrapper">
        [removed]
        $(document).ready(function(){
            $("#generate").click(function(){
                $("#quote p").load("script.php");
            });
        });
        [removed]
        &lt;input type="submit" id="generate" value="Generate!"&gt;&lt;br />
        <div id="quote"><p></p></div>
        </div>
    &lt;/body&gt;
&lt;/html&gt;

$("#quote p").load("script.php");


In traditional php, if I put the script.php in the same folder as this html document, then it is working.

In CI, more like this will be part of the view page. Then in the view page, how can I call the server side php script? like
$("#quote p").load("script.php");


Where I put the server side php script, same as function of a controlloer?


Messages In This Thread
jquery load in CI, how? - by El Forum - 07-21-2009, 07:14 PM
jquery load in CI, how? - by El Forum - 07-21-2009, 07:25 PM
jquery load in CI, how? - by El Forum - 07-28-2009, 02:53 PM



Theme © iAndrew 2016 - Forum software by © MyBB