Welcome Guest, Not a member yet? Register   Sign In
Base URL issue? jQuery is getting confused, among other things...
#1

[eluser]slamtastic[/eluser]
Hey all. I'm still pretty new to CI and have run into this snag a couple times when building text projects. Basically, methods, links and pages get lost from time to time.

For instance, this simple jQuery function gives error that follows:

Code:
$(document).ready(function() {

    $('.link_home').click(function() {
        $('.header_image').slideDown(function() {
            $('.wrap-content').fadeOut(function() {
                $.post('/ajax_home/home', function(html) {
                    alert('hi');
                    $('.wrap-content').html(html);
                });
            });
        });
...

    });

Code:
POST http://xampp.local/ajax_home/home    http://xampp.local/ajax_home/home   404 Not Found 42ms

This is what my config file looks like:

Code:
$config['base_url']    = "http://xampp.local/testsite";
$config['index_page'] = "index.php";

My Xampp Vhost setup:

Code:
<VirtualHost *:80>
    DocumentRoot C:/xampp/htdocs/ci
    ServerName xampp.local
    ServerAlias www.xampp.local
</VirtualHost>

Finally, my local hosts file:
Code:
127.0.0.1    xampp.local localhost


Pretty dern straight ahead, right?! What am I missing here?


Messages In This Thread
Base URL issue? jQuery is getting confused, among other things... - by El Forum - 02-16-2009, 01:04 AM



Theme © iAndrew 2016 - Forum software by © MyBB