09-22-2010, 04:18 AM
[eluser]smilie[/eluser]
Hi all,
I could really use some help here, been banging my head to the wall for past two days
A really simple script:
step2.php (views)
test.php (controller)
and test.php (views)
That's all.
Problem is that I do not receive string 'test' with jQuery post code
If I open URL (http://core_igniter/index.php/test) in the browser it is working.
When I click on the button to trigger JS, it does execute it - I can see it in Firefox (firebug). But then it says: "Data Loaded: " (without string test behind it).
What the hell am I doing wrong here
Thanks!
Smilie
Hi all,
I could really use some help here, been banging my head to the wall for past two days

A really simple script:
step2.php (views)
Code:
<input type="button" id="bagView">test</input>
[removed]
$('#bagView').live('click', function(){
$.post("http://core_igniter/index.php/test",function(data) {
alert("Data Loaded: " + data);
});
});
[removed]
Code:
class Test extends Controller
{
function index()
{
$this->load->view('test');
}
}
Code:
<?php
echo "test";
That's all.
Problem is that I do not receive string 'test' with jQuery post code

If I open URL (http://core_igniter/index.php/test) in the browser it is working.
When I click on the button to trigger JS, it does execute it - I can see it in Firefox (firebug). But then it says: "Data Loaded: " (without string test behind it).
What the hell am I doing wrong here

Thanks!
Smilie