Search Results

Search found 16714 results on 669 pages for 'button'.

Page 2/669 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • jQuery download a zipfile from a button?

    - by FFish
    Quite embarrassing how much time I spend trying to get to download a zipfile from a button.... <button type='button' id='button-download'>download zipfile</button> $("#button-download").live("click", function() { $.get("http://localhost/admin/zip/002140.zip"); // doesn't work? }) I need something bullet proof here, that's why I ask here, thanks.

    Read the article

  • Set Icon in Button LWUIT Java ME

    - by Muhamad Burhanudin
    Please help me, to set icon button : /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package tajwed; import javax.microedition.midlet.*; import com.sun.lwuit.*; import com.sun.lwuit.animations.*; import com.sun.lwuit.events.*; import com.sun.lwuit.layouts.BoxLayout; import com.sun.lwuit.plaf.*; import java.io.IOException; import java.util.Hashtable; /** * @author Muhamad BUrhanudin */ public class tajwedMidlet extends MIDlet implements ActionListener{ Form mHomeForm; Form mAwayForm; Form mMenuTajwid; Command mExitCommand; Button btMenu; Button btNunSukun, btMimSukun, btNunTasjid; Button btLamtarif, btIdgham, btMaad, btRaa; Button btHelp; Button btExit; Command mBackCommand; public void startApp() { Display.init(this); installTheme(); createUI(); mHomeForm.show(); } public void pauseApp() { } public void destroyApp(boolean unconditional) { } public void actionPerformed(ActionEvent ae) { mAwayForm.setTransitionInAnimator( Transition3D.createCube(400, false)); mMenuTajwid.setTransitionInAnimator( Transition3D.createCube(400, false)); mMenuTajwid.setTransitionOutAnimator( Transition3D.createCube(400, true)); mAwayForm.setTransitionOutAnimator( Transition3D.createCube(400, true)); if ((ae.getSource()==btMenu)|| (ae.getSource()==btHelp)) { //mAwayForm.show(); if(ae.getSource()== btMenu) { mMenuTajwid.show(); } } else if (ae.getSource() == mBackCommand) { mHomeForm.show(); } else if ((ae.getCommand() == mExitCommand) || (ae.getSource()== btExit)) notifyDestroyed(); } private void installTheme() { UIManager uim = UIManager.getInstance(); Hashtable ht = new Hashtable(); ht.put("sel#" + Style.BG_COLOR, "ffffff"); ht.put(Style.BG_COLOR, "d5fff9"); ht.put(Style.FG_COLOR, "000000"); uim.setThemeProps(ht); } private void createUI() { // Set up screen for transitions. mAwayForm = new Form("Away"); mAwayForm.addComponent(new Label("Choose Back to return to the home screen.")); mMenuTajwid = new Form("MENU DASAR TAJWID"); // mMenuTajwid mMenuTajwid.setLayout(new BoxLayout(BoxLayout.Y_AXIS)); btNunSukun = new Button("Hukum Nun Sukun & Tanwin"); btNunSukun.addActionListener(this); mMenuTajwid.addComponent(btNunSukun); btMimSukun = new Button("Hukum Mim Sukun"); btMimSukun.addActionListener(this); mMenuTajwid.addComponent(btMimSukun); btNunTasjid = new Button("Hukum Nun Tasydid & Min Tasydid"); btNunTasjid.addActionListener(this); mMenuTajwid.addComponent(btNunTasjid); btLamtarif = new Button("Hukum Laam Ta'rief"); btLamtarif.addActionListener(this); mMenuTajwid.addComponent(btLamtarif); btIdgham = new Button("Idgham"); btIdgham.addActionListener(this); mMenuTajwid.addComponent(btIdgham); btMaad = new Button("Maad"); btMaad.addActionListener(this); mMenuTajwid.addComponent(btMaad); btRaa = new Button("Raa'"); btRaa.addActionListener(this); mMenuTajwid.addComponent(btRaa); mBackCommand = new Command("Back"); mMenuTajwid.addCommand(mBackCommand); mMenuTajwid.addCommandListener(this); // Use setCommandListener() with LWUIT 1.3 or earlier. // Set up main screen. mHomeForm = new Form("Java Mobile Learning"); mHomeForm.setLayout(new BoxLayout(BoxLayout.Y_AXIS)); btMenu = new Button("TAJWID LEARNING"); btMenu.addActionListener(this); mHomeForm.addComponent(btMenu); try { btHelp = new Button("HELP",Image.createImage("/help.ico")); btHelp.addActionListener(this); mHomeForm.addComponent(btHelp); } catch(IOException e) { } btExit = new Button("EXIT"); btExit.addActionListener(this); mHomeForm.addComponent(btExit); mExitCommand = new Command("Keluar"); mHomeForm.addCommand(mExitCommand); mHomeForm.addCommandListener(this); // Use setCommandListener() with LWUIT 1.3 or earlier. } }

    Read the article

  • Button inside of anchor link works in Firefox but not in Internet Explorer?

    - by Jason
    Everything else in my site seems to be compatible with all browsers except for my links. They appear on the page, but they do not work. My code for the links are as follows- <td bgcolor="#ffffff" height="370" valign="top" width="165"> <p><a href="sc3.html"><button style="width:120;height:25">Super Chem #3</button></a> <a href="91hollywood.html"><button style="width:120;height:25">91 Hollywood</button></a> <a href="sbubba.html"><button style="width:120;height:25">Super Bubba</button></a> <a href="afgoohash.html"><button style="width:120;height:25">Afgoo Hash</button></a> <a href="superjack.html"><button style="width:120;height:25">Super Jack</button></a> <a href="sog.html"><button style="width:120;height:25">Sugar OG</button></a> <a href="91pk91.html"><button style="width:120;height:25">91 x PK</button></a> <a href="jedi1.html"><button style="width:120;height:25">Jedi</button></a></p> <p>&nbsp;</p> <a href="http://indynile99.blogspot.com"><button style="width:120;height:25">Blog</button></a> <p>&nbsp;</p> </td> THANKS for the help!

    Read the article

  • Show Add button after Edit button is clicked?

    - by David.Chu.ca
    I have a view with navigation bar control on the top. The view is in the second level with a "back" button is displayed on the left by default. In my view class, I added a default navigation edit button on the right: self.navigationbarItem.rightButtonItem = self.editButtonItem; with this line of code, an edit button is on the right side, and when it is clicked, the view (table view) becomes editable with delete mark on the left for each row. After that, the edit button's caption becomes "done". All those are done by the default edit button built in the navigation control, I think. I would like to add an add button the left, or replace "back" button when edit is clicked. I guess I have to implement some kind of delegate in my view class. This would provide a place to plug in my code to add the add button on the left when edit button is clicked, and to restore "back" button back when the done button is clicked. If so, what's the delegate? Or is there any other way to achieve it?

    Read the article

  • Making a button click and process using javascript with Asp.Net

    - by user944919
    I'm having two buttons and one button is hidden. Now when I click the visible button I need to do two things 1.Open Iframe. 2.Automatically make the 2nd Button(Hidden)to be clicked. When the second button is clicked I need to display the message on top of the IFrame which I have mentioned as function showStickySuccessToast() Now I am able to open IFrame but I'm unable to make the Hidden button clicked automatically. This is what I'm having: <script type="text/javascript"> $(document).ready(function(){ $("#<%=Button1.ClientID%>").click(function(event){ $('#<%=TextBox1.ClientID%>').change(function () { $('#various3').attr('href', $(this).val()); }); }); function showStickySuccessToast() { $().toastmessage('showToast', { text: 'Finished Processing!', sticky: false, position: 'middle-center', type: 'success', closeText: '', close: function () { } }); } }) </script> Here are my two buttons how I'm working with: <a id="various3" href="#"><asp:Button ID="Button1" runat="server" Text="Button" OnClientClick="Button2_Click"/></a> <asp:Button ID="Button2" runat="server" Text="Button" Visible="False" OnClick="Button2_Click"/> And in the button2_Click event: Protected Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click System.Web.UI.ScriptManager.RegisterClientScriptBlock(Page, GetType(Page), "Script", "showStickySuccessToast();", True) End Sub

    Read the article

  • jQuery get the value of ahref and put it to button

    - by user1506189
    i have this problem that i need to get the value of href and pass it to a button. is this correct format of jQuery? $(function() { var getValue = $('#theLink').getAttributeNode('onclick').value; $('.yt_holder').live('click', '.videoThumb4', function(){ $(".videoThumb4").ytplaylist({ holderId: 'ytvideo4', html5: true, playerWidth: '520', autoPlay: false, sliding: false, listsliding: true, social: true, autoHide: false, playfirst: 0, playOnLoad: false, modestbranding: true, showInfo: false }); }); }); the button was working but it only play the first video on his list. the link of the website is here http://cocopop12.site11.com/search/index.php now the button is this. <input class="videoThumb4" onClick="http://www.youtube.com/watch?v=' . $yValue['videoid'] . '" type="button" name="previewSel" value="Preview" id="previewbut" /> is that correct? that i need to do a onclick http://www.... blabla? the <a href> that i like to make a button is this. <?php echo ' <a class="videoThumb4" href="http://www.youtube.com/watch?v=' . $yValue['videoid'] . '" id="link"> ' . $yValue['description'] . ' </a> '; ?> how can i use .each for the button {Preview}? how can i put the value in the button just like --when i click this href it automatically play the video? but the button it just play the first video but not the second video. this i want to make it like a button. thank you for your time.

    Read the article

  • How to set background image for Android button but keep the gray button?

    - by Jason Whiler
    I need to set a background image for an android button (text button), but I want to keep the gray button. When i use the setBackgroundResource() it has the image in place of the gray button. How can I keep the gray button? I tried using setCompoundDrawablesWithIntrinsicBounds, but the image only takes up part of the button, even when I have no text. Notes: I will not have text while I display the image, but the button needs to be a TextButton because there will be text without images at times, and images with text at others.

    Read the article

  • [PyGTK] How to Create a Multiline Button

    - by EShull
    I'm trying to create a multiline button with PyGTK. I have a label added to my subclass of gtk.Button, but I'm having trouble sizing the label to the button. If the label makes it's own size, there is no text wrapping even with label.set_line_wrap(True) because the label simply resizes beyond the bounds of the button. I would set the size of the label to that of the button, but unless I explicitly set the size of the button using set_size_request, I haven't been able to find out how big the button is (it's packed in a table). Any suggestions?

    Read the article

  • Why does jquery button take a second to refresh after updating a page using ajax

    - by oo
    when i refresh a part of a webpage that has a jquery ui button, it seems like I have to call: $(":button").button(); again or it shows up as a regular button. Thats fine but when i do this, it still shows up as a regular button for a split second before converting to the styling of the jquery theme. is there anyway to avoid this as it looks a bit messy. NOTE: i noticed that this is for anything that i am theming using jquery ui like autocomplete, button, etc. so its not button specific issue.

    Read the article

  • Android add image to button

    - by Christiaan de Jong
    I want to add an image to a Button (no imagebutton, as the particular button can either contain text or an image; plus the imagebutton has the same problem), while still retaining the original android-style button. So adding android:background in the XML doesn't cut it, as that will remove the android default button with rounded corners etc. (android.R.drawable.btn_default) Is this in any way possible? I think one way is to make a 9patch image for the button pressed (one for up and one for down) and onTouch Action_DOWN make a layered background drawable and put that onto the button, and doing the same thing but with another 9patch for onTouch Action_UP, but I think that will decrease the performance of the application substantially, as that will require quite a lot of resource reading and layer merging for all the button clicks (and for my application, that will be quite a lot). Is what I state above correct?

    Read the article

  • form submits in FireFox when any button on page is clicked

    - by RememberME
    First time using Asp.net-mvc and originally followed the NerdDinner tutorial. My form submit button looks like this: <p> <input type="submit" value="Save" /> </p> I've now added another button to the page with jQuery code attached. It works in IE, but when I test in FireFox the form submits. I tried adding another button, this time with no attached jQuery code and the same thing happens. When the button is clicked, the form submits. <button id="random-button">Do Nothing</button> ??

    Read the article

  • background image for input type="button"

    - by fusion
    i've been trying to change the background image of the input button through css, but it doesn't work. search.html: <input type="button" name="button" value="Search" onclick="showUser()" class="button"/> search.css: .button { background-image: url ('/image/btn.png') no-repeat; cursor:pointer; } what could be wrong? even inline-ing the css didn't seem to work.

    Read the article

  • How to fix the position of the button in applet

    - by user1609804
    I'm trying to make an applet that has a buttons in the right, where each button is corresponding to a certain pokemon. I already did it, but the buttons isn't fixed.they keep following the mouse. please help. This is my code: import javax.swing.*; import java.awt.image.BufferedImage; import java.io.*; import javax.imageio.ImageIO; import java.applet.*; import java.awt.event.*; import java.awt.*; public class choosePokemon extends Applet implements ActionListener { private int countPokemon; private int[] storePokemon; private int x,y; //this will be the x and y coordinate of the button BufferedImage Picture; public int getCountPokemon(){ //for other class that needs how many pokemon return countPokemon; } public int[] getStoredPokemon(){ //for other class that needs the pokemon return storePokemon; } public void init(){ x=0;y=0; try{ Picture = ImageIO.read(new File("pokeball.png")); } catch( IOException ex ){ } } public void paint( Graphics g ){ pokemon display = new pokemon(); // to access the pokemon attributes in class pokemon ButtonGroup group = new ButtonGroup(); //create a button group for( int a=0;a<16;a++ ){ // for loop in displaying the buttons of every pokemon(one pokemon, one button) display.choose( a ); //calls the method choose in which accepts an integer from 0-15 and saves the attributes of the pokemon corresponding to the integer JButton pokemonButton = new JButton( display.getName() ); // creates the button pokemonButton.setActionCommand( display.getName() ); // isasave sa actioncommand yung name ng kung ano mang pokemon pokemonButton.addActionListener(this); //isasama yung bagong gawang button sa listener para malaman kung na-click yung button pokemonButton.setBounds( x,y,50,23 ); group.add( pokemonButton ); //eto naman yung mag-aadd sa bagong gawang button sa isang group na puro buttons(button ng mga pokemon) y+=23; if( a==7 ){ x+=50; y=0; } add( pokemonButton ); //will add the button to the applet } g.drawImage( Picture, 120, 20, null ); } public void actionPerformed(ActionEvent e) { try{ //displays the picture of the selected pokemon Picture = ImageIO.read(new File( "pokemon/" + e.getActionCommand() + ".png" )); } catch( IOException ex ){ } } public boolean chosen( int PChoice ){ //this will check if the chosen pokemon is already the player's pokemon boolean flag = false; for( int x=0; x<countPokemon && !flag ;x++ ){ if( storePokemon[x]==PChoice ){ flag = true; } } return flag; }

    Read the article

  • change the value of the button of the button clicked

    - by user269431
    On inserting the new <li>, I have to set the value of the button clicked to Delete. How can I do that? With the actual code, it`s working only once, and on adding other list, the button no more has the the value 'Delete'. $("#mylist :button").click( function() { var text = $(this).val(); if (text == "Delete") { $(this).parent().remove(); } else { $(this).val("Delete"); } }); $("#mylist li:last-child").live('click', function() { $(this).parent().append('<li>' + '<input type = "textbox">' + '<input type = "button" value= "Save">' + '</li>'); }); <div> <ul id="mylist"> <li id="1">1<button id="Button3">Delete</button> </li> <li id="2">2<button id="Button2">Delete</button></li> <li id="3">3<button id="another_entry">Save</button></li> </ul>

    Read the article

  • SWT: problems with clicking button after using setEnabled() on Linux

    - by Laimoncijus
    Hi, I have a strange case with SWT and Button after using setEnabled() - seems if I disable and enable button at least once - I cannot properly click with mouse on it anymore... Already minify code to very basic: import org.eclipse.swt.SWT; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.events.SelectionListener; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Shell; public class TestButton { public TestButton() { Display display = new Display(); Shell shell = new Shell(display); GridLayout mainLayout = new GridLayout(); shell.setLayout(mainLayout); shell.setSize(100, 100); Button testButton = new Button(shell, SWT.PUSH); testButton.addSelectionListener(new TestClickListener()); testButton.setText("Click me!"); //testButton.setEnabled(false); //testButton.setEnabled(true); shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } display.dispose(); } class TestClickListener implements SelectionListener { @Override public void widgetDefaultSelected(SelectionEvent e) { } @Override public void widgetSelected(SelectionEvent e) { System.out.println("Click!"); } } public static void main(String[] args) { new TestButton(); } } When I keep these 2 lines commented out - I can properly click on a button and always get "Click!" logged, but if I uncomment them - then I can't click on button properly with mouse anymore - button visually seems to be clicked, but nothing is logged... Am I doing something wrong here? Or maybe it's some kind of bug on Linux platform? Because on Mac running the same code I never experienced such problems... Thanks for any hint! P.S. Running code on Ubuntu 9.10, Gnome + Compiz, Sun Java 1.6.0.16

    Read the article

  • jQuery - Increase the value of a counter when a button is clicked

    - by Taimur
    Hi, I'm making a system where a user clicks a button and their score increases. There is a counter which I would like to increase the value of using jQuery (so that the page does not need to refresh) when the button is clicked. How would I go about this? <script type="text/javascript" src="http://code.jquery.com/jquery-1.4.3.min.js"></script> <script type="text/javascript"> $("#update").click(function() { $("#counter")++; } </script> #update is the button, #counter is the counter. In php, ++ increases something's value. What's the jQuery equivalent? Also, when the button is clicked, it needs to send a request which updates the score value in a mysql database as well, without the page refreshing. Does anyone know how I would do that? Thanks a lot UPDATE: I've tried a few of the methods below, but nothing seems to work! Do I need to change anything else for it to work? I've created a test page for it: <html> <body> <script type="text/javascript" src="http://code.jquery.com/jquery-1.4.3.min.js"></script> <script type="text/javascript"> var count = 0; $("#update").click(function() { count++; $("#counter").html("My current count is: "+count); } </script> <button id="update" type="button">Button</button> <div id="counter">1</div> </body> </htlm>

    Read the article

  • IE 7 does not like jquery('<button/>').attr('type','button')

    - by salmane
    I am trying to create a button using jquery. I use the following code jquery('<button/>', {type:'button'}).text(name) However this works in Safari , FF IE8 but not IE7 i tried to use the attr function : jquery('<button/>').attr('type','button').text(name) this does not work either. any ideas what would work? I suppose if I don't assign a type it would default to button but i rather do that thanks for your help

    Read the article

  • Dell Synaptics touch pad's middle mouse button gets mapped as normal click

    - by Henrik
    How do I make the middle touch pad's button work? xinput --test 11 yields button press 1 button press 1 For pressing both the left and the middle button. I have tried to do xinput set-button-map 11 1 4 2 and so on, but as the --test shows that button 1 is being depressed, then probably the issue is at a lower level than with X11's perception of what mouse buttons I'm pressing (or assigning button-map 11 1 2 3 and clicking the right button in firefox, wouldn't trigger the middle-click on the link)

    Read the article

  • Dell Synaptics touchpad's middle mouse button gets mapped as normal click

    - by Henrik
    How do I make the middle touchpad's button work? xinput --test 11 yields button press 1 button press 1 For pressing both the left and the middle button. I have tried to do xinput set-button-map 11 1 4 2 and so on, but as the --test shows that button 1 is being depressed, then probably the issue is at a lower level than with X11's perception of what mouse buttons I'm pressing (or assigning button-map 11 1 2 3 and clicking the right button in firefox, wouldn't trigger the middle-click on the link)

    Read the article

  • Is it possible to make the Numpad 5 button work as the Numpad Down button while Num Lock is on?

    - by Eddy
    I hope someone can help me out with this; I use a laptop and I like to play games a lot that are arrow key dependent. So after a while of using my laptop, I accidentally broke the Down Arrow key. So I decided to try and find out how to make the Numpad5 button work as the Numpad Down button while Numlock is on. I was trying to use AutoHotkey, but so far I've had no luck. Can anyone help me out with this? So far the scripts I used that didn't work were Numpad5::NumpadDown or Numpad5::Down. Am I doing something wrong here?

    Read the article

  • Javascript Back Button - Stop back from closing window

    - by Evan
    How do I get the "back" button seen in my demo to NOT close the browser window? If this can't be prevented, then at least provide them with a confirmation box alerting them the window is trying to close and ask them if they want to continue. I'm using a javascript back button link and forward button link to control the user's history inside a modal/lightbox window. Here's a demo of what is happening... When you begin, the second page will have a link to the modal window, so click that, then click the "back" button in the window as it will take you BACK to the start page. That's the issue I'm having as I don't want this to happen. http://www.apus.edu/_test/evan/modal/start.htm <a href="javascript:history.go(-1)">Back Button</a> <a href="javascript:history.go(1)">Foward Button</a>

    Read the article

  • LinearLayout of a WebView and a Button.

    - by Timmmm
    Hi, I recently struggled with an apparently simple Android layout: I wanted a WebView above a Button. It worked fine with the following parameters: WebView: Height: wrap-content Weight: unset (by the way, what is the default?) Button: Height: wrap-content Weight: unset However if the web page became too big it spilled out over the button. I tried various combinations of weights and heights, and all except one either completely hide the button, or partially cover it. This is the one that works (copied from http://code.google.com/p/apps-for-android/source/browse/trunk/Samples/WebViewDemo/res/layout/main.xml): WebView: Height: 0 Weight: 1 Button: Height: wrap-content Weight: unset If you change any of those, e.g. give button a weight or change the WebView height to wrap-content then it doesn't work. My question is: Why? Can someone please explain what on Earth the android layout system is thinking?

    Read the article

  • Changing Image In a Button After Being Clicked?

    - by BuZzZzJaY
    Creating a game in Android using multiple Buttons to display an image from the drawable folder. I want to change the button to a different image after the button has been clicked on. Here is the button code: <Button android:id="@+id/b36" android:background="@drawable/black" android:layout_width="45px" android:layout_height="45px" /> I can't find anything about how to change the actual image of the button. You can change the color of the button by using the following code in the java file: b36.setBackgroundColor(0xAA00AA00);

    Read the article

  • Android: scaling a button with a background image.

    - by jkhouw1
    I'm probably just being daft but my Google searches are not working out well. I have a bunch of buttons i add in code that all have dynamic text. I've set a background image for each of these buttons since the default greybutton doesn't work well for my application. This works perfectly and when the text size (or content) changes, the button automatically grows to accommodate the expanded text. What doesn't work is that I'd like the button to scale proportionally - i.e. if the background image is round, i'd like it to stay round rather than oval as the button gets bigger. With an imagebutton, there is a property "Adjust view bounds" that does exactly this but I cant put text on an imagebutton. Is there something equivalent for a regular button? or am I going about this wrong? i also tried setting the width of the button in code, but I can't seem to determine the new height (button.getHeight() returns 0)

    Read the article

  • Stop IE6 overwriting Button text when setting value.

    - by RoToRa
    I've got a button which contains a span I need for styling: <button id="example" name="example" value="Example"><span>Example</span></button> IE6 has a bug that it submits the contents of the button instead of it's value, but I've already worked around that. Now I need to change the value of the button and the text in the span in JavaScript/jQuery: jQuery("#example").val("Changed").children("span").text("Changed"); However IE6 also changes the contents of the button when setting the value per JavaScript/jQuery, so that the span is lost. Does any one know of a way other that identifying IE6 with jQuery.browser that I could use to avoid that?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >