Repopulating Form being displayed through Jquery UI tabs interface |
[eluser]Timothy_[/eluser]
[quote author="Basketcasesoftware" date="1298197566"]Odd side effect of the Ajax I guess. I know the manual suggests otherwise, but try it with a full url. Or have you done that already?[/quote] Yeah I have tried it anyway and no luck. I suppose it does make sense in a way. The ajax is just passing that on as a response... but then again surely a controller should be able to override that. I have also tried the refresh attribute without luck. Code: redirect('home', 'refresh'); [quote author="Basketcasesoftware" date="1298197566"]You've been having some strange results with your project as far as things not working like you'd expect.[/quote] I see it as part of the learning process and I've grown used to things not working as expected... adds to the excitement of developing
[eluser]Basketcasesoftware[/eluser]
How about passing it on to a different controller and see if that works. I know that isn't the final objective but it's a way to exclude an issue. If it works just create a controller like (I'm trying to adjust for 1.7): Code: class Redirector extends Controller Just a shot in the dark right now.
[eluser]Timothy_[/eluser]
Yeah the redirect works in any other controller, just not in the one where it is also outputting ajax.
[eluser]Basketcasesoftware[/eluser]
And that one denies redirection to any other controller... at least that's what I'm gathering from your reply. There is this comment at the end of the 2.0 Guide for the redirect method. Quote:Note: In order for this function to work it must be used before anything is outputted to the browser since it utilizes server headers.I'm looking at the set_header function now.
[eluser]Basketcasesoftware[/eluser]
How about getting the output at the end of that controller method using $this->output->get_output() and writing it to a file somewhere? That might help you with diagnostics here.
[eluser]Timothy_[/eluser]
Hmmm I was doing some research and I think I am going to have to put a condition in my jquery form. I found this code from this post http://stackoverflow.com/questions/19909...-ajax-call Code: $.ajax({ Now I just have to work out how to integrate it into my code.
[eluser]Basketcasesoftware[/eluser]
Looks you just need to be able to assign data.redirect. I wonder if you need the full URI, or just the usual CI partial? I'm still curious why it's disabling normal CI output behavior.
[eluser]xerobytez[/eluser]
Try this out Timothy Code: if($condition == TRUE) { lol, the forum is filtering my code out of fear for xss, so * = window
[eluser]Timothy_[/eluser]
Hey xerobytez, It works perfectly. Thank you so much for putting the time into this. I have another issue that you may see a solution to (if you have time that is). I have a WYSIWYG editor in the form and I need to append its output to its textarea manually. This is what the updateText function is for. I am using the ajaxForm "beforeSubmit" callback. Code: //For Ajax Form This is working in Chrome but not firefox... In firefox you have to click submit twice before this actually updates. Do you have any ideas? Thanks, Tim
[eluser]Basketcasesoftware[/eluser]
I've seen this with FireFox as well lately. And not just with forms, but with links and other general features. It's been rather annoying. I guess it's a "feature" of FireFox right now. At least this was the case with FireFox < 4.0 FireFox 4.0 Beta 11 doesn't seem to have this problem (in fact I'm using it right now). |
Welcome Guest, Not a member yet? Register Sign In |