473,511 Members | 17,486 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to disable the Jqueryui dialogbox when the page loads the second time

6 New Member
Hi,
i have created a jquery ui dialogbox at my masterpage,so in my site dialogbox appears in all the pages, I close the dialogbox using clickevent after that when i go to next page dialogbox again open.once i close the dialogbox it should not open at next pageload .please give me some idea for this to do.
How can i do this??

This is my jquery code:

Expand|Select|Wrap|Line Numbers
  1.     <script type="text/javascript">
  2.  
  3.         $(document).ready(function () {
  4.  
  5.             $("#dialog").dialog({ modal: false, resizable: false,
  6.                 bgiframe: true, draggable: false, position: ['right', 'bottom'], height: 150, width: 300
  7.             });
  8.  
  9.  
  10.             $("#<%=btnCancel.ClientID%>").click(
  11.             function () {
  12.                 $("#dialog").dialog('close');
  13.                 return false;
  14.  
  15.  
  16.             });
  17.  
  18.  
  19.             $("#<%=btnyes.ClientID%>").click(
  20.             function () {
  21.                 var url = ".....";
  22.                 $(location).attr('href', url);
  23.                 return false
  24.             });
  25.  
  26.  
  27.             // To Store
  28.  
  29.  
  30.  
  31.         });
  32. </script>


this is my design code:

Expand|Select|Wrap|Line Numbers
  1. <div id="dialog" title="How Are We Doing?" style="width:500px; margin:0 0;" background-color="white">
  2.  
  3.      <asp:Label ID="Label1" runat="server" Text="Please take a minute to give us your feedback…MICROMO.com’s User Feedback Program."></asp:Label>
  4.     </br></br>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp<asp:Button ID="btnyes"  runat="server" Text="YES" BackColor="#0099cc" width="40px" ForeColor="White" Font-Bold="true" />
  5.     &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp<asp:Button ID="btnCancel" runat="server" Text="NO"  width="40px" BackColor="#0099cc" ForeColor="White" Font-Bold="true"/>
  6.  
  7. </div>
Apr 14 '12 #1
3 2652
johny10151981
1,059 Top Contributor
Solution:
don't put it in the master page.
put it in there desired page only from where you want to execute.

but if the starting page can be anywhere then i would suggest you to keep a session data to know if you already showed it or not
Apr 16 '12 #2
preethi 123
6 New Member
Hi
If i add that in masterlayout the popup will shown in all the pages but once i click the no button It will not shown anymore for that I have to use session But in jquery we cant set session value.

so i use the code behind in masterlayout as
Expand|Select|Wrap|Line Numbers
  1. <script runat="server">
  2.  protected void btnCancel_Click(object sender, EventArgs e)
  3.     {
  4.       Session["sesvalue"] = 1;
  5.  
  6.     }
  7. </script>
  8.  
but clicking on the no button these function is not fire
How to call serverside function by clicking button in jquery uidialogbox?
Please help me...
Apr 16 '12 #3
johny10151981
1,059 Top Contributor
in jquery we cannot set session value, but we can preset session value and

as example:

Expand|Select|Wrap|Line Numbers
  1. <?php
  2. $_SESSION['data']='some data';
  3.  
  4. ?>
  5. <script>
  6. var Session_value='<?php echo $_SESSION['data'];?>';
  7. </script>
  8. <?php
  9.  
  10. ?>
rest is up to you
Apr 17 '12 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

6
5426
by: user | last post by:
when i first load index.php with arguments ie: "index.php?page=x", the $_SERVERvalue is null. I then get the session id appended to each link. If i refresh the page, I get the $_SERVER I want, but...
0
2500
by: Frank 'Olorin' Rizzi | last post by:
Hello everyone. This is quite convoluted, but I'll try to make it simple. I have a couple of bottom-line questions (I guess): 1~ what happens between the Page_Load routine in the code behind...
2
4977
by: Sam | last post by:
I have a custom control (MyTextBox - taken from Microsoft website) that implements the IPostBackDataHandler interface. It is added to the controls collection of a placeholder control during the...
7
3941
by: Goober | last post by:
I have a page that receives a session variable from the default.aspx. On Page load, the code in Page load gets executed twice. So far, no problem. It sets the session variable each time,...
7
23321
by: UJ | last post by:
I've got a page with a user control on it. While the page is loading, it needs to check certain conditions of the user object to enable/disable things on the screen. Currently in the page_load of...
3
1687
by: Tatyana | last post by:
Hello, I was wondering if anybody knows how to disable Email Sending on Page Refresh. When shopper submits the order he/she is being redirected to the receipt page and gets the email...
1
2802
by: vssp | last post by:
hai friends How to paly song when page laod using php code? I my php application when i load the home page automatically pale song Its possible !! ??Please give me any idea Thanks vssp...
2
3993
by: ricardo.sobral.santos | last post by:
Hello, I am trying to get the value of the radiobuttonlist. The problem is that I need it to be unselected at every page load. The radiobuttonlist is set to autopostback (true). My idea is...
6
2579
by: sattu | last post by:
i want to store value of querystring("id") when page postback
3
21047
by: GauravGupta | last post by:
i want to know that is it posible to call button click event before page load event on post back.... please help me....
0
7245
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7144
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7356
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7427
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7085
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5671
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3227
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1577
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
449
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.