Welcome Guest, Not a member yet? Register   Sign In
Getting Variables into Jquery Ui Tabs
#1

[eluser]Timothy_[/eluser]
Hello,

I am currently working on a number of projects that are all using the jquery ui tabs interface. These tabs load their content in via ajax.

Code:
<div id="tabs">
    <ul>
        <li><a href="ajax/content1.html">Ajax Tab 1</a></li>
        <li><a href="ajax/content2.html">Ajax Tab 2</a></li>
    </ul>
</div>

This is quite a nice way to get a lot of content organised very quickly... however i am continually running into a solid brick wall...

Once the content is loaded within these tabs I am not able to send variables to the content.

Say for example, error messages from the codeigniter form validation class, or repopulation data of forms.

I hope I am missing something here!

Tim
#2

[eluser]Ben Edmunds[/eluser]
Instead of loading a html file you should load a url that calls a controller that will dynamically load what is needed.
#3

[eluser]twmulloy[/eluser]
i am using the ajax method of calling tab content, directing to a controller to populate the view partial but i too am not having much luck getting things such as form validation working. have you figured out a solution for this?
#4

[eluser]frankcefalu[/eluser]
I recommend using Dojo for this.

You can mix Dojo/Jquery.

Dojo for interfacing is alot faster and I've built a helper for it.

http://ellislab.com/forums/viewthread/155529/

But, I can help you with your Jquery Issue.

Are you trying to send variables to ajax/content1.html? or The content within the tab itself?
#5

[eluser]harman[/eluser]
Use
$(function(){
$("#tabs").html("<ul><li>Your Val</li></ul>");
});
#6

[eluser]Kelvin86[/eluser]
Yo man,

This is the problem that i'm having now with codeigniter & jquery.
If this is already solved, please reply me with the link.

I got this peace of code.

Code:
<div class="tabs">

<ul>
   <li><a href="&lt;?php echo $base_url/controllername/functionname/"></li>
</ul>

</div>

This works perfectly but the page in that tab cannot communicate with my Jquery function because in the functionname of the controller I didn't load the header view. That is because otherwise I would have two headers (from the page itself + from the page in the tab).

Is there anyway I can let Jquery and my css files communicate with the page in the tab?

** Can DOJO (helper) help with me with this? .........
#7

[eluser]V4Mp[/eluser]
Hello,
I have the same problem.
I load a form in a jquery ajax tab and want to validate the accountname in the
form.
Everthing is ok, but I can not get back a validation errors. Somebody
knew a workaround or a better way?!

THX

If someone would like to have a look on it:
http://www.sws4u.de/msc_alpha/newaccount

Thats the script. You can just use any mail and password and than try at the
tabs the accountname "test".
You will be redirected to the form, but without any validation error and arrays for the value.
#8

[eluser]InsiteFX[/eluser]
Maybe CodeIgniters url_helper Anchor.

InsiteFX




Theme © iAndrew 2016 - Forum software by © MyBB