button

How to stop a Windows Forms Button being clicked twice

I've got a Windows Forms Button on a Form which submits a web request. I want to be able to disable the button when it is first clicked and then re-enable it when I get a response. I don't have much control over the code that is being called and how it is being called so all I can play around with are Button events or I can create my own...

preview button in drupal 5 webform

I want to make a preview button in a webform page. Webform edit page doesn't have any option to do it. Even if I'm setting preview page for all content types all over the site in the administration page it doesn't apply on a webform page. I also tried coding and used form_alter but when I'm changing the submit button (or adding a new one...

How many Radio Buttons can be checked at any one time in this specific form?

If a Form contains 2 Group Boxes each containing 3 Radio Buttons and the Form itself contains 5 Radio Buttons not in either of the Group Boxes how many Radio Buttons can be checked at any one time? 1.. 2... 3... more? ...

Simulate clicking a button in another window in C#

I'd like to close a dialog that pops up automatically, but I'm having some trouble getting it to work. My Win32 programming is a bit rusty after several years of limited usage. I'm using FindWindowEx to get handles to the dialog and the button I want to click. I was under the impression that sending a WM_COMMAND to the dialog, with the ...

LinkBar button / label click event transition

I have created a linkbar with two labels. Now, I need to keep a track of the label clicks. 10 100 i.e. If in the beginning "First" is clicked, the details will be displayed. After that, i...

Call javascript during modalpopup.show()

I have a javascript that disables a button for x seconds and then enables the button after x seconds pass. An update button checks for certain constraints, and if met, a modal popup is shown. The button the javascript is meant for is located in a panel displayed by this modal popup. Is there a way I can execute the javascript when the...

How do I use the command pattern to reduce the complexity of a menu?

Say I have 4 buttons and I want each one to do a different thing. I don't want a big switch statement where I do a different thing based on which button was pushed, nor do I want a separate method for each button click. Is command pattern a good way to solve this? ...

How do you completely remove the button border in wpf?

I'm trying to create a button that has an image in it and no border - just like the fire fox toolbar buttons before you hover over them and see the full button. I've tried setting the borderbrush to Transparent, BorderThickness to 0, and also tried BorderBrush={x:NUll} - but you can still see the outline of the button. Any ideas? Than...

why don't html form elements obey my CSS?

I am trying to make form elements fit into a visual style with other DOM elements including making buttons and text-inputs fit together, buttons and divs as a single visual element (like a form button attached to some content div with the same background color). Why don't form elements follow the same rules as other DOM elements? they s...

Creating a custom control that is a Button that also has a Items and ItemsSource?

I'm trying to create a SplitButton control that uses a ContextMenu to display its items. The SplitButton is currently deriving from Button. I have a PART_DropDownInitiator that is the little icon the user clicks on to bring up the ContextMenu for the SplitButton to show its items. The problem is that I'm trying to setup a default Contex...

Javascript is called in IE and FF but not in Chrome, why?

I have the following code below for a button on an aspx page. When it is clicked it should call a javascript that will print the text in that div. Everything works great in IE & Firefox but when it is tried in chrome it is as if the OnClientClick is not kicking off the javascript. I receive no errors and it works in IE and FF now. ...

WPF: How to make a "pushlike" checkbox?

I would like to make a CheckBox that looks exactly like a button. My initial feeble attempt doesn't work at all. <CheckBox x:Name="test"> Testing! <CheckBox.Template> <ControlTemplate> <Button> <ContentPresenter/> </Button> </ControlTemplate> </CheckBox.Template> </Chec...

Windows Forms: Multiple default buttons?

In a simple Guess-The-Number game I'm making, the user inputs a couple of numbers and hits a button. A second panel becomes enabled and the original one is disabled. The user now enters a number and hits another button, multiple times. Since the two panels will never be enabled at the same time, I'd like for both buttons to be "default",...

WPF Overlaying a Image with a Button

I have a custom TabItem with a close button(denoted by X) on it so it can be closed easily. In this tab i want to put a Image or Border Item, that is centered with the close button in the top left corner The Control Template for this is <ControlTemplate TargetType="{x:Type local:CloseableTabItem}"> <Grid SnapsToDevicePixels="tru...

Styling a YUI Split button

I want to use split buttons for a left side menu. I tried adding the class following. <STYLE TYPE="text/css"> .catbutton { display: block; } </STYLE> The buttons were the right width but the menu arrow was the section taking up the variable width. Not only was it ugly but the menu activation section was in the correct place on the far...

iPhone - How to animate a button when pressed?

Is there a way to make a custom animation when clicking on an iPhone button? I would like something like the App Store button - it shows the price, and then when you click on it, it changes color and the text changes to buy now, then when you click it again, it completes the purchase. The UIViewAnimationTransition only contains a few v...

How to use DataGridViewButtonColumn in non bound DataGridView

Using WinForms, C# .Net 2.0 I'm adding rows to a non bound DataGridView. I would like to have a DataGridViewButtonColumn in one of the columns that deletes that row when clicked. When I try to add a Click event to the DataGridViewButtonColumn, there does not appear to be a definition for Click. Can anyone point me to a MSDN article o...

How do I get this "Share" button to grab the current URL's HTML title in addition to URL?

I'm a javascript novice trying to build a basic share button as a learning project. I'm a bit stumped about one aspect. While I can grab the URL of the current page and pass that into the url that prepopulates the share form, I'm not sure how to grab the html title. Here's what I have to far: <a href="http://www.domain.com/submit" on...

How can I confirm and then disable a button in asp.net/javascript

I have a standard ASP.NET 2.0 web page with a Delete button on it. What I need and can't figure out how to pull off is when the user presses the delete button a confirm dialog popups asking the user "are you sure?". If the user says yes then I want to disable the delete button and perform a postback that will run the server side code del...

How to find out which HTML button was pushed in my servlet?

I am creating a registration form which contains two submit buttons. I need to know which button is clicked in the form in my servlet code? ...