[eluser]Thorpe Obazee[/eluser]
[quote author="blackhorse66" date="1248243293"]
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]
<input type="submit" id="generate" value="Generate!"><br />
<div id="quote"><p></p></div>
</div>
</body>
</html>
$("#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?[/quote]
Perhaps you can use the full path to the script?
Code:
http://yoursite.com/script.php