MVC :: Jquery Tabs - Second And Third Tabs Do Not Fire Any Event On Button Click?

May 24, 2010

I have created an asp.net applications in which i am using jquery tabs to show say profile modifications information. I want user to see his profile info as well as he will be able to edit his details and save the information. for this purpose i have created an aspx page "MyProfile.aspx" and 3 ascx pages

say "page1", "page2" and "page3".

When i run "MyProfile.aspx" i can see all 3 tabs showing correct information. But problem is when i edit contents and try to save them back to the database. Contents on page1 are stored correctly. But page2 and page3 doest not fire any event. In all 3 pages I am using ajax n jquery to save data to database. and when i try to save contents of page2 and page3 nothing occurs.I am showing 3 tabs there of which first tab edits save the details but second and third tabs do not fire any event on button click.

View 12 Replies


Similar Messages:

Radio Button Selection On Jquery Tabs Label Click

Jan 12, 2010

I had a simple working (ASP.NET) Scenario here: 3 asp:RadioButtons that each have OnCheckedChanged event that will update an asp:gridview. But now, I want to put some description for each radiobutton selection,and I thought it would be a good idea to embed them in JQuery UI Tabs like the following :

<div id="tabs">
<ul>
<li><a href="#tabs-1">
<asp:RadioButton ID="RadioButton1" runat="server" Text="option1" Checked="True"
AutoPostBack="True" OnCheckedChanged="RadioButton_CheckedChanged" /> </a></li>
<li><a href="#tabs-2">
<asp:RadioButton ID="RadioButton2" runat="server" Text="option2"
AutoPostBack="True" OnCheckedChanged="RadioButton_CheckedChanged" /></a></li>
<li><a href="#tabs-3">
<asp:RadioButton ID="RadioButton3" runat="server" Text="option3"
AutoPostBack="True" OnCheckedChanged="RadioButton_CheckedChanged" /></a></li>
</ul>
<div id="tabs-1"> <p> content1</p> </div>
<div id="tabs-2"> <p> content2</p> </div>
<div id="tabs-3"> <p> content3</p> </div>
</div>
and the jquery is
<script type="text/javascript">
$(function() {
$("#tabs").tabs();
});
</script>

I want the corresponding radiobuttons for each tabs be selected after switching to that tab (by clicking anywhere inside that tab) I don't know how to that probably by JQuery or JavaScript

Generated HTML source :
<div id="tabs" class="ui-tabs ui-widget ui-widget-content ui-corner-all">
<ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
<li class="ui-state-default ui-corner-top ui-tabs-selected ui-state-active"><a href="#tabs-1">
<input type="radio" checked="checked" value="RadioButtonCart" name="ctl00$ContentPlaceHolder1$g2" id="ctl00_ContentPlaceHolder1_RadioButtonCart"/><label for="ctl00_ContentPlaceHolder1_RadioButtonCart">option1</label></a></li>
<li class="ui-state-default ui-corner-top"><a href="#tabs-2">
<span style="color: Green;"><input type="radio" onclick="javascript:setTimeout('__doPostBack('ctl00$ContentPlaceHolder1$RadioButtonShetab','')', 0)" value="RadioButtonShetab" name="ctl00$ContentPlaceHolder1$g2" id="ctl00_ContentPlaceHolder1_RadioButtonShetab"/><label for="ctl00_ContentPlaceHolder1_RadioButtonShetab">option2</label></span></a></li>
<li class="ui-state-default ui-corner-top"><a href="#tabs-3">
<input type="radio" onclick="javascript:setTimeout('__doPostBack('ctl00$ContentPlaceHolder1$RadioButtonFish','')', 0)" value="RadioButtonFish" name="ctl00$ContentPlaceHolder1$g2" id="ctl00_ContentPlaceHolder1_RadioButtonFish"/><label for="ctl00_ContentPlaceHolder1_RadioButtonFish">option3</label></a></li>
</ul>
<div id="tabs-1" class="ui-tabs-panel ui-widget-content ui-corner-bottom">
<p> content1</p>
</div>
<div id="tabs-2" class="ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide">
<p> content2 </p>
</div>
<div id="tabs-3" class="ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide">
<p> content3 </p>
</div>
</div>

I solved 2 problems with adding ids to anchors like id="tabsA-1" and simulating the postback for

OnCheckedChanged="RadioButton_CheckedChanged" with $("#aspnetForm").submit();
<script type="text/javascript">
$(document).ready(function() {
$("#tabsA-1").click(function() {
$("#<%=RadioButtonCart.ClientID %>").attr("checked", "checked");
$("#aspnetForm").submit();
});
});
</script>

I just have to find a way to select the right tab after postback and my problem is solved.

<script type="text/javascript">
$(function() {
var $tabs = $("#tabs").tabs();
$tabs.tabs('select', '<%= selectedTabIndex %>');
});
</script>

which selectedTabIndex is a public string var in code_behind and i update its value in page_load. one funny problem was that the .tabs( 'select' , index ) in JQuery is not zero-based index of the tab as the official site said and it start from 1.

View 2 Replies

AJAX :: Tabs With JQuery Carousel / The First One Displayed On The Page Always Works. But Any Other Tabs Dont Work When I Select The Tab

Feb 14, 2011

I have been adding different JQuery Carousels to AJAX Tabbed Panels - the first one displayed on the page always works. But any other tabs dont work when I select the tab. I have about a dozen different carousels.

Can anyone recommend one that works in AJAX Tabs or how I can go about rectifying this?

View 1 Replies

AJAX :: Creating Tabs With A Button Click?

Feb 4, 2010

I am trying to use a button to dynamically create a brand new tab every time i click it and load a control in there. I'm starting on the tab creation so far. I have on my aspx page, an update panel and a tab container control to handle it. The issue I am having is that the button will only create one tab no matter how many times I click

[Code]....

my container is named Tabs.

EDIT:The whole code pasting doesn't work well

View 2 Replies

JQuery :: Link Button OnClick Event Does Not Fire On First Click After Jquery Drag And Drop?

Dec 24, 2010

I have a link button in a repeater control. the li element is drag and droppable using jquery. when the page loads the the link button works perfectly, the jquery that is attached and the server side code both execute. when I perform a drag and drop then click on the link button it doesnt not fire. when i click it a second time it does fire. If i perform 2 or drag and drops in a row the link button doesnt fire a as many drag adn drops as i before it will fire. for example if if perform 3 drag and drops then it will take about 3 click before the events are fired.

[Code]....

View 4 Replies

AJAX :: Navigate Tabs Next Previous On Button Click Server Side

Sep 4, 2013

I am using ASP.Net AjaxControllTookit Tab Container and I have 9 tabs , on each tab panel i have some asp elements and a "prev" and "next" asp buttons. How to navigate next or prev on these asp buttons clicks.

I already try the c# code :

TabContainer1.ActiveTab = TabContainer1.Tabs[2];

View 1 Replies

Forms Data Controls :: Iterate Through Row Data From Sqldatabase In A Tab Container (with Tabs) On A Button Click

Feb 24, 2010

I have sqldatabase tables.I am reading table data and putting in a tabconatiner(wth tabs containing textbox, checkbox etc) specific to a client. If a client has more than one row i want to iterate through the rows and read each row data. Basically I want to use a button-click to read the next row data at put it in the tabs and so on. I used sqldatareader and a while loop.I can read the data but while loop iterates through the rows and show the last row data / i want to use a button to go to the next row and show data.

SqlDatareader reader=null;
reader=cmd.ExecuteReader();
while(reader.Read())
{
txtboxName.Text=reader["Name"].ToString();
}
protected button_Click(Object sender,EventsArgs e)
{
//I want to read row data in this button click
}

View 8 Replies

Web Forms :: Button Click Event Doesn't Fire On First Click?

Mar 24, 2011

I have to click twice on button control to fire an event.

View 6 Replies

C# - Button Event Handlers Do Not Fire On The First Click But On The Second Click After A PostBack

May 4, 2010

Background: I am customizing an existing ASP .NET / C# application. It has it's own little "framework" and conventions for developers to follow when extending/customizing its functionality. I am currently extending some of it's administrative functionality, to which the framework provides a contract to enforce implementation of the GetAdministrationInterface() method, which returns System.Web.UI.Control. This method is called during the Page_Load() method of the page hosting the GUI interface.

Problem: I have three buttons in my GUI, each of which have been assigned an Event Handler. My administration GUI loads up perfectly fine, but clicking any of the buttons doesn't do what I expect them to do. However, when I click them a second time, the buttons work.

I placed breakpoints at the beginning of each event handler method and stepped through my code. On the first click, none of the event handlers were triggered. On the second click, they fired.

Example of Button Definition (within GetAdministrationInterface)

[Code]....

View 2 Replies

Dropdown Selected Change Event Fire On Button Click Event?

Sep 24, 2010

I have write the code in .Net. When I click the Buttun then fired below event.

protected void ddldesignation_SelectedIndexChanged(object sender, EventArgs e)
{
Code.
}

View 1 Replies

Use Vertical Tabs With Jquery?

Jun 1, 2010

how to use vertical tabs with jquery. In my web site i want to use partial views i implemented it with jquery horizontal tabs but i want it with vertical tab as my links are in right side. so any one know the solution plz tel me. I am using asp.net mvc application

View 1 Replies

Ajax Tabs - Is It Possible To Use Sub Tabs

Apr 8, 2010

Does Ajax Tab support using sub tabs (or children tabs)?I have a project where I need to show several tabs like "Sales" "Production" "Revenue" and when I click on for example "Sales" I would like to see a new tab tab with "Currentales", "History", "Comparison" etc etc. and be able to click each one of these for further processing.

View 3 Replies

Create Tabs Which Also Have Sub-tabs?

Mar 9, 2011

I would like to create two tabs called Info and place. However when the mouse is over the info tab, all the sub-tabs associated with it will show-up and in this case, the sub-tab will be report_1 and report_2 and also when the mouse is over the place tab, all the sub-tabs associated with place will show up and in this case, the sub-tab will be place_report_1 and place_report_2. how do I go about doing this?

View 5 Replies

Jquery Tabs Won't Select From The Index

Apr 15, 2010

I am using ASP.NET page with updatepanels and Jquery UI tabs. However, I'm having a problem with it. When I click on a button it should set the value of a hidden field which when the page posts back, it will select the new tab. So in document onload set the tab to the initialised value of the hidden field:

$(function()
{
var loadTab = $("#<%= hidTabSelected.ClientID %>").val();

$('#dvJqTabs').tabs(
{ selected: loadTab ,
select: saveTab
}
)
});

Now when I want to change the tab, in the ASP.NET page button click handler I do some processing and finally set hidTabSelected = 1 (previously 0). When the page posts because I am in UpdatePanels I won't get a doc ready event. So instead I intercept the pageLoad() and attempt to set the tab again:

function pageLoad()
{
alert('pageLoad()');
var loadTab = $("#<%= hidTabSelected.ClientID %>").val();
$('#dvJqTabs').tabs( { selected: loadTab } );
}

The tab is not getting selected? If I go into console of firebug and inspect $("#hidTabSelected").val() I get 1. So why isn't the 2nd tab showing?

View 2 Replies

Jquery UI Tabs Only Reload The Tab Contents

Jun 10, 2010

<div id="example">
<ul>
<li><a href="ahah_1.aspx"><span>Content 1</span></a></li>
<li><a href="ahah_2.aspx"><span>Content 2</span></a></li>
<li><a href="ahah_3.aspx"><span>Content 3</span></a></li>
</ul>
</div>

I am using Jquery ui tabs in Ajax mode. When my page ahaha_1.aspx postbacks my main page dissapears and I am redirected to ahaha_1.aspx. How do I get it to only reload the tab and not the entire page.

View 2 Replies

MVC :: Disbale Jquery Tabs Within Controller?

Aug 17, 2010

I am using a jquery tab control with multiple tabs. I want to do some actions in my controller and depending on those actions i want to disable or enable the tabs.

View 1 Replies

Having To Click A Button Twice To Fire Event?

Oct 15, 2010

I have a Web Form that contains a Web Control. This control has several buttons on it and one in particular requires that I click it twice before the Click Event fires. The settings are all the same for the buttons but just not sure what to look for.

View 7 Replies

JQuery :: JavaScript Attached To Cancel Button (HTML Button) Click Doesn't Fire

Jun 20, 2010

I have a LoginView element in an Update panel and use JQuery to hide the div containing the update panel when the cancel button(Html) is clicked.

It works fine normally. However, when I enter an invalid password and there is an error message displayed, the Javascript attached to the Cancel button click stops firing.

[code]....

View 2 Replies

Button Click Event Fire Only On Second Click?

Sep 14, 2010

In ASP.NET My button click event doesn`t work on first click. But it works on the second click only.

View 1 Replies

JQuery :: Click Event Doesn't Fire After Postback?

Aug 14, 2010

I have a small website where I want to display a confirmation dialog after clicking on a button.

When you click the confirmButton the dialog appears. Then you can choose between Yes or No to either continue with the PostBack or to return.

Problem: The first time you get into the site all works fine. But after you click Yes to continue with the PostBack, no click event will be triggered anymore.

Here is some code.

[Code]....

View 8 Replies

Jquery Tabs Not Loading Partial Views In IE 8

Feb 3, 2011

Scenario: Loading partial views into jquery tabs(Ajax Mode) using MVC3 &Razor . Works fine in FF but not in IE8 or IE7. I can trace the ajax request & responses in firebug fine and see partial views returned from the server (containing JqGrid Html Helper methods).This loads up fine within the tab conatiners in firefox.But in IE nothing happens and i cant see any ajax requests getting fired from changing tabs when i use Fiddler.Ive tried playing around with the ajaxOptions when i initialize jq Tabs to no avail.

Ive had this problem on MVC2 and i resorted to laying the tabs contents out statically ,which i dont want this time, as i need lazy loading. Below is a full page source dump from IE8, renedered using the razor view engine. (Links to all Csss and JS libs)

<script type="text/javascript">
$(document).ready(function () {
$("#tabs").tabs();
});
</script>
</head>
<body>
<h2>Index</h2>
<div id="tabs">
<ul>
<li><a href="/"><span>Home</span></a> </li>
<li><a href="/ServicesMonitored/GetServicesMonitoredTab"><span>Monitored Services</span></a> </li>
<li><a href="/ServicesMonitored/GetServicesFullTab"><span>Full Services</span></a></li>
</ul>
</div>
</body>
</html>
From Controller:
public class ServicesMonitoredController : Controller
{
IServicesMonitoredRepository<ServiceHeaderInfo,InfoDataItem> Services;
public ServicesMonitoredController() {
Services = new ServicesMonitoredRepository();
}
public ActionResult GetServicesMonitoredTab()
{
return PartialView("ServicesMonitoredTab");
}
public ActionResult GetServicesFullTab()
{
return PartialView("ServicesFullTab");
}
#region Return Services
[HttpPost]
public JsonResult ReturnServices(string sidx, string sord, int page, int rows)
{
}

View 1 Replies

MVC :: Jquery Tabs And Posting Its Data To Controller

May 14, 2010

I am using asp.net mvc 1.0. In this I have to create an UI for modifying the profile of the user. Now this modfiy profile will contain jquery tabs. and each jqeury tab will show some results such as user's personel information, professional info, etc on seperate tabs. I also want to give user ability to modify the fields and save this modified data. I am just not getting any idea how to do that. I have searched on internet for various jquery examples. most of them are just showing data to user by creating some partial views. Also i am not getting exactly how this functionality can be achieved through ajax on click of button.

View 1 Replies

Update Panel Not Working With Jquery Tabs?

Oct 14, 2010

I am using JQuery tabs in my aspx page, but update panel is not working. If I do any operation in tab2, after posting back, tab1 is activated.

View 1 Replies

JQuery :: Make Tab Element With Tabs In A Few Rows Because In One Row Does Not Fit

Jun 16, 2010

I need to make JQuery Tab element, with tabs in a few rows, because in one row does not fit!

View 6 Replies

AJAX :: Jquery Tabs Do Lazy Loading?

Jul 9, 2010

At present I am using ajax:TabContainer for the tabs. As you know that does not do Lazy loading. Can sonone give me links to or some code examples to do Tabs with Lazy loading. I know that the Jquery tabs do lazy loading but there are no complete examples on the web which tells you on how to do lazy loading with JQuery tabs.

View 4 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved