Wierd ajax bug |
[eluser]Aviatrix[/eluser]
Hello , when i try to make AJAX request with jQuery as a response i get the html of the same page ! here are my files the ajax controller : Code: Class Ajax extends Controller { the JS : Code: [removed] the htaccess ( i think this might cause all the problems ) Code: RewriteEngine on
[eluser]theprodigy[/eluser]
Quote:$.post("/ajax/process/", { Try changing to: Code: $.post("/ajax/process/", { Inside the "success" function, you should end each line with a semi-colon, not a comma.
[eluser]theprodigy[/eluser]
Quote:Class Ajax extends Controller { What is in the view that you are loading? Is it the same view you are loading in the first place?
[eluser]Aviatrix[/eluser]
[quote author="theprodigy" date="1265001663"] What is in the view that you are loading? Is it the same view you are loading in the first place?[/quote] thats in the view , and yes it is the same Code: <?php echo $url ?>
[eluser]theprodigy[/eluser]
so, how are you showing the view in the first place? What controller/function?
[eluser]Aviatrix[/eluser]
thats the main controller & the view that it loads Code: Class Main extends Controller { Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> here is a live preview http://oxi.la
[eluser]mattpointblank[/eluser]
Try changing your function to this: Code: function process(){
[eluser]Aviatrix[/eluser]
nope , same thing ... :S im geting desperate here .. i tried 0498958367 tutorials .. same thing .. :S
[eluser]theprodigy[/eluser]
Quote:thats in the view , and yes it is the same When I visit http://oxi.la/ajax/process, I get a submit button and a text field. It just doesn't display like the home page because of the relative path to the javascript and css files. Do you have some code in place that shows the home page on 404, or maybe something in your routes file to send everything to the home page? |
Welcome Guest, Not a member yet? Register Sign In |