Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 734
  • Last Modified:

Disappearing Jquery Tabs When Postback Occurs

hi

I have a homePage.aspx with the tabs ,the content aspx pages are loading fine but when the postback occurs all the tabs are  disappearing only the aspx page is loading. I tried giving method="Post"  and action= "HomePage.aspx " but I'm still having the same issue ,Please help me with this I can post my code if anybody needs.   Thanks in advance
0
marugangareddy
Asked:
marugangareddy
  • 4
  • 4
2 Solutions
 
HainKurtSr. System AnalystCommented:
how do you load jquery tabs?
0
 
HainKurtSr. System AnalystCommented:
create a test page (with jquery tabs and method=post, aspx page)
or post a test link that demonstrates this behaviour
0
 
marugangareddyAuthor Commented:
thanks for u r reply

Here is my HomePage which has tabs


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

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

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
    <link type="text/css" href="jquery-ui-1.8.9.custom.css" rel="stylesheet" />      
            <script type="text/javascript" src="jquery-1.4.4.min.js"></script>
            <script type="text/javascript" src="jquery-ui-1.8.9.custom.min.js"></script>
            
            <link type="text/css" href="StyleSheet.css" rel="stylesheet" />      
             <script type="text/javascript">
            $(document).ready(function()
             {
            $("#tabs").tabs();
 
                   
 
            });
        </script>

</head>
<body>
    <form id="form1" runat="server" >
    <div>
   
    <div id="tabs">

<ul>

     
         <li><a href="WebForm3.aspx"><span>Webform3</span></a></li>
       
</ul>  
</div>
   
   
    </div>
    </form>
</body>
</html>



My aspx page with action= Homepage.aspx




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

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

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
   
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

        <link href ="StyleSheet.css" rel="stylesheet" type="text/css" />        
            <link type="text/css" href="jquery-ui-1.8.9.custom.css" rel="stylesheet" />      
            <script type="text/javascript" src="jquery-1.4.4.min.js"></script>
            <script type="text/javascript" src="jquery-ui-1.8.9.custom.min.js"></script>      
            
            <script type="text/javascript">
            // Accordion control
        $(document).ready(function()
                {
                    $( "#accordion1" ).accordion({ animated: 'bounceslide' }); // simple accordian with animation
                    $( "#accordion1" ).accordion( "option", "active", 0 );// 0 based index
                }
            );


</script>

</head>
<body>
    <form id="form1" runat="server" method="post" action="Home.aspx">
    <div>
    <table>
 <tr>
 <td class="LabelColumns"    ><asp:Label ID="Label23" Text="Description:" runat="server"  CssClass="controlMenuHeaderCell"></asp:Label></td >
 
 <td class="ControlColumns"><asp:TextBox ID="txtDescription" runat="server"  Width="350px" CssClass="Controlcss"></asp:TextBox></td>
 
 </tr>
 <tr>
 <td class="LabelColumns"   ><asp:Label ID="Label24" Text="Comments:" runat="server"  CssClass="controlMenuHeaderCell"></asp:Label></td >
 
 <td class="ControlColumns"><asp:TextBox ID="txtComment" runat="server" Width="350px" CssClass="Controlcss"></asp:TextBox></td>
 
 </tr>
 
 </table>

 <table>
 <tr>
 <td class="LabelColumns" ><asp:Button ID="cmdUpdate" Text="" runat="server" CssClass="SaveButtonStying" ToolTip="Save" /> </td>
 <td></td></tr>
 </table>

 

    </div>
    </form>
</body>
</html>




try to click on button and see the behaviour the Tabs are disappearing




0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
HainKurtSr. System AnalystCommented:
ok got it now...

you have home page, with a jQuery tab
This jQuery Tab is loading some aspx pages into some div elements...
when you post one of the page, it replaces whole window... which is what is expected behaviour...

not sure but you may try iFrames for each tab

<li><a href="WebForm3.aspx"><span>Webform3</span></a></li>

-->

<li><iFrame src="WebForm3.aspx">No Iframe</iFrame></li>
0
 
HainKurtSr. System AnalystCommented:
or something like this:

<div id="tabs">
    <ul>
        <li><a href="#iFrame1"><span>One</span></a></li>
        <li><a href="#iFrame2"><span>Two</span></a></li>
        <li><a href="#iFrame3"><span>Three</span></a></li>
    </ul>

    <iFrame id="iFrame1" src="WebForm1.aspx">No Iframe</iFrame></li>
    <iFrame id="iFrame2" src="WebForm2.aspx">No Iframe</iFrame></li>
    <iFrame id="iFrame3" src="WebForm3.aspx">No Iframe</iFrame></li>
</tabs>
0
 
marugangareddyAuthor Commented:
Thanks for u r reply again

After i use iframes the screen  is like this

which is not really good is there any other solutions


Find the image please  Scrren after iframes used
0
 
marugangareddyAuthor Commented:
I am sorry HainKut

Now I use the Iframes in my HomePage.aspx, I have accordion controls in my sub pages. I use no scrolling in Iframes and gave style and width as 100% here when I  open my subpages the accordions are not expanding I tried giving different sizes but it didn't work for me can u help me please
0
 
marugangareddyAuthor Commented:
Thank you Hainkurt for u r answer this was really helped me a lot
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 4
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now