Search Results

Search found 2764 results on 111 pages for 'onclick'.

Page 8/111 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • Passing additional arguments into the OnClick event handler of a LinkButton using Javascript

    - by Jens Ameskamp
    Hi! I have a ASP.NET Website, where, in a GridView item template, automatically populated by a LinqDataSource, there is a LinkButton defined as follows: <asp:LinkButton ID="RemoveLinkButton" runat="server" CommandName="Remove" CommandArgument='<%# DataBinder.GetPropertyValue(GetDataItem(), "Id")%>' OnCommand="removeVeto_OnClick" OnClientClick='return confirm("Are you sure?");' Text="Remove Entry" /> This works fine. Whenever the Button is Clicked, a confirmation dialog is displayed. What I am trying to do now, is to allow the user to enter a reason for the removal, and pass this on the the OnClick event handler. How would I do this? I tried OnClientClick='return prompt("Enter your reason!");', but, of course, that did not work =)

    Read the article

  • Ctrl+Click / Command+Click not working with analytics

    - by user347998
    Hi All, I created my own analytics for my site to track outbound click events using jquery. Now the thing with preventDefault() is that it does not allow for the Ctrl+Click or COmmand+click operation in the browser to open the link in new tab/window. So my solution was to detect e.metaKey || e.ctrlKey and use window.open. This does not work very great with safari unless the user changes browser behavior. I am wondering if anyone here knows what other analytics users do - like how does google etc deal with this problem in tracking outbound links? From this link: http://www.google.com/support/googleanalytics/bin/answer.py?hl=en&answer=55527 - looks like google will also face the same problem. Thoughts?

    Read the article

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

    - by JPJedi
    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. Below is the code for the button that calls the javascript. <asp:Button ID="btnEULAPrint" Text="Print" runat="server" ValidationGroup="EULA" OnClientClick="javascript:CallPrint('EULA');return false;"/> Anyone have any ideas or links they could share to point me in a direction? Thanks

    Read the article

  • jquery jumps to top on click event, return false or prevenDefault doesn't work

    - by Sebsemillia
    Hi, I have written a simple jquery script for a content slider. My problem is that the screen always jumps to the top position of the parent div when sliding the content. I've tried return false and preventDefault to cope with this effect, but the two just make the script not work anymore, nothing happens when I click the links.. So here is the jquery code: $(document).ready(function (){ var itemCount = $('.container div').size(); var itemWidth = $('.container div').width(); $('.container').wrap('<div id="AboutSlider"></div>'); $('#AboutSlider').css({'width':'640px', 'overflow':'hidden', 'position':'relative', 'height':'400px'}); $('#AboutSlider .container').css({'width':itemCount*itemWidth+'px', 'position':'absolute', 'height':'400px'}); $('.container .aboutContent').css({'padding-left':'0px'}); $('#AboutSlider .aboutContent').css({'width':'640px', 'float':'left', 'min-height':'400px'}); $('#AboutNav a').click(function(){ var integer = $(this).attr('rel'); $('#AboutSlider .container').animate({left:-640*(parseInt(integer)-1)}) $('#AboutNav a').each(function(){ $(this).removeClass('active'); if($(this).hasClass('button'+integer)){ $(this).addClass('active')} }); }); }); And here the respective html bit: <div id="Dienstleistungen"> <div class="left_column"> <h2>Meine Dienstleistungen</h2> <h3>KOMPETENZEN</h3> <ul id="AboutNav"> <li><h1><a href="#Kompetenzen" class="button1 active" rel="1" title="Frontend Entwicklung | Sebastian B&ouml;hme">&Uuml;berblick</a></h1></li> <li><h1><a href="#Frontend" class="button2" rel="2" title="Frontend Entwicklung | Sebastian B&ouml;hme">Frontend Entwicklung</a></h1></li> <li><h1><a href="#CMS" class="button3" rel="3" title="Content Management Systeme &amp; Online Shops | Sebastian B&ouml;hme">Content Management Systeme &amp; Online Shops</a></h1></li> <li><h1><a href="#SEO" class="button4" rel="4" title="Suchmaschinenoptimierung (SEO) | Sebastian B&ouml;hme">Suchmaschinenoptimierung (SEO)</a></h1></li> <li><h1><a href="#ScreenDesign" class="button5" rel="5" title="Screen Design | Sebastian B&ouml;hme">Screen Design</a></h1></li> <li><h1><a href="#Hand" class="button6" rel="6" title="Alles aus einer Hand | Sebastian B&ouml;hme">Alles aus einer Hand</a></h1></li> </ul> </div> <div class="container"> <div id="Kompetenzen" class="aboutContent right_columns"> <h1>&Uuml;berblick</h1> <p>Phasellus in massa. Curabitur dolor eros, gravida et, hendrerit ac, cursus non, massa. Aliquam lorem. In hac habitasse platea dictumst. Cras eu mauris. Quisque lacus. Donec ipsum. Nullam vitae sem at nunc pharetra ultricies. Vivamus elit eros, ullamcorper a, adipiscing sit amet, porttitor ut, nibh. Maecenas adipiscing mollis massa. Nunc ut dui eget nulla venenatis aliquet. Sed luctus posuere justo. Cras vehicula varius turpis. Vivamus eros metus, tristique sit amet, molestie dignissim, malesuada et, urna. </p> <p>Teng sit amet, porttitor ut, nibh. Maecenas adipiscing mollis massa. Nunc ut dui eget nulla venenatis aliquet. Sed luctus posuere justo. Cras vehicula varius turpis. Vivamus eros metus, tristique sit amet, molestie dignissim, malesuada et, urna. </p> </div> <hr /> <div id="Frontend" class="aboutContent right_column "> <h1>Frontend Entwicklung</h1> <p>Phasellus in massa. Curabitur dolor eros, gravida et, hendrerit ac, cursus non, massa. Aliquam lorem. In hac habitasse platea dictumst. Cras eu mauris. Quisque lacus. Donec ipsum. Nullam vitae sem at nunc pharetra ultricies. Vivamus elit eros, ullamcorper a, adipiscing sit amet, porttitor ut, nibh. Maecenas adipiscing mollis massa. Nunc ut dui eget nulla venenatis aliquet. Sed luctus posuere justo. Cras vehicula varius turpis. Vivamus eros metus, tristique sit amet, molestie dignissim, malesuada et, urna. </p> <p>Teng sit amet, porttitor ut, nibh. Maecenas adipiscing mollis massa. Nunc ut dui eget nulla venenatis aliquet. Sed luctus posuere justo. Cras vehicula varius turpis. Vivamus eros metus, tristique sit amet, molestie dignissim, malesuada et, urna. </p> </div> <hr /> <div id="CMS" class="aboutContent right_column "> <h1>Content Management Systeme &amp; Online Shops</h1> <p>Phasellus in massa. Curabitur dolor eros, gravida et, hendrerit ac, cursus non, massa. Aliquam lorem. In hac habitasse platea dictumst. Cras eu mauris. Quisque lacus. Donec ipsum. Nullam vitae sem at nunc pharetra ultricies. Vivamus elit eros, ullamcorper a, adipiscing sit amet, porttitor ut, nibh. Maecenas adipiscing mollis massa. Nunc ut dui eget nulla venenatis aliquet. Sed luctus posuere justo. Cras vehicula varius turpis. Vivamus eros metus, tristique sit amet, molestie dignissim, malesuada et, urna. </p> <p>Teng sit amet, porttitor ut, nibh. Maecenas adipiscing mollis massa. Nunc ut dui eget nulla venenatis aliquet. Sed luctus posuere justo. Cras vehicula varius turpis. Vivamus eros metus, tristique sit amet, molestie dignissim, malesuada et, urna. </p> </div> <hr /> <div id="SEO" class="aboutContent right_column "> <h1>Suchmaschinenoptimierung (SEO)</h1> <p>Phasellus in massa. Curabitur dolor eros, gravida et, hendrerit ac, cursus non, massa. Aliquam lorem. In hac habitasse platea dictumst. Cras eu mauris. Quisque lacus. Donec ipsum. Nullam vitae sem at nunc pharetra ultricies. Vivamus elit eros, ullamcorper a, adipiscing sit amet, porttitor ut, nibh. Maecenas adipiscing mollis massa. Nunc ut dui eget nulla venenatis aliquet. Sed luctus posuere justo. Cras vehicula varius turpis. Vivamus eros metus, tristique sit amet, molestie dignissim, malesuada et, urna. </p> <p>Teng sit amet, porttitor ut, nibh. Maecenas adipiscing mollis massa. Nunc ut dui eget nulla venenatis aliquet. Sed luctus posuere justo. Cras vehicula varius turpis. Vivamus eros metus, tristique sit amet, molestie dignissim, malesuada et, urna. </p> </div> <hr /> <div id="ScreenDesign" class="aboutContent right_column "> <h1>Screen Design</h1> <p>Phasellus in massa. Curabitur dolor eros, gravida et, hendrerit ac, cursus non, massa. Aliquam lorem. In hac habitasse platea dictumst. Cras eu mauris. Quisque lacus. Donec ipsum. Nullam vitae sem at nunc pharetra ultricies. Vivamus elit eros, ullamcorper a, adipiscing sit amet, porttitor ut, nibh. Maecenas adipiscing mollis massa. Nunc ut dui eget nulla venenatis aliquet. Sed luctus posuere justo. Cras vehicula varius turpis. Vivamus eros metus, tristique sit amet, molestie dignissim, malesuada et, urna. </p> <p>Teng sit amet, porttitor ut, nibh. Maecenas adipiscing mollis massa. Nunc ut dui eget nulla venenatis aliquet. Sed luctus posuere justo. Cras vehicula varius turpis. Vivamus eros metus, tristique sit amet, molestie dignissim, malesuada et, urna. </p> </div> <hr /> <div id="Hand" class="aboutContent right_column"> <h1>Alles aus einer Hand</h1> <p>Curabitur dolor eros, gravida et, hendrerit ac, cursus non, massa. Aliquam lorem. In hac habitasse platea dictumst. Cras eu mauris. Quisque lacus. Donec ipsum. Nullam vitae sem at nunc pharetra ultricies. Vivamus elit eros, ullamcorper a, adipiscing sit amet, porttitor ut, nibh. Maecenas adipiscing mollis massa. Nunc ut dui eget nulla venenatis aliquet. Sed luctus posuere justo. Cras vehicula varius turpis. Vivamus eros metus, tristique sit amet, molestie dignissim, malesuada et, urna. </p> <p>Teng sit amet, porttitor ut, nibh. Maecenas adipiscing mollis massa. Nunc ut dui eget nulla venenatis aliquet. Sed luctus posuere justo. Cras vehicula varius turpis. Vivamus eros metus, tristique sit amet, molestie dignissim, malesuada et, urna. </p> </div> </div><!-- AboutSlider --> </div><!-- Dienstleistungen --> somebody got any idea? Thanks a lot in advance!!

    Read the article

  • vertical navigation that shows hidden submenu on click using JQuery

    - by user346602
    Hi, I am trying to make a menu that works like the one on this flash site: http://elevensix.de/ When I click "portfolio", only then to the subnavigation links reveal themselves. Right now I have only managed to get a typical vertical "reveal subnavigation on hover menu" working. What is required is that once the appropriate menu item it cicked, its submenu shows. This submenu remains revealed as the submenu items are hovered over then selected. When the submenu item is selected, the content shows, and both the menu and submenu remain visible (the selected menu and submenu item are given a distinct colour to show the navigation path). Whew. Here is my html: <div id="nav"> <ul> <li><a href="#">about</a></li> <li><a href="#">testimonials</a> <ul> <li><a href="#">testimonial1</a></li> <li><a href="#">testimonial2</a></li> <li><a href="#">testimonial3</a></li> <li><a href="#">testimonial4</a></li> </ul> </li> <li><a href="#">Services</a> <ul> <li><a href="#">services1</a></li> <li><a href="#">services2</a></li> <li><a href="#">services3</a></li> <li><a href="#">services4</a></li> </ul> </li> <li><a href="#">Gallery</a></li> <li><a href="#">Contact</a></li> </ul> </div><!--end #nav--> and here is my css: #nav { width:160px; position: relative; top: 250px; left: 20px; } #nav ul { margin:0px; padding:0px; } #nav ul li { line-height:24px; list-style:none; } #nav a { text-decoration: none; color: #9d9fa2; } #nav ul li a:hover { position:relative; color: #00aeef; } #nav ul ul { display:none; position:absolute; left:160px; top:4px; } #nav ul li:hover ul { display:block; color: #00aeef; } #nav ul ul li { width:160px; float:left; display:inline; line-height:16px; } .selected { color: #00aeef !important; } Should I be giving the submenus a class so that I can hide then show them? And where would the class be applied? To the ul? could I use the same class for both submenus? Am I wrong in how I am applying the display:none values for this purpose? Many thanks to all the clever people on here.

    Read the article

  • Why does a checkbox's "checked" attribute return the opposite of it's actual value on click event?

    - by Kappers
    I've got the following HTML <li><input type="checkbox" /><label>This is the label!</label></li> I bound a click event to the li, and let the click event bubble up to the li before doing anything else. $('li').each(function(i){ var item = $(this); var checkbox = $("input[type='checkbox']", item); item.bind('click', function(e){ var isChecked = checkbox.is(':checked'); console.log(isChecked); e.stopPropagation(); }); }); Starting with an unchecked checkbox, when the click event fires, isChecked returns true when I click on the checkbox, but returns false when I click on the label or li. Does anyone know why?

    Read the article

  • LinkButton not firing OnClick event in Accordion

    - by lampej
    I have not been able to get the break point I have on LinkButtonDelete_Click to fire. Is there a trick to dealing with buttons inside of Accordions? Thank you. <cc1:Accordion ID="Accordion1" runat="server" DataSourceID="ObjectDataSource1" SelectedIndex="-1" RequireOpenedPane="false"> <HeaderTemplate> <asp:Label ID="LabelDisplayName" runat="server" Text='<%#Bind("FirstName") % >'></asp:Label> </HeaderTemplate> <ContentTemplate> <asp:LinkButton ID="LinkButtonDelete" runat="server" OnClick="LinkButtonDelete_Click" Text="Delete"></asp:LinkButton> ... </ContentTemplate> </cc1:Accordion> Public Sub LinkButtonDelete_Click(ByVal sender As Object, ByVal e As EventArgs) Dim button As LinkButton = CType(sender, LinkButton) ... End Sub

    Read the article

  • Line break in the mailto onclick

    - by malaki1974
    The code below works great except the email has all the text on one line like this: Height: 60 | Diagonal: 123 | Width: 107 | Total SF: 13.92 | Cost Per SF: 450 | Total Cost: $6,264.00 I would like to break after each so it looks like this: Height: 60 Diagonal: 123 Width: 107 Total SF: 13.92 Cost Per SF: 450 Total Cost: $6,264.00 I tried \n \r \n\r etc but none of them work. Any ideas? <a class="emailText" href="mailto:?subject=Screen Dimensions" onclick="this.href='mailto:?subject=Screen Dimensions&body='+'Height: '+document.forms.myform.high.value+' | '+'Diagonal: '+document.forms.myform.diagonal.value+' | '+'Width: '+document.forms.myform.wide.value+' | '+'Total SF: '+document.forms.myform.sf.value+' | '+'Cost Per SF: '+document.forms.myform.csf.value+' | '+'Total Cost: '+document.forms.myform.tc.value">Email</a>

    Read the article

  • Running a JavaScript code when a browser bookmark is clicked

    - by Arjun Vasudevan
    I've written a code that has successfully created a bookmark for any of the following browsers - IE, Firefox and Opera. function bookmark() { var title = 'Google'; var url = 'http://google.com'; if (document.all)// Check if the browser is Internet Explorer window.external.AddFavorite(url, title); else if (window.sidebar) //If the given browser is Mozilla Firefox window.sidebar.addPanel(title, url, ""); else if (window.opera && window.print) //If the given browser is Opera { var bookmark_element = document.createElement('a'); bookmark_element.setAttribute('href', url); bookmark_element.setAttribute('title', title); bookmark_element.setAttribute('rel', 'sidebar'); bookmark_element.click(); } } Now I want my bookmark to run a piece of JavaScript code instead of surfing to Google, when the user clicks on it.

    Read the article

  • Javascript Onclicks not working?

    - by Georges Oates Larsen
    I have a jQuery application which finds a specific div, and edit's its inner HTML. As it does this, it adds several divs with onclicks designed to call a function in my JS. For some strange reason, clicking on these never works if I have a function defined in my code set to activate. However, it works fine when calling "alert("Testing");". I am quite bewildered at this as I have in the past been able to make code-generated onclicks work just fine. The only thing new here is jQuery.

    Read the article

  • accepting click events in RelativeLayout

    - by skooter
    Ok, I have a RelativeLayout with a few TextViews as children <RelativeLayout android:id="@+id/shift_parent_name" android:layout_width="fill_parent" android:layout_weight="0.25" > <TextView android:id="@+id/shift_parent_nametitle" android:text="@string/shift_parent_nametitle" style="@style/header_text" /> <TextView android:id="@+id/shift_parent_namefield" android:layout_alignParentRight="true" android:layout_below="@id/shift_parent_nametitle" style="@style/wrap" /> How do I go about using the RelativeLayout as the button to react to a click event if any part of the area is pressed?

    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

  • Randomly generate sound from onClick and onShake events?

    - by Aaron
    I've literally looked everywhere on the net and found very little clarification on how to do this. Pretty much, I have 8 sound files laid out in an array.xml file and I need to play a randomly chosen file ONCE per or onClick or onShake. First off, what technique should I use to achieve this? ARRAY-RANDOM- STRING-PLAY? RANDOM INT-PLAY? RANDOM INT-STRING-PLAY? Any kind of direction will help greatly cause I'm almost 3 weeks worth of research into this. *NOTE: MediaPlayer mp = MediaPlayer.create(JelloMan.this, R.raw.sound) ...is what I'm stuck on being you can't replace the "R.raw" part with a string...

    Read the article

  • android button setPressed after onClick

    - by strem
    yesterday I noticed the possibility to integrate Fragments in older API Levels through the Compatibility package, but thats not really essential for the question. :) I have a Button with an OnClickListener Button button = (Button) findViewById(R.id.button); button.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { doSomething(); button.setPressed(true); } }); Because of the actual clicking, it is shown as pressed and after releasing the click, the button state is not pressed and stays that way. Is there a simple way that keeps the button state pressed after releasing? First thing I can think of would be some sort of timer, but that seems unreasonable.

    Read the article

  • Change the source of an image by clicking a thumbnail (without jQuery preferably using UpdatePanel)

    - by Batu
    For example, i have this ImageViewer.ascx UserControl: <div class="ImageTumbnails"> <asp:ListView ID="ImageList" runat="server" ItemPlaceholderID="ItemContainer"> <LayoutTemplate> <asp:PlaceHolder ID="ItemContainer" runat="server" /> </LayoutTemplate> <ItemTemplate> <asp:HyperLink runat="server" NavigateUrl='<%# Link.ToProductImage(Eval("ImageFile").ToString())%>'> <asp:Image runat="server" ImageUrl='<%# Link.ToThumbnail(Eval("ImageFile").ToString()) %>' /> </asp:HyperLink> </ItemTemplate> </asp:ListView> </div> <div class="ImageBig"> <asp:Image ID="ProductImageBig" runat="server" ImageUrl="" /> </div> When the thumbnail is clicked it will change the source of ProductImageBig with its hyperlink target. How can i achieve this using UpdatePanel ? ( Or will i be able to )

    Read the article

  • How to condense onclick code to be dynamic

    - by opbeta
    I am trying to get this onclick function code to be dynamic. I do not want to have 50 blocks of code for all the states. He is a quick snippet of the code var Ohio=function(){ document.getElementById('texas').style.display='none'; document.getElementById('florida').style.display='none'; document.getElementById('ohio').style.display='block'; } and so on and so forth..... How would I go about condensing this to make it smaller and dynamic?

    Read the article

  • How to add a click event to a textbox created in code

    - by jvcoach23
    I'm using silverlight 3 and i'd like to create a handler and event wired up to a mouse click in a text box that was created in code behind. Can someone point me in the right direction. I need to make it so that some things fire off when that textbox is clicked into. if you have an example in vb.net that would be even better. thanks shannon

    Read the article

  • “OnClick” action to asp.net dropdownlist item.

    - by Luís Custódio
    My situation is a little strange I guess, suggestion of engineering is acceptable. I have a DropDownList, on my "user" creation, called "city". When I'm creating the user I can create other city, but for this I have a button which redirect to other page. So, ok. I've created the new City and now I click on my DropDownList of cities and guess what?! The field is not reloaded. My first idea is every that I click on DropDownList, reload the data, but I can't find some OnClick action for Asp.Net DropDownList. This is my question, some idea? Thanks in advance.

    Read the article

  • How to make groupbox invisble on select of a radiobutton

    - by Aditya
    Hi, I am doing an Windows Application using XAML ,WPF in C#. I have 2 radio buttons called "WriteData" and "ReadData". when writeData is selected, I need groupbox with a textbox and browse button inside it to be displayed at a particular location, (this i have already designed in UI..) <GroupBox Header="Browse Data" Name="grpBrowseData" Height="78" VerticalAlignment="Top" HorizontalAlignment="Left" Width="1030"> <Grid Name="grdBrowse" Height="60" Width="1030"> <Button x:Name="btnBrowseButton" Margin="0,7.5,45,20" Content="Browse" Click="BrowseButton_Click" HorizontalAlignment="Right" Width="111" /> <TextBox x:Name="txtBxBrowseTB" Margin="46,13.993,185,17.5" Text="TextBox" TextWrapping="Wrap" TextChanged="BrowseTB_TextChanged" ></TextBox> <Label HorizontalAlignment="Left" Margin="-1.25,8.75,0,15" Name="label1" Width="47.5" FontSize="13" VerticalContentAlignment="Center" HorizontalContentAlignment="Center">Path:</Label> Now, if I select "ReadData" radio button, a combo box should be visible in the SAME LOCATION where the above groupbox is displayed, the xaml code for this <GroupBox Header="Select the Project" Name="grpSelectProject" Height="78" VerticalAlignment="Top" HorizontalAlignment="Left" Width="1030" Visibility="Visible" Margin="-1030,0,0,0"> <Grid Name="grdSelectProject" Height="60" Width="1030"> <Label HorizontalAlignment="Left" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Margin="0,11.662,0,20.825" Width="95.103">Select the Project</Label> <ComboBox Margin="119.952,13.994,493.969,16.66"></ComboBox> </Grid></GroupBox> so, how do I make only one visible as per the radio button selected. In the ReadData_click event i tried to make other groupbox invisble. but I wasnt able to do that. please help me. Thanks Ramm

    Read the article

  • Android: onListItemClick not getting called in ListActivity

    - by user521469
    I'm having problems with my first Android app. I have subclassed ListActivity, and I'm having no luck getting the overridden onListItemClick() to respond to click events. I've read focus can be a problem, but changing focus in the XML files does not seem to work. Here's the relevant bits of code. Anyone see what's I've buggered up? public class Notepadv1 extends ListActivity { private int mNoteNumber = 1; private NotesDbAdapter mDbHelper; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.notepad_list); mDbHelper = new NotesDbAdapter(this); mDbHelper.open(); fillData(); } private void fillData() { // Get all of the notes from the database and create the item list Cursor c = mDbHelper.fetchAllNotes(); startManagingCursor(c); String[] from = new String[] { NotesDbAdapter.KEY_TITLE }; int[] to = new int[] { R.id.text1 }; SimpleCursorAdapter notes = new SimpleCursorAdapter(this, R.layout.notes_row, c, from, to); setListAdapter(notes); } @Override public void onListItemClick (ListView l, View v, int position, long id){ super.onListItemClick(l, v, position, id); AlertDialog alert = new AlertDialog.Builder(this).create(); String message = "row clicked!"; alert.setMessage(message); alert.show(); } notepad_list.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content"> <ListView android:id="@android:id/list" android:layout_width="wrap_content" android:layout_height="wrap_content" android:dividerHeight="6dp"/> <TextView android:id="@android:id/empty" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/no_notes" /> </LinearLayout> And notes_row.xml <?xml version="1.0" encoding="utf-8"?> <TextView android:id="@+id/text1" xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="60dp" android:focusable="false"/>

    Read the article

  • saving values of editText in replaced fragment

    - by Eppo
    I have a 2 fragment layout, on the left fragment, i have a list of the different table names, on the right, i open up a different table depending on what is clicked on the right fragment. my intention, is that the first list item is clicked, then values will be entered on the table, next the second list item is clicked, the next table opens up and those values are entered. what would be the best way to store the values of the results entered in the editboxes, so i can process them all at once? I'm sure i can use onPause to save them all, but would that be the best way? Thanks

    Read the article

  • Change of a background image of a button on onclick event

    - by Alpan67
    Why does this not work ? In Firebug, when I click on the button, it always says to me that cambiaBandiera is not defined ... HELP Alex CSS ITA{ float:right; margin : 5px 85px; width:40px; height:40px; background : #FFFFFF url("../ITA_off.png") center center no-repeat; border:0; } JAVASCRIPT (in HEAD) style type="text/javascript" function cambiaBandiera() { test=document.getElementById("ITA"); test.style.backgroundImage="url('../ITA_on.png')"; } /style and this is HTML div id="bandiere" input type="button" id="ITA" onClick="cambiaBandiera()" /input /div

    Read the article

  • jQuery: If user clicks out of div

    - by Paul Knopf
    I am creating a popup in query. All is well with the popup on hover. I made it see a timer starts when user's mouse leaves the div to close it. If he enters the div again before the timer is done, then the timer is cleared. This is fine, but what if a user clicks out of the div? I want that to also close the div. The only problem is that I don't want to attach click events to the wrapper on the page (because it includes the popout menu). I have seen techniques that wraps entire screen with a transparent div, and then attach a click event to hit. Although this may work, it confuses the user if he clicks the hidden div intending to click a link. He will have to click the link twice. Once two close the div (hiding the link), and another time to actually click think. Also, you loose in mouse cursors attached to any masked elements on the page (such as links cursor pointer, etc). There has to be a way to check if the user clicked out of the div without a modal and without attaching events to the entire page (page wrappers and child elements included). onclicksomewhereelse="closeme();" lol.

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >