Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8265373
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T04:46:37+00:00 2026-06-08T04:46:37+00:00

I have the following code….. <head> <script src=Scripts/jquery-1.7.2.min.js type=text/javascript></script> <script src=Scripts/hidepanel.js type=text/javascript></script> </head> <body>

  • 0

I have the following code…..

<head>
<script src="Scripts/jquery-1.7.2.min.js" type="text/javascript"></script>
<script src="Scripts/hidepanel.js" type="text/javascript"></script>
</head>
<body>
    <div id="outboundForm">
    <p>
        <asp:Button ID="btnSubmit" ClientIDMode="Inherit" runat="server" TabIndex="17" CssClass="btnSubmit"
            OnClick="btnSubmit_Click" meta:resourcekey="btnSubmitResource1" />
        <asp:Button ID="btnReset" runat="server" CssClass="btnReset" OnClick="btnReset_Click"
            meta:resourcekey="btnResetResource1" />
    </p>
</div>
<div id="MailPreviewDiv">
    <asp:Label ID="lblPreview" runat="server" Visible="false" Text="" />
</div>

my hidepanel.js looks like this….

$(document).ready(function () {
    d = new Date();
    d = d.getTime();
    if ($('#reloadValue').val().length == 0) {
        $('#reloadValue').val(d);
        $('#MailPreviewDiv').
    } else {
        $('#reloadValue').val('');
    }

    $('#MainContent_btnSubmit').click(function () {
        $('#outboundForm').hide("slow");
        $('#MailPreviewDiv').show("slow");
    });
});

Now, by default i would like MailPreviewDiv to be hidden and ONLY when i click btn_submit do i want the MailPreviewDiv to be seen. this works fins with traditional HTML but as soon as i add this to .NET crazy things happen. When i click submit i can see the transition take place but then i am left with both div’s still being displayed and the outboundForm div is still visible.

What i have observed is that the javascript even gets fired and then after my .net mouse click even is fired, after which i can see a transition and am left with both div’s visible. Can anybody offer some advice please…

This may have something to do with a partial postback happening but i am not sure….

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T04:46:39+00:00Added an answer on June 8, 2026 at 4:46 am

    You page is performing a postback so all html elements immediately loose the jquery effect. You need to register the js code in server side after the postback with RegisterStartupScript
    http://msdn.microsoft.com/en-us/library/z9h4dk8y.aspx

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have following code: div.accountPage div.acct-form.login div.acct-header Log-in form.loginForm.login input(id=username, type=text, name=User, placeholder=Username, value=)
I have following code <!DOCTYPE html> <html> <head> <title>jQuery goes to DOM-ville</title> <style> #change-me
I have following code. ASPX Page <a href=AnyASPXPageOfWebsite.aspx onclick=javascript:CallJQuery(); > Set Price </a> JS
I have following code which call a task after every 20 min and its
I have following code in VS2008 If Linq.Enumerable.Contains(Of String)(selectedUsersRoles, RoleCheckBox.Text) Then RoleCheckBox.Checked = True
I have following code: INPUT Input = { 0 }; Input.type = INPUT_KEYBOARD; Input.mi.dwFlags
I have following code in initialization im = imread('Image02.tif'); figure(); imagesc(im); colormap(gray); [hImage hfig
I have following code <div id=main> <div id=one> </div> <div id=two> </div> <div id=three>
I have following code for updating user's column public void UpdateLastModifiedDate(string username) { using
I have following code for loading image from url in xml parsing endElement method

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.