This is a migrated thread and some comments may be shown as answers.

[Solved] Clientside Reload Of Tabstrip

1 Answer 129 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jeff
Top achievements
Rank 1
Jeff asked on 27 Jun 2011, 09:23 PM
I have two tabs, both loaded via LoadContentFrom("action", "controller", new { id = "someId" })

Outside of the  tabstrip, I have a dropdown, upon a select of a specific value, I need to clientside-only, reload the tabstrip where the id="newValue" (action and controller are the same, but the id query parameter will change. Basically what's a jQuery way to execute LoadContentFrom of the tabs passing a new id?

Hope someone can help.

Update
I put the tab and everything in the tab in a seperation PartialView and call it like this:
<div id="TabContainer">@{Html.RenderAction("_MyPartial", "ControllerName", new { id = Model } );}</div>

I then have a javascript function that gets called upon change of the dropdown:
function onCampaignsChange(e) {
$.get('@Url.Action(@"_Account", @"Brand")', { campaignId: e.value },function(data){$('TabContainer').html(data);}); }

However, it does nothing. Then I found this link but unsure how to apply it to my scenario.

Please help out

1 Answer, 1 is accepted

Sort by
0
John DeVight
Top achievements
Rank 1
answered on 06 Jul 2011, 01:44 PM
Hi Jeff,

I just saw this post.  Let me know if you still need some help on this.  I wrote the article you are referencing on http://www.aspnetwiki.com.  I'd like to put together a sample application to address your problem.  Just needed to make sure I am clear on the problem you are trying to solve: you want to reload the entire tabstrip based on a selection in a dropdown or you need to reload the contents of all the tabs in the tabstrip based on a selection in a dropdown?

If you have a sample application that I can start from, that would be helpful too...

Regards,

John DeVight
Tags
TabStrip
Asked by
Jeff
Top achievements
Rank 1
Answers by
John DeVight
Top achievements
Rank 1
Share this question
or