473,671 Members | 2,224 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 2658
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
5442
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 if i click a link $_SERVER returns the value I want and the session id. Any ideas as to how I can get the $_SERVER to return the arguments on first page load?
0
2514
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 of an aspx page and the presentation of the page to the user? 2~ is it true that the engine takes data from the Request.Form and puts them
2
4992
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 Page Load of a main ASPX page. Now if we debug the MyTextBox, we find the order of events like so (during a Posback, of course): OnInit -> OnLoad -> LoadPostData. My question is why does the LoadPostData occur *after* the OnLoad instead of...
7
3945
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, correctly. However, when I click on a menu item in that page, it then executes the same page load twice, before transferring control (via a response.redirect) to the new page. On the first pass through the page load of the menu page, the session...
7
23337
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 the user control I do things like read from the database on the first load, set some internal variables, ... If I need those things to be available to me on the page load, should I do them on page_init? Are there any ramifications of using...
3
1689
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 confirmation, which is being send once the last page in Order Process displayed (Receipt page). Shopper is allowed to refresh that page since the data has been inserted on the previous page. The only problem I have is that the email is being sent every time...
1
2824
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
4006
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 simple. When I select a value, I get it, insert something into the database with that value and the page loads again with different data. Imagine a questionnaire and every page load a random question would be load on screen and when the user clicks...
6
2597
by: sattu | last post by:
i want to store value of querystring("id") when page postback
3
21121
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
8472
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8390
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8596
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8667
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7428
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6222
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5690
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2806
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 we have to send another system
2
2048
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.