Opened 9 years ago

Closed 9 years ago

#7721 closed bug (notabug)

3.6 ...follow a tab's URL instead of loading its content via ajax

Reported by: spindlegoose Owned by:
Priority: minor Milestone: 1.9.0
Component: ui.tabs Version: 1.8.16
Keywords: Cc:
Blocked by: Blocking:

Description

I have two asp.net pages and I am using the tabs widget to navigate to the page but when I click on tab to go to the other page it calls it via ajax first then redirects to the page instead of going straight to the page.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Test1.aspx.cs" Inherits="JqueryTabs.Test1" %>

<!DOCTYPE html PUBLIC "-W3CDTD XHTML 1.0 TransitionalEN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server">

<title></title> <link type="text/css" href="css/south-street/jquery-ui-1.8.16.custom.css" rel="stylesheet" /> <script type="text/javascript" src="js/jquery-1.6.2.min.js"></script> <%--<script type="text/javascript" src="js/jquery-ui-1.8.16.custom.min.js"></script>--%> <script type="text/javascript" src="js/jquery.ui.core.js"></script> <script type="text/javascript" src="js/jquery.ui.tabs.js"></script> <script type="text/javascript" src="js/jquery.cookie.js"></script> <script type="text/javascript">

$(function () {

var tab_cookie_id = parseInt($.cookie("tab_cookie_2"))
0;

Tabs $('#tabs').tabs({

selected: tab_cookie_id, select: function (event, ui) {

$("div.ui-tabs-panel").html(""); var url = $.data(ui.tab, "load.tabs");

if (url) {

$.cookie("tab_cookie_2", ui.index); location.href = url;

}

}

});

});

$("div.ui-tabs-panel").html("");

</script>

</head> <body>

<form id="form1" runat="server"> <div id="tabs">

<ul>

<li><a href="#local" id="Index" runat="server">Test 1</a></li> <li><a href="Test2.aspx" id="Index2" runat="server">Test 2</a></li>

</ul> <div id="local">

</div>

</div>

</form>

</body> </html>

Change History (1)

comment:1 Changed 9 years ago by Scott González

Resolution: invalid
Status: newclosed

You're not returning false like the FAQ tells you to. Also, please read the red notice box and do not dump code into a ticket.

Last edited 9 years ago by rdworth (previous) (diff)
Note: See TracTickets for help on using tickets.