Search Results

Search found 30097 results on 1204 pages for 'jenson button event'.

Page 16/1204 | < Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >

  • PHP Menu Items Count then add under more button

    - by Adrian M.
    Hello, I use the bellow code to load the main menu elements from some CMS, the present code is perfect except that it loads ALL the main items on a single line of menu - which will make the width of it unusable in any centered design (under 1000px).. I want to change this script so after 15 main elements will add a "MORE" button under which the rest of the main menu items will show as sub-items of this "MORE" button (they will not have their own sub-items as the first 15 do).. How can I do it? Thanks! <?php require_once( '../../../inc/header.inc.php' ); require_once( DIRECTORY_PATH_INC . 'membership_levels.inc.php' ); require_once( DIRECTORY_PATH_ROOT . "templates/tmpl_{$tmpl}/scripts/TemplMenu.php" ); class SimpleMenu extends TemplMenu { function getCode() { $this->iElementsCntInLine = 100; $this->getMenuInfo(); $this->genTopItems(); return $this->sCode; } function genTopItem($sText, $sLink, $sTarget, $sOnclick, $bActive, $iItemID, $isBold = false, $sPicture = '') { $sActiveStyle = ($bActive) ? ' id="tm_active"' : ''; if (!$bActive) { $sAlt= $sOnclick ? ( ' alt="' . $sOnclick . '"' ) : ''; $sTarget = $sTarget ? ( ' target="_parent"' ) : ''; } $sLink = (strpos($sLink, 'http://') === false && !strlen($sOnclick)) ? $this->sSiteUrl . $sLink : $sLink; $sSubMenu = $this->getAllSubMenus($iItemID); $sImgTabStyle = $sPictureRep = ''; if ($isBold && $sPicture != '') { $sPicturePath = getTemplateIcon($sPicture); $sPictureRep = "<img src='{$sPicturePath}' style='vertical-align:middle;width:16px;height:16px;' />"; $sText = '&nbsp;'; $sImgTabStyle = 'style="width:38px;"'; } $sMainSubs = ($sSubMenu=='') ? '' : " {$sSubMenu} </a>"; $this->sCode .= " <li><a href='{$sLink}' {$sOnclick} target='_parent'>{$sPictureRep}{$sText}</a> <div id='submenu'> <ul> <li>{$sMainSubs}</li> </ul> </div> </li> "; } } $objMenu = new SimpleMenu(); echo "<ul id='ddmenu'>"; echo $objMenu->getCode(); echo "</ul>"; ?>

    Read the article

  • How to fix button size?

    - by rob
    I am using three buttons along with the list view.These three buttons are added to the layout using the TableRow.The first button takes more space on content, so the other two becomes smaller in size than first one. When the application runs, it doesn't even show the two other buttons. How can I make the size of three buttons equal and display all of them when application runs?

    Read the article

  • Facebook Like Button (<fb:like>) Height Always 80px

    - by David
    Why is the height of my Facebook Like button (technically the iframe that gets generated) always getting set to 80px? Example page is here: http://www.davidkasper.net/test.html I am using the javascript sdk and have had it work on other pages but for some reason the height will not change dynamically on this one! I can even do something like <fb:like style="height:40px"> and that will indeed set the visible height, but the iframe will still be 80px, whereas I can see it changing in the demo at http://developers.facebook.com/docs/reference/plugins/like

    Read the article

  • Can I set a Custom Icon for a jQueryUI Button

    - by Boycs
    Is it possible to create a jQueryUI Button with a custom icon, ie: an icon that is not part of the sprite icons that are provided with jQueryUI??? I am using the ButtonSet functionality for a group of 3 checkboxes but need a more stylised icon than what is provided out of the box...

    Read the article

  • Enable submit button javascript ( asp page )

    - by Filipe Costa
    Good morning. By default, and i don't know why, when the page ends the rendering, i get the submit button disabled. <input type="submit" class="buttonColor" disabled="disabled" id="MyMatrix_ctl10_Form_btnSubmit" value="Enviar" name="MyMatrix$ctl10$Form$btnSubmit"> I need some way to enable it, or else i can't submit the form. How can i do it? 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

  • Command button requires two clicks (sometimes)

    - by Shelly
    i am using icefaces 1.8.2. For some command buttons, sometimes i need to click the button twice. previously whole applivcation was working fine with single click. after upgrade to 1.8.2,i am facing this problem......Any suggestion,what could be the reason??? Thanks

    Read the article

  • android: how to add an image button?

    - by Yang
    I am trying to replace my previous ugly text button with an imagebutton. However, after changing the XML file with the following ImageButton code, my application won't even start. Why? <ImageButton android:layout_height="fill_parent" android:id="@+id/refresh" android:src="@drawable/refresh" />

    Read the article

  • Onclick not firing

    - by user320588
    I have a set of buttons on my master page (I have attached the code below) but no onclick event is being raised. I pulled the final page source and no onclick event was present. As you can see I tried a few different approaches to solve the problem. I am looking for a normal postback to the server but I am getting nothing when I click any of these buttons. What am I not doing? --Master --Master Code Behind Protected Sub Button_Command(ByVal sender As Object, ByVal e As CommandEventArgs) Handles btnCancel.Command, btnClear.Command Session("ButtonClicked") = e.CommandArgument End Sub Protected Sub Button_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnSave.Click, btnSubmit.Click Session("ButtonClicked") = CType(sender, Button).CommandArgument End Sub --Page Source

    Read the article

  • Android Alert Dialog Extract User Choice Radio Button?

    - by kel196
    Apologies for any coding ignorance, I am a beginner and am still learning! I am creating a quiz app which reads questions off a SQL database and plots them as points on a google map. As the user clicks each point, an alert dialog appears with radio buttons to answer some question. My radiobuttons are in CustomItemizedOverlay file and when I click submit, I want to be able to send the user choice back to the database, save it and return to the user if their answer is correct. My question is this, how do I pass the user choice out once the submit button has been clicked? I tried making a global variable to read what was selected to no avail. Any suggestions would be appreciated! If I need to post any other code, please ask and I will do so ASAP! package uk.ac.ucl.cege.cegeg077.uceskkw; import java.util.ArrayList; import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; import android.graphics.drawable.Drawable; import android.widget.Toast; import com.google.android.maps.ItemizedOverlay; import com.google.android.maps.OverlayItem; public class CustomItemizedOverlay2 extends ItemizedOverlay<OverlayItem> { private ArrayList<OverlayItem> mapOverlays = new ArrayList<OverlayItem>(); private Context context; public CustomItemizedOverlay2(Drawable defaultMarker) { super(boundCenterBottom(defaultMarker)); } public CustomItemizedOverlay2(Drawable defaultMarker, Context context) { this(defaultMarker); this.context = context; } @Override protected OverlayItem createItem(int i) { return mapOverlays.get(i); } @Override public int size() { return mapOverlays.size(); } @Override protected boolean onTap(int index) { OverlayItem item = mapOverlays.get(index); // gets the snippet from ParseKMLAndDisplayOnMap and splits it back into // a string. final CharSequence allanswers[] = item.getSnippet().split("::"); AlertDialog.Builder dialog = new AlertDialog.Builder(context); dialog.setIcon(R.drawable.easterbunnyegg); dialog.setTitle(item.getTitle()); dialog.setSingleChoiceItems(allanswers, -1, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { Toast.makeText(context, "You have selected " + allanswers[whichButton], Toast.LENGTH_SHORT).show(); } }); dialog.setPositiveButton(R.string.button_submit, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { dialog.dismiss(); // int selectedPosition = ((AlertDialog) // dialog).getListView().getCheckedItemPosition(); Toast.makeText(context, "hi!", Toast.LENGTH_SHORT) .show(); } }); dialog.setNegativeButton(R.string.button_close, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { dialog.dismiss(); // on cancel button action } }); AlertDialog question = dialog.create(); question.show(); return true; } public void addOverlay(OverlayItem overlay) { mapOverlays.add(overlay); this.populate(); } }

    Read the article

  • back button android

    - by Raogrimm
    i am having trouble implementing the back button properly. all of the code snippets i have seen have not worked for me. what i am trying to do when i press the back button is just go back to the previous list. pretty much i have a list within a list and i just want it to go back to the previous list. how would i go about doing this? this is the list i have, every item has a separate list that it has. lets say you click on weapons, you then get a list of different weapon types and so on final String[] weapons = getResources().getStringArray(R.array.weapons); setListAdapter(new ArrayAdapter<String>(ffxidirectory.this, R.layout.list_item, weapons)); lv.setOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView<?> parent, View view, int position, long id) { System.out.println("item clicked: "+weapons[position]); switch(position) { case 0: final String[] axes = getResources().getStringArray(R.array.axes); setListAdapter(new ArrayAdapter<String>(ffxidirectory.this, R.layout.list_item, axes)); break; case 1: final String[] clubs = getResources().getStringArray(R.array.clubs); setListAdapter(new ArrayAdapter<String>(ffxidirectory.this, R.layout.list_item, clubs)); break; case 2: final String[] daggers = getResources().getStringArray(R.array.daggers); setListAdapter(new ArrayAdapter<String>(ffxidirectory.this, R.layout.list_item, daggers)); break; case 3: final String[] great_axes = getResources().getStringArray(R.array.great_axes); setListAdapter(new ArrayAdapter<String>(ffxidirectory.this, R.layout.list_item, great_axes)); break; case 4: final String[] great_katana = getResources().getStringArray(R.array.great_katana); setListAdapter(new ArrayAdapter<String>(ffxidirectory.this, R.layout.list_item, great_katana)); break; case 5: final String[] great_swords = getResources().getStringArray(R.array.great_swords); setListAdapter(new ArrayAdapter<String>(ffxidirectory.this, R.layout.list_item, great_swords)); break; case 6: final String[] hand_to_hand = getResources().getStringArray(R.array.hand_to_hand); setListAdapter(new ArrayAdapter<String>(ffxidirectory.this, R.layout.list_item, hand_to_hand)); break; case 7: final String[] katana = getResources().getStringArray(R.array.katana); setListAdapter(new ArrayAdapter<String>(ffxidirectory.this, R.layout.list_item, katana)); break; case 8: final String[] polearms = getResources().getStringArray(R.array.polearms); setListAdapter(new ArrayAdapter<String>(ffxidirectory.this, R.layout.list_item, polearms)); break; case 9: final String[] scythes = getResources().getStringArray(R.array.scythes); setListAdapter(new ArrayAdapter<String>(ffxidirectory.this, R.layout.list_item, scythes)); break; case 10: final String[] staves = getResources().getStringArray(R.array.staves); setListAdapter(new ArrayAdapter<String>(ffxidirectory.this, R.layout.list_item, staves)); break; case 11: final String[] swords = getResources().getStringArray(R.array.swords); setListAdapter(new ArrayAdapter<String>(ffxidirectory.this, R.layout.list_item, swords)); break; } } });

    Read the article

  • JPanel clock and button merge

    - by user1509628
    I'm having a problem with in merging time and button together... I can't get the button show in the JPanel. This is my code: import java.awt.Color; import java.awt.Font; import java.text.DateFormat; import java.text.SimpleDateFormat; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; public final class Date_Time extends JFrame{ private static final long serialVersionUID = 1L; private JPanel show_date_time = new JPanel(); private JLabel time = new JLabel("Time:"); private JLabel show_time = new JLabel("Show Time"); DateFormat dateFormat2 = new SimpleDateFormat("h:mm:ss a"); java.util.Date date2; private JLabel label; private JPanel panel; public Date_Time(){ this.setSize(300, 300); this.setResizable(false); getContentPane().add(Show_Time_date()); } private JButton button1 = new JButton(); private JFrame frame1 = new JFrame(); public JPanel Show_Time_date(){ frame1.add(show_date_time); show_date_time.setBackground(Color.ORANGE); frame1.add(button1); getShow_date_time().setLayout(null); Font f; f = new Font("SansSerif", Font.PLAIN, 15); getTime().setBounds(0,250,400,30); getTime().setFont(f); getShow_date_time().add(getTime()); setShow_time(new JLabel("")); updateDateTime(); getShow_time().setBounds(37,250,400,30); getShow_time().setFont(f); getShow_date_time().add(getShow_time()); return getShow_date_time(); } public static void main(String[] args) { Date_Time Main_win=new Date_Time(); Main_win.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); Main_win.setVisible(true); } public void updateDateTime() { Thread th = new Thread(new Runnable() { @Override public void run() { while(true) { date2 = new java.util.Date(); String dateTime = dateFormat2.format(date2); getShow_time().setText(dateTime); getShow_time().updateUI(); } } }); th.start(); } /** * @return the show_time */ public JLabel getShow_time() { return show_time; } /** * @param show_time the show_time to set */ public void setShow_time(JLabel show_time) { this.show_time = show_time; } /** * @return the time */ public JLabel getTime() { return time; } /** * @param time the time to set */ public void setTime(JLabel time) { this.time = time; } /** * @return the show_date_time */ public JPanel getShow_date_time() { return show_date_time; } /** * @param show_date_time the show_date_time to set */ public void setShow_date_time(JPanel show_date_time) { this.show_date_time = show_date_time; } /** * @return the label1 */ /** * @param label1 the label1 to set */ /** * @return the label */ public JLabel getLabel() { return label; } /** * @param label the label to set */ public void setLabel(JLabel label) { this.label = label; } /** * @return the panel */ public JPanel getPanel() { return panel; } /** * @param panel the panel to set */ public void setPanel(JPanel panel) { this.panel = panel; } }

    Read the article

  • Non-Dom Element Event Binding with jQuery

    - by Rick Strahl
    Yesterday I had a short discussion with Dave Reed on Twitter regarding setting up fake ‘events’ on objects that are hookable. jQuery makes it real easy to bind events on DOM elements and with a little bit of extra work (that I didn’t know about) you can also set up binding to non-DOM element ‘event’ bindings. Assume for a second that you have a simple JavaScript object like this: var item = { sku: "wwhelp" , foo: function() { alert('orginal foo function'); } }; and you want to be notified when the foo function is called. You can use jQuery to bind the handler like this: $(item).bind("foo", function () { alert('foo Hook called'); } ); Binding alone won’t actually cause the handler to be triggered so when you call: item.foo(); you only get the ‘original’ message. In order to fire both the original handler and the bound event hook you have to use the .trigger() function: $(item).trigger("foo"); Now if you do the following complete sequence: var item = { sku: "wwhelp" , foo: function() { alert('orginal foo function'); } }; $(item).bind("foo", function () { alert('foo hook called'); } ); $(item).trigger("foo"); You’ll see the ‘hook’ message first followed by the ‘original’ message fired in succession. In other words, using this mechanism you can hook standard object functions and chain events to them in a way similar to the way you can do with DOM elements. The main difference is that the ‘event’ has to be explicitly triggered in order for this to happen rather than just calling the method directly. .trigger() relies on some internal logic that checks for event bindings on the object (attached via an expando property) which .trigger() searches for in its bound event list. Once the ‘event’ is found it’s called prior to execution of the original function. This is pretty useful as it allows you to create standard JavaScript objects that can act as event handlers and are effectively hookable without having to explicitly override event definitions with JavaScript function handlers. You get all the benefits of jQuery’s event methods including the ability to hook up multiple events to the same handler function and the ability to uniquely identify each specific event instance with post fix string names (ie. .bind("MyEvent.MyName") and .unbind("MyEvent.MyName") to bind MyEvent). Watch out for an .unbind() Bug Note that there appears to be a bug with .unbind() in jQuery that doesn’t reliably unbind an event and results in a elem.removeEventListener is not a function error. The following code demonstrates: var item = { sku: "wwhelp", foo: function () { alert('orginal foo function'); } }; $(item).bind("foo.first", function () { alert('foo hook called'); }); $(item).bind("foo.second", function () { alert('foo hook2 called'); }); $(item).trigger("foo"); setTimeout(function () { $(item).unbind("foo"); // $(item).unbind("foo.first"); // $(item).unbind("foo.second"); $(item).trigger("foo"); }, 3000); The setTimeout call delays the unbinding and is supposed to remove the event binding on the foo function. It fails both with the foo only value (both if assigned only as “foo” or “foo.first/second” as well as when removing both of the postfixed event handlers explicitly. Oddly the following that removes only one of the two handlers works: setTimeout(function () { //$(item).unbind("foo"); $(item).unbind("foo.first"); // $(item).unbind("foo.second"); $(item).trigger("foo"); }, 3000); this actually works which is weird as the code in unbind tries to unbind using a DOM method that doesn’t exist. <shrug> A partial workaround for unbinding all ‘foo’ events is the following: setTimeout(function () { $.event.special.foo = { teardown: function () { alert('teardown'); return true; } }; $(item).unbind("foo"); $(item).trigger("foo"); }, 3000); which is a bit cryptic to say the least but it seems to work more reliably. I can’t take credit for any of this – thanks to Dave Reed and Damien Edwards who pointed out some of these behaviors. I didn’t find any good descriptions of the process so thought it’d be good to write it down here. Hope some of you find this helpful.© Rick Strahl, West Wind Technologies, 2005-2010Posted in jQuery  

    Read the article

  • Event Driven Programming 101

    - by JHarley1
    Good Morning, I previously asked the Q. of how Event Handlers Work (which I got a great answer for). I would now like to understand the basics of how are events are associated with on-screen objects? An explanation of how Events are associated with on Screen Objects: The application registers the Event, the Event Handler and the Component with the GUI Server. When an Event is detected the GUI Server has to link an Event to a Window and then to a Component, it then consults the Event / Component Table to identify which Handler (s) to be executed. I am having problems finding resources/papers that have mention of this process - especially of a Event / Component Table - can anyone clarify?

    Read the article

  • disable the Home Button and Back Button"

    - by michael
    i want way to disable the Home Button & Back Button when click on checkbox in application , my application on version 4.2.2 i have code but not work when click on checkbox work stop to application public void HardButtonOnClick(View v) { boolean checked1 = ((CheckBox) v).isChecked(); if(checked1) { SQLiteDatabase db; db = openOrCreateDatabase("Saftey.db", SQLiteDatabase.CREATE_IF_NECESSARY, null); db.setVersion(1); db.setLocale(Locale.getDefault()); db.setLockingEnabled(true); ContentValues values = new ContentValues(); values.put("hardBtn", "YES"); db.update("Setting", values, "id = ?", new String[] { "1" }); Toast.makeText(this, "Hard Button Locked", Toast.LENGTH_LONG).show(); //SharedPreferences pref = getSharedPreferences("pref",0); //SharedPreferences.Editor edit = pref.edit(); //edit.putString("hard","yes"); //edit.commit(); /* String Lock="yes" ; Bundle bundle = new Bundle(); bundle.putString("key", Lock); Intent a = new Intent(Change_setting.this, ChildMode.class); a.putExtras(bundle); startActivity(a);*/ super.onAttachedToWindow(); this.getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD); isLock = true; } else { SQLiteDatabase db; db = openOrCreateDatabase("Saftey.db", SQLiteDatabase.CREATE_IF_NECESSARY, null); db.setVersion(1); db.setLocale(Locale.getDefault()); db.setLockingEnabled(true); ContentValues values = new ContentValues(); values.put("hardBtn", "NO"); db.update("Setting", values, "id = ?", new String[] { "1" }); //SharedPreferences pref = getSharedPreferences("pref",0); //SharedPreferences.Editor edit = pref.edit(); //edit.putString("hard","no"); //edit.commit(); Toast.makeText(this, "Hard Button Un-Locked", Toast.LENGTH_LONG).show(); isLock = false; } } how can work it??

    Read the article

  • as3 - controlling flicker when scaling up a button or movieclip

    - by sol
    This is a situation I run into a lot but never seem to find a good solution. I have movieclips that I scale up slightly on rollover, but if you hover over the edge of the movieclip it just sits there and flickers, continuously receiving mouseOver and mouseOut events. How do you deal with this? Again, it's usually a problem when tweening the scale of a movieclip or button. my_mc.addEventListener(MouseEvent.MOUSE_OVER, mOver); my_mc.addEventListener(MouseEvent.MOUSE_OUT, mOut); private function mOver(m:MouseEvent) { TweenLite.to(m.target, .2, { scaleX:1.1, scaleY:1.1} ); } private function mOut(m:MouseEvent) { TweenLite.to(m.target, .2, { scaleX:1, scaleY:1} ); }

    Read the article

  • WPF DataGrid button style

    - by imekon
    If I have a DataGrid in a XAML form, and add the following style: <Style TargetType="Button"> <Setter Property="Margin" Value="2"/> </Style> The data grid locks up the application. I found if I put the style into a resource block that isn't seen by any data grid, then it seems to be happy. However, if I want to have the style above applied to all buttons on my window, I have to put it in various resource blocks that cannot be seen by the data grid. Is there any way to avoid this?

    Read the article

  • Handling button click in ASP.NET MVC 2 RTM

    - by Leniel Macaferi
    I have a View in which the user is able to upload a file to the server. In this view I also have 2 buttons: one to Upload a file and other to Download the last file imported. In my Controller I created 2 action methods: Import and Export. How could I manage to redirect each button click to the proper action method in my Controller? I have tried Html.ActionLink: <%= Html.ActionLink("Upload", "Import", "OracleFile")%> <%= Html.ActionLink("Download", "Export", "OracleFile")%> Html.ActionLink didn't do the trick. The action links were taking me to the right Action methods but they were generating a GET request. This way Request.Files.Count = 0. I need a POST request.

    Read the article

  • Javascript back button for iframe parent window

    - by DisgruntledGoat
    I have some pages with iframes in them. I want to add a link/button inside the iframe, to make the browser go back one page in history. But I want the PARENT to go back, not the iframe itself. I originally had this, which makes the iframe page go back (if it exists): <a href="javascript:history.back()">&laquo; Go back</a> I've tried window.parent.history.back() and window.parent.document.history.back() but neither one works. There are no cross-domain issues accessing the iframe from the parent and vice-versa.

    Read the article

  • How can web form content be preserved for the back button

    - by Peter Howe
    When a web form is submitted and takes the user to another page, it is quite often the case that the user will click the Back button in order to submit the form again (the form is an advanced search in my case.) How can I reliably preserve the form options selected by the user when they click Back (so they don't have to start from scratch with filling the form in again if they are only changing one of many form elements?) Do I have to go down the route of storing the form options in session data (cookies or server-side) or is there a way to get the browser to handle this for me? (Environment is PHP/JavaScript - and the site must work on IE6+ and Firefox2+)

    Read the article

  • Track button click within a iframe

    - by philgo20
    Hi, Is it possible to track a button click within an iFrame if i don't have control over the external website or it's contents? (very fictionnal example)if i had an iframe like this: <iframe src="http://www.johnny.com/plugins/like.php?href=http%253A%252F%252Fexample.com%252Fpage%252Fto%252Flike&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;font&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:80px;" allowTransparency="true"></iframe>

    Read the article

  • getelementbyid issue with radio button

    - by Nelson Silva
    I'm trying to make an alert with the value of the selected radio button, but I allways get the first of them, regardless the one I choose...(Acompanhado); html: <form/> <input type="radio" class="simple_form" name="grupo_1" value="Acompanhado" id="saida"/> <span class="texto">Acompanhado</span> <input type="radio" class="simple_form" name="grupo_1" value="Individual" id="saida"/> <span class="texto">Individual</span> </form> js: function save() { var saida_js = document.getElementById('saida').value; alert("Tipo de saida: " + saida_js); } Any idea ?

    Read the article

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