Search Results

Search found 23174 results on 927 pages for 'middle mouse button'.

Page 18/927 | < Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >

  • Set mouse or keyboard button to simulate left click and hold or rapid left click repeating in Windows?

    - by miahelf
    Does anyone know a way to configure Windows 7 or use third party software to do this? I would like to click my middle mouse button and have it tell Windows to left click and hold until I click the middle mouse button again. A keyboard key would be fine as well. Some games and apps have me holding down the left mouse button for a long time and I would like to reduce the stress on my mouse hand. Also, I would like to do a similar thing but have it repeatedly click the left mouse button automatically if possible. If none of that is possible, how about temporalily setting a keyboard key to achieve a left mouse button emulation?

    Read the article

  • How to connect Microsoft Bluetooth Mouse 5000 to Windows 7?

    - by davidshen84
    I have a Microsoft Bluetooth 5000 mouse, and I used it with my Linux and Windows 7 system. In Linux, the mouse can always connect to the system normally. But on Windows 7, after I have successfully added the mouse to Windows 7, if I have connected the mouse to the Linux system, it will not be able to connect to the Windows 7 system any more - unless I remove the mouse and add it again. I tried to play all settings I could find in the Bluetooth settings on Windows 7, but cannot fix this problem. How can I use the mouse without having to remove and add it again ?

    Read the article

  • The Middle of Every Project

    - by andrew.sparks
    I read a quote somewhere “The middle of every successful project looks like a mess.” or something to that effect. I suppose the projects where the beginning, middle and end are a mess are the ones you need to watch out for. Right now we are in ramp up of the maintenance/support teams at a big project in the Nordics. We are facing a year of mixed mode operations, where we have production operations and the phased rollout to new locations in parallel. The support team supports, and the deployment team deploys. As usual the assumption right up to about a month or so before initial go-live was that the deployment team would carry the support. Not! Consequently we had a last minute scramble over the Christmas/New Year to fire up a support/maintenance team. While it is a bit messy and not perfect – the quality of the mess (I mean scramble) is not so bad. Weekly operational review with the operational delivery managers, written issue lists and assigned actions, candid discussions getting the problems on the table and documented, issues getting solved and moved off the table. So while the middle of a project might look like a mess (even the start) it is methodical use of project management tools of checklists and scheduled communication points that are helping us navigate out of the mess and bring it all under control.

    Read the article

  • Prepared statement alternatives for this middle-man program?

    - by user2813274
    I have an program that is using a prepared statement to connect and write to a database working nicely, and now need to create a middle-man program to insert between this program and the database. This middle-man program will actually write to multiple databases and handle any errors and connection issues. I would like advice as to how to replicate the prepared statements such as to create minimal impact to the existing program, however I am not sure where to start. I have thought about creating a "SQL statement class" that mimics the prepared statement, only that seems silly. The existing program is in Java, although it's going to be networked anyways so I would be open to writing it in just about anything that would make sense. The databases are currently MySQL, although I would like to be open to changing the database type in the future. My main question is what should the interface for this program look like, and does doing this even make sense? A distributed DB would be the ideal solution, but they seem overly complex and expensive for my needs. I am hoping to replicate the main functionality of a distributed DB via this middle-man. I am not too familiar with sql-based servers distributing data (or database in general...) - perhaps I am fighting an uphill battle by trying to solve it via programming, but I would like to make an attempt at least.

    Read the article

  • WPF ICommand over a button

    - by toni
    Hi, I have implemented a custom IComand class for one of my buttons. The button is placed in a page 'MyPage.xaml' but its custom ICommand class is placed in another class, not in the MyPage code behind. Then from XAML I want to bind the button with its custom command class and then I do: MyPage.xaml: <Page ...> <Page.CommandBindings> <CommandBinding Command="RemoveAllCommand" CanExecute="CanExecute" Executed="Execute" /> </Page.CommandBindings> <Page.InputBindings> <MouseBinding Command="RemoveAllCommand" MouseAction="LeftClick" /> </Page.InputBindings> <...> <Button x:Name="MyButton" Command="RemoveAllCommand" .../> <...> </Page> and the custom command button class: // Here I derive from MyPage class because I want to access some objects from // Execute method public class RemoveAllCommand : MyPage, ICommand { public void Execute(Object parameter) { <...> } public bool CanExecute(Object parameter) { <...> } public event EventHandler CanExecuteChanged { add { CommandManager.RequerySuggested += value; } remove { CommandManager.RequerySuggested -= value; } } } My problem is how to say MyPage.xaml that Execute and CanExecute methods for the button is in another class and not the code behind where is placed the button. How to say these methods are in RemoveAllCommand Class in XAML page. Also I want to fire this command when click mouse event is produced in the button so I do an input binding, is it correct? Thanks

    Read the article

  • WPF ICommand over a button

    - by toni
    I have implemented a custom IComand class for one of my buttons. The button is placed in a page 'MyPage.xaml' but its custom ICommand class is placed in another class, not in the MyPage code behind. Then from XAML I want to bind the button with its custom command class and then I do: MyPage.xaml: <Page ...> <Page.CommandBindings> <CommandBinding Command="RemoveAllCommand" CanExecute="CanExecute" Executed="Execute" /> </Page.CommandBindings> <Page.InputBindings> <MouseBinding Command="RemoveAllCommand" MouseAction="LeftClick" /> </Page.InputBindings> <...> <Button x:Name="MyButton" Command="RemoveAllCommand" .../> <...> </Page> and the custom command button class: // Here I derive from MyPage class because I want to access some objects from // Execute method public class RemoveAllCommand : MyPage, ICommand { public void Execute(Object parameter) { <...> } public bool CanExecute(Object parameter) { <...> } public event EventHandler CanExecuteChanged { add { CommandManager.RequerySuggested += value; } remove { CommandManager.RequerySuggested -= value; } } } My problem is how to say MyPage.xaml that Execute and CanExecute methods for the button is in another class and not the code behind where is placed the button. How to say these methods are in RemoveAllCommand Class in XAML page. Also I want to fire this command when click mouse event is produced in the button so I do an input binding, is it correct? Thanks

    Read the article

  • JQuery: Toggle submit button according to if terms are agreed with or not

    - by Svish
    I have a checkbox with id terms and a submit button in my form with class registration. I would like the submit button to be disabled initially, and then to be toggled on and off whenever the user toggle on and off the terms checkbox. I would also like to have a confirmation dialog pop up when the submit button is clicked and that if it is confirmed the submit button will be disabled again (to prevent duplicate clicking). I have gotten the last part and the first part working (I think), but I can't figure out how to get the toggling working. This is what I have so far: $(document).ready(function() { // Disable submit button initially $('form.registration input[type=submit]').attr('disabled', 'disabled'); // Toggle submit button whenever the terms are accepted or rejected $('#terms').change(function() { if($('#terms:checked').val() !== null) $('input[type=submit]', this).attr('disabled', ''); else $('input[type=submit]', this).attr('disabled', 'disabled'); }); // Ask for confirmation on submit and disable submit button if ok $('form.registration').submit(function() { if(confirm('Have you looked over your registration? Is everything correct?')) { $('input[type=submit]', this).attr('disabled', 'disabled'); return true; } return false; }); }); Could someone help me make this work? I'm a total JQuery newb at the moment, so any simplifications and fixes are welcome as well.

    Read the article

  • HOW CAn I Differciate the button click Event

    - by SHASHANK
    hello All i have a problem. i m making Some wpf button Dynamic through C#.i m using it A loop for this now i m trying to find all button Click Event. i find it But It Work Same on All The button Click how Can i Differciate all the button . thanks in Advance shashank `for (int i = 0; i < 2; i++) { Button b1 = new Button(); //this.RegisterName("myAnimatedBrush", b1); b1.Name = "button" + i; b1.Height = 200; b1.Width = 200; b1.Margin = new Thickness(0, -100, 0, 0); b1.HorizontalAlignment = HorizontalAlignment.Left; b1.Content = "English"; b1.Background = System.Windows.Media.Brushes.Pink; b1.Click+=new RoutedEventHandler(b1_Click); canvasbtn.Children.Add(b1); Canvas.SetLeft(b1,b1.Width * i); }`

    Read the article

  • Scale transform in xaml (in a controltemplate) on a button to perform a "zoom"

    - by Matt B
    Hi all, I've got a button with an image in it and it's being styled by the following: <ControlTemplate x:Key="IconButton" TargetType="Button"> <Border> <ContentPresenter Height="80" Width="80" /> </Border> <ControlTemplate.Triggers> <EventTrigger RoutedEvent="Button.Click"> <BeginStoryboard> <Storyboard TargetProperty="Opacity"> <DoubleAnimation From="1" To="0.5" Duration="0:0:0.5" /> <DoubleAnimation From="0.5" To="1" Duration="0:0:0.5" /> </Storyboard> </BeginStoryboard> </EventTrigger> <EventTrigger RoutedEvent="Mouse.MouseEnter"> <BeginStoryboard> <Storyboard TargetProperty="Width"> <DoubleAnimation From="80" To="95" Duration="0:0:0.2" /> </Storyboard> </BeginStoryboard> </EventTrigger> <Trigger Property="IsMouseOver" Value="True"> <Setter Property="Cursor" Value="Hand"/> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> Button is as follows: <Button Template="{StaticResource IconButton}" Name="btnExit"> <Image Source="Images/Exit.png" /> </Button> The problem is that the width doesn't change when my mouse goes over. (Or at least - the width of the image does not...) I believe there is a "scale" transform I can use to enlarge the button and all it's contents? how would I do that here...? Thanks.

    Read the article

  • Creating an invisible button in Java Swing

    - by AniDev
    Hello, I have seen many times on Java Swing GUIs buttons that look like images until the mouse rolls over them. They appear to not have their content area filled. When the mouse rolls over them, the content area fills in but the button looks as though the mouse is not hovering over it. An example of this would be the toolbar of buttons used to activate each demo in SwingSet2. How is this effect possible? Thanks!

    Read the article

  • Unable to drag and drop / select multiple with mouse

    - by J. Scott Elblein
    I'm running into a perplexing issue with Windows 8 Pro x64, where randomly I'm unable to drag to select multiple files (i.e. in Explorer or Directory Opus). I've also noticed that a similar issue happens when I'm running for example Photoshop or Illustrator and can't drag to select multiple layers, or drag to do some other things in them. it happens randomly and have found no way to reliably reproduce it, but it happens VERY frequently. I have read some tips saying pressing the ESC button usually fixes the issue, but it doesn't in my case. From what I understand, it's probably due to some other process locking the drag feature somehow, but I've not found a way to tell which process is the perp; I've even tried using unlock software on files when I'm suddenly unable to drag and I'm told by it that nothing is locking it. Anyone have any ideas?

    Read the article

  • A WPF Image Button

    - by psheriff
    Instead of a normal button with words, sometimes you want a button that is just graphical. Yes, you can put an Image control in the Content of a normal Button control, but you still have the button outline, and trying to change the style can be rather difficult. Instead I like creating a user control that simulates a button, but just accepts an image. Figure 1 shows an example of three of these custom user controls to represent minimize, maximize and close buttons for a borderless window. Notice the highlighted image button has a gray rectangle around it. You will learn how to highlight using the VisualStateManager in this blog post.Figure 1: Creating a custom user control for things like image buttons gives you complete control over the look and feel.I would suggest you read my previous blog post on creating a custom Button user control as that is a good primer for what I am going to expand upon in this blog post. You can find this blog post at http://weblogs.asp.net/psheriff/archive/2012/08/10/create-your-own-wpf-button-user-controls.aspx.The User ControlThe XAML for this image button user control contains just a few controls, plus a Visual State Manager. The basic outline of the user control is shown below:<Border Grid.Row="0"        Name="borMain"        Style="{StaticResource pdsaButtonImageBorderStyle}"        MouseEnter="borMain_MouseEnter"        MouseLeave="borMain_MouseLeave"        MouseLeftButtonDown="borMain_MouseLeftButtonDown">  <VisualStateManager.VisualStateGroups>  ... MORE XAML HERE ...  </VisualStateManager.VisualStateGroups>  <Image Style="{StaticResource pdsaButtonImageImageStyle}"         Visibility="{Binding Path=Visibility}"         Source="{Binding Path=ImageUri}"         ToolTip="{Binding Path=ToolTip}" /></Border>There is a Border control named borMain and a single Image control in this user control. That is all that is needed to display the buttons shown in Figure 1. The definition for this user control is in a DLL named PDSA.WPF. The Style definitions for both the Border and the Image controls are contained in a resource dictionary names PDSAButtonStyles.xaml. Using a resource dictionary allows you to create a few different resource dictionaries, each with a different theme for the buttons.The Visual State ManagerTo display the highlight around the button as your mouse moves over the control, you will need to add a Visual State Manager group. Two different states are needed; MouseEnter and MouseLeave. In the MouseEnter you create a ColorAnimation to modify the BorderBrush color of the Border control. You specify the color to animate as “DarkGray”. You set the duration to less than a second. The TargetName of this storyboard is the name of the Border control “borMain” and since we are specifying a single color, you need to set the TargetProperty to “BorderBrush.Color”. You do not need any storyboard for the MouseLeave state. Leaving this VisualState empty tells the Visual State Manager to put everything back the way it was before the MouseEnter event.<VisualStateManager.VisualStateGroups>  <VisualStateGroup Name="MouseStates">    <VisualState Name="MouseEnter">      <Storyboard>        <ColorAnimation             To="DarkGray"            Duration="0:0:00.1"            Storyboard.TargetName="borMain"            Storyboard.TargetProperty="BorderBrush.Color" />      </Storyboard>    </VisualState>    <VisualState Name="MouseLeave" />  </VisualStateGroup></VisualStateManager.VisualStateGroups>Writing the Mouse EventsTo trigger the Visual State Manager to run its storyboard in response to the specified event, you need to respond to the MouseEnter event on the Border control. In the code behind for this event call the GoToElementState() method of the VisualStateManager class exposed by the user control. To this method you will pass in the target element (“borMain”) and the state (“MouseEnter”). The VisualStateManager will then run the storyboard contained within the defined state in the XAML.private void borMain_MouseEnter(object sender,  MouseEventArgs e){  VisualStateManager.GoToElementState(borMain,    "MouseEnter", true);}You also need to respond to the MouseLeave event. In this event you call the VisualStateManager as well, but specify “MouseLeave” as the state to go to.private void borMain_MouseLeave(object sender, MouseEventArgs e){  VisualStateManager.GoToElementState(borMain,     "MouseLeave", true);}The Resource DictionaryBelow is the definition of the PDSAButtonStyles.xaml resource dictionary file contained in the PDSA.WPF DLL. This dictionary can be used as the default look and feel for any image button control you add to a window. <ResourceDictionary  ... >  <!-- ************************* -->  <!-- ** Image Button Styles ** -->  <!-- ************************* -->  <!-- Image/Text Button Border -->  <Style TargetType="Border"         x:Key="pdsaButtonImageBorderStyle">    <Setter Property="Margin"            Value="4" />    <Setter Property="Padding"            Value="2" />    <Setter Property="BorderBrush"            Value="Transparent" />    <Setter Property="BorderThickness"            Value="1" />    <Setter Property="VerticalAlignment"            Value="Top" />    <Setter Property="HorizontalAlignment"            Value="Left" />    <Setter Property="Background"            Value="Transparent" />  </Style>  <!-- Image Button -->  <Style TargetType="Image"         x:Key="pdsaButtonImageImageStyle">    <Setter Property="Width"            Value="40" />    <Setter Property="Margin"            Value="6" />    <Setter Property="VerticalAlignment"            Value="Top" />    <Setter Property="HorizontalAlignment"            Value="Left" />  </Style></ResourceDictionary>Using the Button ControlOnce you make a reference to the PDSA.WPF DLL from your WPF application you will see the “PDSAucButtonImage” control appear in your Toolbox. Drag and drop the button onto a Window or User Control in your application. I have not referenced the PDSAButtonStyles.xaml file within the control itself so you do need to add a reference to this resource dictionary somewhere in your application such as in the App.xaml.<Application.Resources>  <ResourceDictionary>    <ResourceDictionary.MergedDictionaries>      <ResourceDictionary         Source="/PDSA.WPF;component/PDSAButtonStyles.xaml" />    </ResourceDictionary.MergedDictionaries>  </ResourceDictionary></Application.Resources>This will give your buttons a default look and feel unless you override that dictionary on a specific Window or User Control or on an individual button. After you have given a global style to your application and you drag your image button onto a window, the following will appear in your XAML window.<my:PDSAucButtonImage ... />There will be some other attributes set on the above XAML, but you simply need to set the x:Name, the ToolTip and ImageUri properties. You will also want to respond to the Click event procedure in order to associate an action with clicking on this button. In the sample code you download for this blog post you will find the declaration of the Minimize button to be the following:<my:PDSAucButtonImage       x:Name="btnMinimize"       Click="btnMinimize_Click"       ToolTip="Minimize Application"       ImageUri="/PDSA.WPF;component/Images/Minus.png" />The ImageUri property is a dependency property in the PDSAucButtonImage user control. The x:Name and the ToolTip we get for free. You have to create the Click event procedure yourself. This is also created in the PDSAucButtonImage user control as follows:private void borMain_MouseLeftButtonDown(object sender,  MouseButtonEventArgs e){  RaiseClick(e);}public delegate void ClickEventHandler(object sender,  RoutedEventArgs e);public event ClickEventHandler Click;protected void RaiseClick(RoutedEventArgs e){  if (null != Click)    Click(this, e);}Since a Border control does not have a Click event you will create one by using the MouseLeftButtonDown on the border to fire an event you create called “Click”.SummaryCreating your own image button control can be done in a variety of ways. In this blog post I showed you how to create a custom user control and simulate a button using a Border and Image control. With just a little bit of code to respond to the MouseLeftButtonDown event on the border you can raise your own Click event. Dependency properties, such as ImageUri, allow you to set attributes on your custom user control. Feel free to expand on this button by adding additional dependency properties, change the resource dictionary, and even the animation to make this button look and act like you want.NOTE: You can download the sample code for this article by visiting my website at http://www.pdsa.com/downloads. Select “Tips & Tricks”, then select “A WPF Image  Button” from the drop down list.

    Read the article

  • Joystick acts as mouse; won't stop

    - by Shazzner
    Joystick acts as a mouse, even when I'm playing a game that uses a joystick so I get random mouse events going on. I plugged a joystick in to play Spiral Knights, also installed joystick and jcalibrate. Everything is working good, except by default the joystick moves the mouse around and the button activate mouse keys. Now normally this would be good behavior if I'm on a Myth-box or something, unfortunately when I play Spiral Knights with joystick input I see my mouse cursor moving in the back ground and when I hit a button it thinks I'm pressing right-click so it minimizes everything. Also it creates folders and probably deletes stuff. So, basically how the heck do I stop it from acting as a mouse?

    Read the article

  • Upgrade a Retro Corded Mouse with Wireless Bluetooth Connectivity

    - by Jason Fitzpatrick
    If there’s a beloved retro mouse gathering dust in your office closet for want of wireless connectivity, this detailed tutorial will guide you through upgrading the guts to turn your corded mouse into a Bluetooth model. If you’re handy with a soldering iron and not afraid to hack apart the guts of a modern but inexpensive Bluetooth mouse, you should have no trouble digging right into this project. The end result is a modern mouse packed inside the casing of your old mouse–same old look and feel, brand new engine inside. Hit up the link below to check out the full tutorial. Retro Wireless Apple Mouse [via Lifehacker] HTG Explains: Is ReadyBoost Worth Using? HTG Explains: What The Windows Event Viewer Is and How You Can Use It HTG Explains: How Windows Uses The Task Scheduler for System Tasks

    Read the article

  • Libgdx 2D Game, Random generated World of random size, how to get mouse coordinates?

    - by Solom
    I'm a noob and English is not my mothertongue, so please bear with me! I'm generating a map for a Sidescroller out of a 2D-array. That is, the array holds different values and I create blocks based on that value. Now, my problem is to match mouse coordinates on screen with the actual block the mouse is pointing at. public class GameScreen implements Screen { private static final int WIDTH = 100; private static final int HEIGHT = 70; private OrthographicCamera camera; private Rectangle glViewport; private Spritebatch spriteBatch; private Map map; private Block block; ... @Override public void show() { camera = new OrthographicCamera(WIDTH, HEIGHT); camera.position.set(WIDTH/2, HEIGHT/2, 0); glViewport = new Rectangle(0, 0, WIDTH, HEIGHT); map = new Map(16384, 256); map.printTileMap(); // Debugging only spriteBatch = new SpriteBatch(); } @Override public void render(float delta) { // Clear previous frame Gdx.gl.glClearColor(1, 1, 1, 1 ); Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT); GL30 gl = Gdx.graphics.getGL30(); // gl.glViewport((int) glViewport.x, (int) glViewport.y, (int) glViewport.width, (int) glViewport.height); spriteBatch.setProjectionMatrix(camera.combined); camera.update(); spriteBatch.begin(); // Draw Map this.drawMap(); // spriteBatch.flush(); spriteBatch.end(); } private void drawMap() { for(int a = 0; a < map.getHeight(); a++) { // Bounds check (y) if(camera.position.y + camera.viewportHeight < a)// || camera.position.y - camera.viewportHeight > a) break; for(int b = 0; b < map.getWidth(); b++) { // Bounds check (x) if(camera.position.x + camera.viewportWidth < b)// || camera.position.x > b) break; // Dynamic rendering via BlockManager int id = map.getTileMap()[a][b]; Block block = BlockManager.map.get(id); if(block != null) // Check if Air { block.setPosition(b, a); spriteBatch.draw(block.getTexture(), b, a, 1 ,1); } } } } As you can see, I don't use the viewport anywhere. Not sure if I need it somewhere down the road. So, the map is 16384 blocks wide. One block is 16 pixels in size. One of my naive approaches was this: if(Gdx.input.isButtonPressed(Input.Buttons.LEFT)) { Vector3 mousePos = new Vector3(); mousePos.set(Gdx.input.getX(), Gdx.input.getY(), 0); camera.unproject(mousePos); System.out.println(Math.round(mousePos.x)); // *16); // Debugging // TODO: round // map.getTileMap()[mousePos.x][mousePos.y] = 2; // Draw at mouse position } I confused myself somewhere down the road I fear. What I want to do is, update the "block" (or rather the information in the Map/2D-Array) so that in the next render() there is another block. Basically drawing on the spriteBatch g So if anyone could point me in the right direction this would be highly appreciated. Thanks!

    Read the article

  • Triggering event when Button is pressed down in Android

    - by Cody
    I have the following code for Android which works fine to play a sound once a button is clicked: Button SoundButton2 = (Button)findViewById(R.id.sound2); SoundButton2.setOnClickListener(new OnClickListener() { public void onClick(View v) { mSoundManager.playSound(2); } }); My problem is that I want the sound to play immediately upon pressing the button (touch down), not when it is released (touch up). Any ideas on how I can accomplish this?

    Read the article

  • Get rid of button border in WPF?

    - by sanjeev40084
    i am trying to get rid of button border and only display text, however a thin line around the text gets displayed even though i set borderThickness to 0 and borderbrush to transparent. my xaml code for save button: <Button Content="save" Name="btnSaveEditedText" Background="Transparent" Foreground="White" FontFamily="Tw Cen MT Condensed" FontSize="30" Margin="-280,0,0,10" Width="60" BorderBrush="Transparent" BorderThickness="0"/> Is there anyway i can get rid of the button border?

    Read the article

  • Hide the built-in Send button in Outlook 2003

    - by Raheem
    I am using ms-outlook 2003, i want to hide the built-in send button and use the custom button to send the mail. As i have worked on C,C++ and on Java, dont know how to work on VB/VBScript/VBA, can any body tell me how to hide this button and also how to send mail from custom button, how to access the fields of mail (ie., the TO field, Subject field, Msg Body, attachment etc).

    Read the article

  • Intercepting touch events on activity and button on Android

    - by hgpc
    I have an Android activity with an ImageButton. I would like to execute some logic when the button is clicked and show a different image for the pressed state, but also receive the touch event on the activity. By default only the button receives the touch event. If I set the clickable attribute of the button to false then only the activity receives the touch event. What's the best way to receive the touch event in both the activity and the button?

    Read the article

  • Disable button after submit

    - by Chris Philpotts
    I'm trying to disable a button when a user submits a payment form and the code to post the form is causing a double post in firefox. This problem does not occur when the code is removed, and does not occur in any browser other than firefox. Any idea how to prevent the double post here? System.Text.StringBuilder sb = new StringBuilder(); sb.Append("if (typeof(Page_ClientValidate) == 'function') { "); sb.Append("if (Page_ClientValidate() == false) { return false; }} "); sb.Append("this.value = 'Please wait...';"); sb.Append("this.disabled = true;"); sb.Append(Page.GetPostBackEventReference(btnSubmit )); sb.Append(";"); btnSubmit.Attributes.Add("onclick", sb.ToString()); it's the sb.Append(Page.GetPostBackEventReference(btnSubmit )) line that's causing the issue Thanks EDIT: Here's the c# of the button: <asp:Button ID="cmdSubmit" runat="server" Text="Submit" /> here's the html This code posts twice (and disables the submit button and verifies input): <input type="submit" name="ctl00$MainContent$cmdSubmit" value="Submit" onclick="if (typeof(Page_ClientValidate) == 'function') { if (Page_ClientValidate() == false) { return false; }} this.value = 'Please wait...';this.disabled = true;document.getElementById('ctl00_MainContent_cmdBack').disabled = true;__doPostBack('ctl00$MainContent$cmdSubmit','');" id="ctl00_MainContent_cmdSubmit" /> This code posts twice (but doesn’t disable the submit button): <input type="submit" name="ctl00$MainContent$cmdSubmit" value="Submit" onclick="__doPostBack('ctl00$MainContent$cmdSubmit','');" id="ctl00_MainContent_cmdSubmit" /> This code posts once (but doesn’t verify the user input and doesn’t disable the submit button): <input type="submit" name="ctl00$MainContent$cmdSubmit" value="Submit" id="ctl00_MainContent_cmdSubmit" /> This code posts once (but doesn’t disable submit button): <input type="submit" name="ctl00$MainContent$cmdSubmit" value="Submit" onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;ctl00$MainContent$cmdSubmit&quot;, &quot;&quot;, true, &quot;&quot;, &quot;&quot;, false, false))" id="ctl00_MainContent_cmdSubmit" /> This code doesn’t post at all: <input type="submit" name="ctl00$MainContent$cmdSubmit" value="Submit" onclick="this.disabled = true;WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;ctl00$MainContent$cmdSubmit&quot;, &quot;&quot;, true, &quot;&quot;, &quot;&quot;, false, false))" id="ctl00_MainContent_cmdSubmit" /> Obviously it’s the disabling of the submit button that’s posing the problem. Do you have any ideas how we can disable the submit to avoid multiple clicking?

    Read the article

  • jQuery Dynamic Button Click Handler

    - by Neb
    I have a code the change the html of a div to make a button. When I make a click handler for the dynamic button, nothing happens $('#signinup').html("<button id=\"login_submit\">Sign In</button>"); And the handler: $('#login_submit').click(function() { alert("Works!"); });

    Read the article

  • Swap button for image (Jquery)

    - by Skoder
    Hi I have a button and when it's clicked, I want to replace the button with an image. How can I do this in JQuery? Is it possible to replace the background of the image as well? The button itself is within a large div, and I don't want to add another div around the button because it messes up a previous layout. Thanks

    Read the article

  • styling a form button

    - by Ayrton
    Hi I would like to style a form button (input or button tag) with 2 background images to create a stretchable button (relative to the text-length). The form button should also have a hovered state and it should be cross browser (at least IE7 & +) would need to support it. I know how to obtain the effect with just css with an tag = test If anyone could help me a little bit, I would be pleased yours truthfully

    Read the article

  • ASP.NET button_click not firing, after browser back button

    - by the berserker
    I have a ASPX Page that contains several user controls, which are loaded dynamically after user interaction. On one of ascx I have a hidden button that is being clicked on some user actions (via button.click()), which works fine on 1st page load. But after the form is being submitted once, the other ascx is loaded. There if user clicks the back button and resubmits the 1st form (again via button.click()), button_clicked event on server does not fire again. Any thought?

    Read the article

< Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >