Search Results

Search found 28345 results on 1134 pages for 'custom event'.

Page 46/1134 | < Previous Page | 42 43 44 45 46 47 48 49 50 51 52 53  | Next Page >

  • How to get the Blur event to fire for the document on the iPhone?

    - by Ian Storm Taylor
    Does anyone know how to get the blur event to fire on the document for the iPhone? I'm trying to get it to fire either when a user changes windows in Safari, or when they open their bookmarks or when they decide to add the page to their homescreen. But none of these are firing it. Here's my code: $(document).blur( function () { document.title = "Ian Taylor"; }); I've tried "document", "window", "'body'". Nothing seems to work.

    Read the article

  • What event do I need to supress to stop IE from "Dinging" when I press enter in a text box?

    - by scunliffe
    On simple forms with one text box pressing enter submits the form (and this is great for easy search forms) However on a form with multiple fields, pressing Enter in an input="text" box won't do anything (e.g. submit) but in IE it "Dings" as if you have tried to delete an undeletable object. The question is... what event do I need to suppress in IE to stop this sound? e.g. if I have a username/password form, I DO want the enter key to submit the form, but I certainly don't want the "error" sound. Example site with the sound: http://www.sears.com/shc/s/StoreLocatorView?storeId=10153&catalogId=12605 Just press Enter in any of the text fields. Ding!, Ding!, Ding! Non-IE users, the sound is the: Program Events Windows Default Beep ("Windows XP Ding.wav")

    Read the article

  • Shortest way of attaching multiple DOM elements to one event handler using Jquery?

    - by Camsoft
    I need to attach a single event handler to multiple DOM elements using jQuery. I'm currently achieving this using jQuery's each() method. See below: $([elm1, elm2, elm3]).each(function() { this.click(eventHandler); }); I was wondering if there is a way to do this without using the each method and closure. I thought I would be able to do something like: $(elm1, elm2, elm3).click(eventHandler); This kind of statement works using Prototype.js but not in jQuery.The reason I ask the question is because after using both Prototype.js and jQuery I have found that jQuery requires simpler statements to achieve the same tasks in almost every area so I assume there must be a better way of doing this?

    Read the article

  • How do I bind a jQuery Tools overlay event to an existing overlay?

    - by Paul
    Say when the page loads, this code runs: jQuery(document).ready(function($){ $('#overlay').overlay( api: true ); }); How would I bind an event to it? I've tried: $('#overlay').onBeforeLoad( function(){ alert('Hi'); }); $('#overlay').bind( 'onBeforeLoad', function(){ alert('Hi'); }); var api = $('#overlay').data('overlay'); api.onBeforeLoad(function(){ alert('Hi') }); When I do: alert(api.getContent().attr('id')); An alert pops up with '#overlay' inside. When the overlay is open and I run: alert(api.isOpened()); An alert pops up with 'false' inside. Thanks in advance.

    Read the article

  • jQuery: How to fire event when all asynchronous calls return?

    - by Jeremy
    I have a jQuery application that loads data from five asynchronous server calls. I do not want to display any data until all five calls return. (I plan on displaying a Loading message until that happens.) How can I detect when all five calls have returned? I considered having each callback method increment a variable (using jQuery's data() method, perhaps) and then waiting for the value to become 5. (I am not sure yet how I would listen for that event.) I do not think this is a very good solution, however. What would happen if two calls return at the same time? Is there a better way to do this?

    Read the article

  • Whats the best way/event to use when testing if the textbox text has finished a change of text

    - by Spooky2010
    using winforms, c#, vs 2008 So i have textbox1, textbox2 and textbox3 on a winforms. Textbox3.text = textbox1.text + textbox2.text. I need textbox3 to be updated whenever the contents of textbox1 and textbox2 have been changed either manually or programmatic. The problem is if i use textbox textchanged event it keeps firing as one types in the textbox. I need a way to call my method to fill textbox3 after either tb1 or tb2 have been FINISHED changing programmaticly or via key entry, and not fire everytime a letter of text is entered. How can I have TextBox3 update only when tb1 or tb2 have finished changing?

    Read the article

  • [C#] How to consume web service adheres to the Event-based Asynchronous Pattern?

    - by codemonkie
    I am following the example from http://msdn.microsoft.com/en-us/library/8wy069k1.aspx to consume a web service implemented (by 3rd party) using the Event-based Asynchronous Pattern. However, my program needs to do multiple calls to the DoStuffAsync() hence will get back as many DoStuffCompleted. I chose the overload which takes an extra parameter - Object userState to distinguish them. My first question is: Is it valid to cast a GUID to Object as below, where GUID is used to generate unique taskID? Object userState = Guid.NewGuid(); Secondly, do I need to spawn off a new thread for each DoStuffAsync() call, since I am calling it multiple times? Also, would be nice to have some online examples or tutorials on this subject. (I've been googling for it the whole day and didn't get much back) Many thanks

    Read the article

  • How can unrealscript halt event handler execution after an arbitrary number of lines with no return or error?

    - by Dan Cowell
    I have created a class that extends TcpLink and is instantiated in a custom Kismet Sequence Action. It is being instantiated correctly and is making the GET HTTP request that I need it to (I have checked my access log in apache) and Apache is responding to the request with the appropriate content. The problem I have is that I'm using the event receive mode and it appears that somehow the handler for the Opened event is halted after a specific number of lines of code have executed. Here is my code for the Opened event: event Opened() { // A connection was established WorldInfo.Game.Broadcast(self, "[DNomad_TcpLinkClient] event opened"); WorldInfo.Game.Broadcast(self, "[DNomad_TcpLinkClient] Sending simple HTTP query"); //The HTTP GET request //char(13) and char(10) are carrage returns and new lines requesttext = "userId="$userId$"&apartmentId="$apartmentId; SendText("GET /"$path$"?"$requesttext$" HTTP/1.0"); SendText(chr(13)$chr(10)); SendText("Host: "$TargetHost); SendText(chr(13)$chr(10)); SendText("Connection: Close"); SendText(chr(13)$chr(10)$chr(13)$chr(10)); //WorldInfo.Game.Broadcast(self, "[DNomad_TcpLinkClient] Sent request: "$requesttext); //WorldInfo.Game.Broadcast(self, "[DNomad_TcpLinkClient] end HTTP query"); //WorldInfo.Game.Broadcast(self, "[DNomad_TcpLinkClient] LinkState: "$LinkState); //WorldInfo.Game.Broadcast(self, "[DNomad_TcpLinkClient] LinkMode: "$LinkMode); WorldInfo.Game.Broadcast(self, "[DNomad_TcpLinkClient] ReceiveMode: "$ReceiveMode); WorldInfo.Game.Broadcast(self, "[DNomad_TcpLinkClient] Error: "$string(GetLastError())); } As you can see, a number of the Broadcast calls have been commented out. Initially, only the lines up to the Broadcast containing "[DNomad_TcpLinkClient] Sent request: " were being executed and none of the Broadcasts were commented out. After commenting out that line, the next Broadcast was successful and so on and so forth. As a test, I commented out the very first Broadcast to see if the connection closing had any effect: // A connection was established //WorldInfo.Game.Broadcast(self, "[DNomad_TcpLinkClient] event opened"); WorldInfo.Game.Broadcast(self, "[DNomad_TcpLinkClient] Sending simple HTTP query"); Upon doing that, an additional Broadcast at the end of the function executed. Thus the inference that there is an upper limit to the number of lines executed. Additionally, my ReceivedText handler is never called, despite Apache returning the correct HTTP 200 response with a body. My working hypothesis is that somehow after the Sequence Action finishes executing the garbage collector cleans up the TcpLinkClient instance. My biggest source of confusion with that is how on earth it does it during the execution of an event handler. Has anyone ever seen anything like this before? My full TcpLinkClient class is below: /* * TcpLinkClient based on an example usage of the TcpLink class by Michiel 'elmuerte' Hendriks for Epic Games, Inc. * */ class DNomad_TcpLinkClient extends TcpLink; var PlayerController PC; var string TargetHost; var int TargetPort; var string path; var string requesttext; var string userId; var string apartmentId; var string statusCode; var string responseData; event PostBeginPlay() { super.PostBeginPlay(); } function DoTcpLinkRequest(string uid, string id) //removes having to send a host { userId = uid; apartmentId = id; Resolve(targethost); } function string GetStatus() { return statusCode; } event Resolved( IpAddr Addr ) { // The hostname was resolved succefully WorldInfo.Game.Broadcast(self, "[DNomad_TcpLinkClient] "$TargetHost$" resolved to "$ IpAddrToString(Addr)); // Make sure the correct remote port is set, resolving doesn't set // the port value of the IpAddr structure Addr.Port = TargetPort; //dont comment out this log because it rungs the function bindport WorldInfo.Game.Broadcast(self, "[DNomad_TcpLinkClient] Bound to port: "$ BindPort() ); if (!Open(Addr)) { WorldInfo.Game.Broadcast(self, "[DNomad_TcpLinkClient] Open failed"); } } event ResolveFailed() { WorldInfo.Game.Broadcast(self, "[TcpLinkClient] Unable to resolve "$TargetHost); // You could retry resolving here if you have an alternative // remote host. //send failed message to scaleform UI //JunHud(JunPlayerController(PC).myHUD).JunMovie.CallSetHTML("Failed"); } event Opened() { // A connection was established //WorldInfo.Game.Broadcast(self, "[DNomad_TcpLinkClient] event opened"); WorldInfo.Game.Broadcast(self, "[DNomad_TcpLinkClient] Sending simple HTTP query"); //The HTTP GET request //char(13) and char(10) are carrage returns and new lines requesttext = "userId="$userId$"&apartmentId="$apartmentId; SendText("GET /"$path$"?"$requesttext$" HTTP/1.0"); SendText(chr(13)$chr(10)); SendText("Host: "$TargetHost); SendText(chr(13)$chr(10)); SendText("Connection: Close"); SendText(chr(13)$chr(10)$chr(13)$chr(10)); //WorldInfo.Game.Broadcast(self, "[DNomad_TcpLinkClient] Sent request: "$requesttext); //WorldInfo.Game.Broadcast(self, "[DNomad_TcpLinkClient] end HTTP query"); //WorldInfo.Game.Broadcast(self, "[DNomad_TcpLinkClient] LinkState: "$LinkState); //WorldInfo.Game.Broadcast(self, "[DNomad_TcpLinkClient] LinkMode: "$LinkMode); WorldInfo.Game.Broadcast(self, "[DNomad_TcpLinkClient] ReceiveMode: "$ReceiveMode); WorldInfo.Game.Broadcast(self, "[DNomad_TcpLinkClient] Error: "$string(GetLastError())); } event Closed() { // In this case the remote client should have automatically closed // the connection, because we requested it in the HTTP request. WorldInfo.Game.Broadcast(self, "Connection closed."); // After the connection was closed we could establish a new // connection using the same TcpLink instance. } event ReceivedText( string Text ) { WorldInfo.Game.Broadcast(self, "Received Text: "$Text); //we dont want the header info, so we split the string after two new lines Text = Split(Text, chr(13)$chr(10)$chr(13)$chr(10), true); WorldInfo.Game.Broadcast(self, "Split Text: "$Text); statusCode = Text; } event ReceivedLine( string Line ) { WorldInfo.Game.Broadcast(self, "Received Line: "$Line); } event ReceivedBinary( int Count, byte B[255] ) { WorldInfo.Game.Broadcast(self, "Received Binary of length: "$Count); } defaultproperties { TargetHost="127.0.0.1" TargetPort=80 //default for HTTP LinkMode=MODE_Text ReceiveMode=RMODE_Event path = "dnomad/datafeed.php" userId = "0"; apartmentId = "0"; statusCode = ""; send = false; }

    Read the article

  • How do I get my custom WPF textbox to fill correctly?

    - by Dan Ryan
    I am trying to create a custom WPF textbox control that extends the standard textbox control but the extended textbox behaves differently when placed in control containers. Within my Window I have a stackpanel with a standard textbox and my extended textbox: <StackPanel Margin="10"> <TextBox Height="21" /> <l:SearchTextBox Search="SearchTextBox_Search" Height="21" Margin="0, 10, 0, 0" SearchMode="Delayed" HorizontalAlignment="Left" /> </StackPanel> The standard textbox stretches the length of the StackPanel whereas the custom textbox does not. How can I get the controls to behave the same? The styling for the custom textbox is shown below: <Style x:Key="{x:Type UIControls:SearchTextBox}" BasedOn="{StaticResource {x:Type TextBox}}" TargetType="{x:Type UIControls:SearchTextBox}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type UIControls:SearchTextBox}"> <TextBox /> </ControlTemplate> </Setter.Value> </Setter> </Style>

    Read the article

  • How to move from custom to transluscent NavigationBar and back? Display problems!

    - by jd291
    So, i got this Navigation-based App (with a custom NavigationBar - Category) and I have 2 problems here... @implementation UINavigationBar (Custom) - (void)drawRect:(CGRect)rect { UIImage *image = [UIImage imageNamed: @"bg_toolbar.png"]; [image drawInRect:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)]; } @end Because of the Navigation-based App, most of the views have a height of 436px (= ScreenSize - NavigationBar height, as you probably know ;). I got one view similar to the photo app overview showing all the thumbnails, from there I push a viewcontroller containing the scroll view (like in photos app) on the stack, like so - (void)buttonPressed:(id)sender { UIButton *btn = (UIButton *)sender; PhotoSetScrollViewController *psc = [[PhotoSetScrollViewController alloc] initWithPhotoArray:photos andID:btn.tag]; [self.navigationController pushViewController:psc animated:YES]; } Problem 1: The view holding the fullscreen scrollview has a height of 480px which seems to be a problem because when poping the viewcontroller by hitting the back button, the view containing the thumbnails (height 436px) moves upward below the navigation bar. And also the Toolbar keeps showing. What could be the problem? Problem 2: How could I switch between my custom navigation bar and the standard black translucent style?

    Read the article

  • SQLAuthority News – Virtual Launch Event for Office 2010 – Contest – Win MS Office License

    - by pinaldave
    Office products are integral products of any PC. I accept that without Office Suites, I can not survive or make enough leaving. I am blogger and use word to create my blogs. I am SQL Server Trainer  and I use PowerPoint as my presentation tool. I am SQL Server consultant and I use Excel to keep my work log. I can not see my life with Office Tools. Just like any other Microsoft Product there is strong community following Office Tools. Please count me in. The same community is hosting a Virtual Launch Event for Office 2010 on May 25 and 26th. The webcasts is FREE to attend and people can take part either online or by going to the nearest available center. The sessions will be delivered by MVPs. To register please visit: http://www.meraoffice.com. In June, limited cities will be hosting Community Launch Events for Office 2010. At the launch events, attendees will get to see Office 2010 in action and learn how to do their work better with Office 2010.  The details are available on http://office.merawindows.com. To support one of the largest community, I am announcing one contents. It is very easy to take part in the contest. You just have to answer one very simple question. Contest: Choose best option: With which Microsoft Office Product Powerpivot is associated? Options: 1) PowerPoint 2) Excel 3) Word Hint: http://search.sqlauthority.com Rules: Winner will be awarded 1 Office 2007 Home and Student. This will be freely upgradeable to Office 2010 once it releases in June. The winners will be sent emails and they will redeem their awards via microsoftstore.co.in The prizes can only be shipped to India and Indian residents are eligible. Winner will be selected by selected community leaders and MVPs at their sole discretion. Winner will be informed by email about the award. Most creative and informative comment will win the contest. Please spread the words about this contest. SQLAuthority.com will also send SQL Server book to the person who generates the most traffic to this blog post using Twitter, Facebook and other social media. This competition is also open to Indian residents only. I will measure the traffic using my wordpress.com stats plugin. Reference: Pinal Dave (http://blog.sqlauthority.com) Filed under: SQL, SQL Authority, SQL Query, SQL Server, SQL Tips and Tricks, SQLAuthority News, T SQL, Technology Tagged: Office

    Read the article

  • AJAX event, prevents other page actions

    - by cobaltduck
    Here's a fairly average scenario, using JSF as an example, but this same concept I have observed in ASP.NET, Apache Wicket, and other frameworks with ajax capabilities. <h:inputText id="text1" value="#{myBacker.myBean.myStringVar}" styleClass="goodCSS"> <f:ajax event="change" listener="#{myBacker.text1ChangeEventMethod}" update="someOtherField" /> </h:inputText> <h:selectBooleanCheckbox id="check1" value="#{myBacker.myBean.myBoolVar}" /> Let's suppose that the 'text1ChangeEventListener' is essential to 'someOtherField' and perhaps toggles its disabled attribute, or changes its available options, based on the value of 'myStringVar.' The particulars aren't important, let's just accept that for some reason we need an ajax call when the 'text1' value is changed. So Jane User is working her way down the form. She arrives at the 'text1' field and types some value. The cursor focus is still in the text field, as she moves her mouse to the 'check1' box and clicks. It appears to her that nothing has happened. She clicks again, and this time the checkbox highlights and the icon indicating a selection appears in the box. Jane has to do several entries in the form today, and sees this happen every time, and it becomes very frustrating for her. Likewise, Jeff Admin is also perusing this form, and begins to type in 'text1.' He then realizes he doesn't really want to enter this data, and so moves his mouse to the "cancel" button elsewhere on the page, and clicks. Nothing seems to happen. Jeff clicks again, and after confirming he really does want to cancel, is returned to the home page. Jeff scratches his head. The problem is simply that the first thing the system does after 'text1' looses focus is run the listener and perform the ajax operation. It may only take a fraction of a second, but still, you can click other buttons all you want, but until that ajax has finished, everything else is ignored. I've spent the morning searching and reading, and it seems no one else has even noticed this. I could find not one article, blog, past question here or at SO, or anyting that addresses this obvious and glaring deficiency in ajax. So first of all, am I truly alone in thinking this is a big problem? Second, does anyone have a solution?

    Read the article

  • UK Oracle User Group Event: Trends in Identity Management

    - by B Shashikumar
    As threat levels rise and new technologies such as cloud and mobile computing gain widespread acceptance, security is occupying more and more mindshare among IT executives. To help prepare for the rapidly changing security landscape, the Oracle UK User Group community and our partners at Enline/SENA have put together an User Group event in London on Apr 19 where you can learn more from your industry peers about upcoming trends in identity management. Here are some of the key trends in identity management and security that we predicted at the beginning of last year and look how they have turned out so far. You have to admit that we have a pretty good track record when it comes to forecasting trends in identity management and security. Threat levels will grow—and there will be more serious breaches:   We have since witnessed breaches of high value targets like RSA and Epsilon. Most organizations have not done enough to protect against insider threats. Organizations need to look for security solutions to stop user access to applications based on real-time patterns of fraud and for situations in which employees change roles or employment status within a company. Cloud computing will continue to grow—and require new security solutions: Cloud computing has since exploded into a dominant secular trend in the industry. Cloud computing continues to present many opportunities like low upfront costs, rapid deployment etc. But Cloud computing also increases policy fragmentation and reduces visibility and control. So organizations require solutions that bridge the security gap between the enterprise and cloud applications to reduce fragmentation and increase control. Mobile devices will challenge traditional security solutions: Since that time, we have witnessed proliferation of mobile devices—combined with increasing numbers of employees bringing their own devices to work (BYOD) — these trends continue to dissolve the traditional boundaries of the enterprise. This in turn, requires a holistic approach within an organization that combines strong authentication and fraud protection, externalization of entitlements, and centralized management across multiple applications—and open standards to make all that possible.  Security platforms will continue to converge: As organizations move increasingly toward vendor consolidation, security solutions are also evolving. Next-generation identity management platforms have best-of-breed features, and must also remain open and flexible to remain viable. As a result, developers need products such as the Oracle Access Management Suite in order to efficiently and reliably build identity and access management into applications—without requiring security experts. Organizations will increasingly pursue "business-centric compliance.": Privacy and security regulations have continued to increase. So businesses are increasingly look for solutions that combine strong security and compliance management tools with business ready experience for faster, lower-cost implementations.  If you'd like to hear more about the top trends in identity management and learn how to empower yourself, then join us for the Oracle UK User Group on Thu Apr 19 in London where Oracle and Enline/SENA product experts will come together to share security trends, best practices, and solutions for your business. Register Here.

    Read the article

  • Windows Server 2008 R2 Error CAPI2 Event ID 4107

    - by umar bhatti
    I am getting following error on couple of my 2008 R2 servers. I have tried couple of fixes which didn't fix the issues. Log Name: Application Source: Microsoft-Windows-CAPI2 Date: 18/03/2013 09:48:40 Event ID: 4107 Task Category: None Level: Error Keywords: Classic User: N/A Computer: ServerName Description: Failed extract of third-party root list from auto update cab at: <http://ctldl.windowsupdate.com/msdownload/update/v3/static/trustedr/en/authrootstl.cab> with error: The data is invalid. . Event Xml: <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event"> <System> <Provider Name="Microsoft-Windows-CAPI2" Guid="{5bbca4a8-b209-48dc-a8c7-b23d3e5216fb}" EventSourceName="Microsoft-Windows-CAPI2" /> <EventID Qualifiers="0">4107</EventID> <Version>0</Version> <Level>2</Level> <Task>0</Task> <Opcode>0</Opcode> <Keywords>0x8080000000000000</Keywords> <TimeCreated SystemTime="2013-03-18T09:48:40.169581600Z" /> <EventRecordID>8713</EventRecordID> <Correlation /> <Execution ProcessID="412" ThreadID="5288" /> <Channel>Application</Channel> <Computer>ServerName <Security /> </System> <EventData> <Data>http://ctldl.windowsupdate.com/msdownload/update/v3/static/trustedr/en/authrootstl.cab</Data> <Data>The data is invalid. </Data> </EventData> </Event>

    Read the article

  • Writing custom sections into app.config

    - by Michael M.
    I want to save some custom data into application configuration file and I need to create some custom sections in app.config. Reading custom data from app.config is simple task, but I can't write information from my programm into app.config. For finding solution of this problem I create test project. For reading data from custom section app.config I used information from this article: http://devlicio.us/blogs/derik_whittaker/archive/2006/11/13/app-config-and-custom-configuration-sections.aspx

    Read the article

  • Lazarus - why I can't assign event to run-time component?

    - by Garret Raziel
    Hello, I have this Lazarus program: unit Unit2; {$mode objfpc}{$H+} interface uses Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls, ComCtrls; type { TForm2 } TForm2 = class(TForm) procedure OnTlacitkoClick(Sender: TObject); procedure FormClose(Sender: TObject; var CloseAction: TCloseAction); procedure FormCreate(Sender: TObject); tlac:TButton; private { private declarations } public { public declarations } end; var Form2: TForm2; implementation { TForm2 } procedure TForm2.OnTlacitkoClick(Sender: TObject); begin showmessage('helloworld'); end; procedure TForm2.FormCreate(Sender: TObject); var i,j:integer; begin tlac:=TButton.Create(Form2); tlac.OnClick:=OnTlacitkoClick; tlac.Parent:=Form2; tlac.Left:=100; tlac.Top:=100; end; initialization {$I unit2.lrs} end. but compiler says: unit2.pas(63,32) Error: Wrong number of parameters specified for call to "OnTlacitkoClick" in tlac.OnClick:=OnTlacitkoClick; expression. I have searched and think that this is legal expression in Delphi. I want simply to registrate OnTlacitkoClick as tlac.OnClick event,not to call this procedure. Is there somethink wrong with the code or must I do it different in Lazarus/Freepascal? Thanks.

    Read the article

  • Asp.net Custom user control button. How to stop multiple clicks by user.

    - by Laurence Burke
    I am trying to modify an open source Forum called YetAnotherForum.net in the project they have a custom user control called Yaf:ThemeButton. Now its rendered as an anchor with an onclick method in this code ThemeButton.cs using System; using System.Web.UI; using System.Web.UI.WebControls; namespace YAF.Controls { /// <summary> /// The theme button. /// </summary> public class ThemeButton : BaseControl, IPostBackEventHandler { /// <summary> /// The _click event. /// </summary> protected static object _clickEvent = new object(); /// <summary> /// The _command event. /// </summary> protected static object _commandEvent = new object(); /// <summary> /// The _attribute collection. /// </summary> protected AttributeCollection _attributeCollection; /// <summary> /// The _localized label. /// </summary> protected LocalizedLabel _localizedLabel = new LocalizedLabel(); /// <summary> /// The _theme image. /// </summary> protected ThemeImage _themeImage = new ThemeImage(); /// <summary> /// Initializes a new instance of the <see cref="ThemeButton"/> class. /// </summary> public ThemeButton() : base() { Load += new EventHandler(ThemeButton_Load); this._attributeCollection = new AttributeCollection(ViewState); } /// <summary> /// ThemePage for the optional button image /// </summary> public string ImageThemePage { get { return this._themeImage.ThemePage; } set { this._themeImage.ThemePage = value; } } /// <summary> /// ThemeTag for the optional button image /// </summary> public string ImageThemeTag { get { return this._themeImage.ThemeTag; } set { this._themeImage.ThemeTag = value; } } /// <summary> /// Localized Page for the optional button text /// </summary> public string TextLocalizedPage { get { return this._localizedLabel.LocalizedPage; } set { this._localizedLabel.LocalizedPage = value; } } /// <summary> /// Localized Tag for the optional button text /// </summary> public string TextLocalizedTag { get { return this._localizedLabel.LocalizedTag; } set { this._localizedLabel.LocalizedTag = value; } } /// <summary> /// Defaults to "yafcssbutton" /// </summary> public string CssClass { get { return (ViewState["CssClass"] != null) ? ViewState["CssClass"] as string : "yafcssbutton"; } set { ViewState["CssClass"] = value; } } /// <summary> /// Setting the link property will make this control non-postback. /// </summary> public string NavigateUrl { get { return (ViewState["NavigateUrl"] != null) ? ViewState["NavigateUrl"] as string : string.Empty; } set { ViewState["NavigateUrl"] = value; } } /// <summary> /// Localized Page for the optional link description (title) /// </summary> public string TitleLocalizedPage { get { return (ViewState["TitleLocalizedPage"] != null) ? ViewState["TitleLocalizedPage"] as string : "BUTTON"; } set { ViewState["TitleLocalizedPage"] = value; } } /// <summary> /// Localized Tag for the optional link description (title) /// </summary> public string TitleLocalizedTag { get { return (ViewState["TitleLocalizedTag"] != null) ? ViewState["TitleLocalizedTag"] as string : string.Empty; } set { ViewState["TitleLocalizedTag"] = value; } } /// <summary> /// Non-localized Title for optional link description /// </summary> public string TitleNonLocalized { get { return (ViewState["TitleNonLocalized"] != null) ? ViewState["TitleNonLocalized"] as string : string.Empty; } set { ViewState["TitleNonLocalized"] = value; } } /// <summary> /// Gets Attributes. /// </summary> public AttributeCollection Attributes { get { return this._attributeCollection; } } /// <summary> /// Gets or sets CommandName. /// </summary> public string CommandName { get { if (ViewState["commandName"] != null) { return ViewState["commandName"].ToString(); } return null; } set { ViewState["commandName"] = value; } } /// <summary> /// Gets or sets CommandArgument. /// </summary> public string CommandArgument { get { if (ViewState["commandArgument"] != null) { return ViewState["commandArgument"].ToString(); } return null; } set { ViewState["commandArgument"] = value; } } #region IPostBackEventHandler Members /// <summary> /// The i post back event handler. raise post back event. /// </summary> /// <param name="eventArgument"> /// The event argument. /// </param> void IPostBackEventHandler.RaisePostBackEvent(string eventArgument) { OnCommand(new CommandEventArgs(CommandName, CommandArgument)); OnClick(EventArgs.Empty); } #endregion /// <summary> /// Setup the controls before render /// </summary> /// <param name="sender"> /// </param> /// <param name="e"> /// </param> private void ThemeButton_Load(object sender, EventArgs e) { if (!String.IsNullOrEmpty(this._themeImage.ThemeTag)) { // add the theme image... Controls.Add(this._themeImage); } // render the text if available if (!String.IsNullOrEmpty(this._localizedLabel.LocalizedTag)) { Controls.Add(this._localizedLabel); } } /// <summary> /// The render. /// </summary> /// <param name="output"> /// The output. /// </param> protected override void Render(HtmlTextWriter output) { // get the title... string title = GetLocalizedTitle(); output.BeginRender(); output.WriteBeginTag("a"); output.WriteAttribute("id", ClientID); if (!String.IsNullOrEmpty(CssClass)) { output.WriteAttribute("class", CssClass); } if (!String.IsNullOrEmpty(title)) { output.WriteAttribute("title", title); } else if (!String.IsNullOrEmpty(TitleNonLocalized)) { output.WriteAttribute("title", TitleNonLocalized); } if (!String.IsNullOrEmpty(NavigateUrl)) { output.WriteAttribute("href", NavigateUrl.Replace("&", "&amp;")); } else { // string.Format("javascript:__doPostBack('{0}','{1}')",this.ClientID,"")); output.WriteAttribute("href", Page.ClientScript.GetPostBackClientHyperlink(this, string.Empty)); } bool wroteOnClick = false; // handle additional attributes (if any) if (this._attributeCollection.Count > 0) { // add attributes... foreach (string key in this._attributeCollection.Keys) { // get the attribute and write it... if (key.ToLower() == "onclick") { // special handling... add to it... output.WriteAttribute(key, string.Format("{0};{1}", this._attributeCollection[key], "this.blur();this.display='none';")); wroteOnClick = true; } else if (key.ToLower().StartsWith("on") || key.ToLower() == "rel" || key.ToLower() == "target") { // only write javascript attributes -- and a few other attributes... output.WriteAttribute(key, this._attributeCollection[key]); } } } // IE fix if (!wroteOnClick) { output.WriteAttribute("onclick", "this.blur();this.style.display='none';"); } output.Write(HtmlTextWriter.TagRightChar); output.WriteBeginTag("span"); output.Write(HtmlTextWriter.TagRightChar); // render the optional controls (if any) base.Render(output); output.WriteEndTag("span"); output.WriteEndTag("a"); output.EndRender(); } /// <summary> /// The get localized title. /// </summary> /// <returns> /// The get localized title. /// </returns> protected string GetLocalizedTitle() { if (Site != null && Site.DesignMode == true && !String.IsNullOrEmpty(TitleLocalizedTag)) { return String.Format("[TITLE:{0}]", TitleLocalizedTag); } else if (!String.IsNullOrEmpty(TitleLocalizedPage) && !String.IsNullOrEmpty(TitleLocalizedTag)) { return PageContext.Localization.GetText(TitleLocalizedPage, TitleLocalizedTag); } else if (!String.IsNullOrEmpty(TitleLocalizedTag)) { return PageContext.Localization.GetText(TitleLocalizedTag); } return null; } /// <summary> /// The on click. /// </summary> /// <param name="e"> /// The e. /// </param> protected virtual void OnClick(EventArgs e) { var handler = (EventHandler) Events[_clickEvent]; if (handler != null) { handler(this, e); } } /// <summary> /// The on command. /// </summary> /// <param name="e"> /// The e. /// </param> protected virtual void OnCommand(CommandEventArgs e) { var handler = (CommandEventHandler) Events[_commandEvent]; if (handler != null) { handler(this, e); } RaiseBubbleEvent(this, e); } /// <summary> /// The click. /// </summary> public event EventHandler Click { add { Events.AddHandler(_clickEvent, value); } remove { Events.RemoveHandler(_clickEvent, value); } } /// <summary> /// The command. /// </summary> public event CommandEventHandler Command { add { Events.AddHandler(_commandEvent, value); } remove { Events.RemoveHandler(_commandEvent, value); } } } } now that is just cs file its handled like this in the .ascx page of the actual website <YAF:ThemeButton ID="Save" runat="server" CssClass="yafcssbigbutton leftItem" TextLocalizedTag="SAVE" OnClick="Save_Click" /> now it is given an OnClick codebehind function that does some serverside function like this protected void Save_Click(object sender, EventArgs e) { //some serverside code here } now I have a problem with the user being able to click multiple times and firing that serverside function multiple times. I have added in the code as of right now an extra onclick="this.style.display='none'" in the .cs code but that is a ugly fix I was wondering if anyone would have a better idea of disabling the ThemeButton clientside?? pls any feedback if I need to give more examples or further explain the question thanks.

    Read the article

  • NTDS Replication Warning (Event ID 2089)

    - by Chris_K
    I have a simple little network with 3 AD servers in 2 sites. Site A has Win2k3 SP2 and Win2k SP4 servers, site B has a single Win2k3 SP2 server. All have been in place for at least 3 years now. Just last week I started getting Event 2089 "not backed up" warnings (example below) on both of the win2k3 servers. I understand what the message means, no need to send me links to the technet article explaining it. I'll improve my backups. What I'm more curious about is why did I just start getting this message now? Why haven't I been getting it for the past 3 years?!? Perhaps this is related: I recently decommissioned a few other sites and AD controllers (there used to be 3 more sites, each with their own controller). Don't worry, I did proper DCpromo exercises and made sure we didn't lose anything. But would shutting those down possibly be related to why I get this error now? This won't keep me awake at night but I am curious as to what changed... Event Type: Warning Event Source: NTDS Replication Event Category: Backup Event ID: 2089 Date: 3/28/2010 Time: 9:25:27 AM User: NT AUTHORITY\ANONYMOUS LOGON Computer: RedactedName Description: This directory partition has not been backed up since at least the following number of days. Directory partition: DC=MyDomain,DC=com 'Backup latency interval' (days): 30 It is recommended that you take a backup as often as possible to recover from accidental loss of data. However if you haven't taken a backup since at least the 'backup latency interval' number of days, this message will be logged every day until a backup is taken. You can take a backup of any replica that holds this partition. By default the 'Backup latency interval' is set to half the 'Tombstone Lifetime Interval'. If you want to change the default 'Backup latency interval', you could do so by adding the following registry key. 'Backup latency interval' (days) registry key: System\CurrentControlSet\Services\NTDS\Parameters\Backup Latency Threshold (days) For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

    Read the article

  • DegradedArray event on /dev/md0 without actually having a RAID

    - by J. Stoever
    Since I upgraded from Ubuntu LTS 10 to LTS 12, I have been getting error messages like: N 60 mdadm monitoring Mon Sep 3 06:38 31/1022 DegradedArray event on /dev/md2:Ubuntu-1004-lucid-64-minimal N 61 mdadm monitoring Mon Sep 3 06:38 31/1022 DegradedArray event on /dev/md0:Ubuntu-1004-lucid-64-minimal N 62 mdadm monitoring Mon Sep 3 06:38 31/1022 DegradedArray event on /dev/md1:Ubuntu-1004-lucid-64-minimal We do not have a RAID setup, and only have a single hard drive. Ideas ?

    Read the article

  • Disabling repeating keyboard down event in as3

    - by psy-sci
    now I'm trying to make the keyboard events to stop repeating. My idea was to have a true and false condition for when the key is pressed so that it wont repeat if the key is down already. //Mouse Event Over keyCButton.addEventListener(MouseEvent.MOUSE_OVER, function(){gotoAndStop(2)}); //Variable var Qkey:uint = 81; //Key Down Event stage.addEventListener(KeyboardEvent.KEY_DOWN, keydown); var soundplayed = false; function keydown(event:KeyboardEvent){ if (event.keyCode==Qkey) { this.soundplayed=true;} } if (this.soundplayed==false){ gotoAndPlay(3); } else {} //Key Up Event stage.addEventListener(KeyboardEvent.KEY_UP, keyup); function keyup(event:KeyboardEvent){ if (event.keyCode==Qkey) { this.soundplayed=true; gotoAndStop(1); } } doing this just turns off the key event I think i need to add a "&& keyDown..." to "if (this.soundplayed==true)" but i dont know how to do it without getting errors here is the keyboard player i'm trying to fix http://soulseekrecords.org/psysci/animation/piano.html

    Read the article

< Previous Page | 42 43 44 45 46 47 48 49 50 51 52 53  | Next Page >