?
Solved

Disappearing Jquery Tabs When Postback Occurs

Posted on 2011-03-21
8
Medium Priority
?
732 Views
Last Modified: 2012-05-11
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
Comment
Question by:marugangareddy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
8 Comments
 
LVL 57

Expert Comment

by:HainKurt
ID: 35183143
how do you load jquery tabs?
0
 
LVL 57

Expert Comment

by:HainKurt
ID: 35183153
create a test page (with jquery tabs and method=post, aspx page)
or post a test link that demonstrates this behaviour
0
 

Author Comment

by:marugangareddy
ID: 35183305
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
Certified OpenStack Administrator Course

We just refreshed our COA course based on the Newton exam.  With 14 labs, this course goes over the different OpenStack services that are part of the certification: Dashboard, Identity Service, Image Service, Networking, Compute, Object Storage, Block Storage, and Orchestration.

 
LVL 57

Expert Comment

by:HainKurt
ID: 35183442
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
 
LVL 57

Assisted Solution

by:HainKurt
HainKurt earned 2000 total points
ID: 35183504
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
 

Accepted Solution

by:
marugangareddy earned 0 total points
ID: 35183624
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
 

Author Comment

by:marugangareddy
ID: 35191749
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
 

Author Closing Comment

by:marugangareddy
ID: 35221281
Thank you Hainkurt for u r answer this was really helped me a lot
0

Featured Post

Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to build a simple, quick and effective accordion menu using just 15 lines of jQuery and 2 css classes
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question