Welcome Guest, Not a member yet? Register   Sign In
Loading alternative pages into jQuery Tabs via ajax/PHP/CodeIgniter - refresh problems ?
#4

[eluser]TheFuzzy0ne[/eluser]
I take it $user_data is set somewhere in the controller and you've just not posted it? I'm also unsure how/where you're setting the userdata. Would it be possible for you to post your entire controller and view?

Also, I would suggest changing this:
Code:
if($user_data['mode'] == 0) {$input['wd'] = 'withdrawal';}
if($user_data['mode'] == 1) {$input['wd'] = 'withdrawalextended';}

to this:
Code:
$input['wd']  = 'withdrawal' . ($user_data['mode'] == 1) ? 'extended' : '';

It's less code (almost half the code), and also ensures that, if, for some reason, $user_data['mode'] is not set, or isn't set to either 1 or 0, you have a fallback to prevent errors, or unexpected bahaviour. I know this probably has nothing to do with the problem at hand, but I thought it was worth mentioning. Smile

I'm sorry this is frustrating you. I'm still struggling to get my head around the whole thing (despite your clear explanations). Hopefully, if you can post some more code, it should become clear to me.


Messages In This Thread
Loading alternative pages into jQuery Tabs via ajax/PHP/CodeIgniter - refresh problems ? - by El Forum - 05-23-2013, 06:53 AM



Theme © iAndrew 2016 - Forum software by © MyBB