onselect

Can I get a Javascript event from the selection of text outside of text or textarea?

你。 提交于 2019-12-01 11:45:01
I would like to know when a user selects text in an html page using Javascript. The text should not be editable. The onselect event seems to be only applicable to <textarea> and <input type="TEXT"> tags. The event is not fired if either tag is disabled. Is there a way around this with these tags? Is there a completely different approach? Sampson Sure, an example exists here: http://www.codetoad.com/javascript_get_selected_text.asp Using what you see here, you could bind events to the click/release events of the document body, and check to see if there is a selection, and how long the selection

Click Listener on ListView

丶灬走出姿态 提交于 2019-12-01 00:11:59
I have modified this example from the SDK pages to grab all the Contact Groups from the phone and display them. I cannot, however, figure out how to click one of them and then use the Groups._ID to do something else. Can someone teach me how to get a click/select listener on this list? MyListAdapter.java package com.example.simplelist; import android.app.ListActivity; import android.database.Cursor; import android.os.Bundle; import android.provider.Contacts.Groups; import android.widget.ListAdapter; import android.widget.SimpleCursorAdapter; public class MyListAdapter extends ListActivity {

problem with jquery datepicker onselect

泄露秘密 提交于 2019-11-29 13:13:04
Following the basic onSelect spec on the jquery site I tried the following code: <!DOCTYPE html> <html> <head> <link type="text/css" href="http://jqueryui.com/latest/themes/base/ui.all.css" rel="stylesheet" /> <script type="text/javascript" src="http://jqueryui.com/latest/jquery-1.3.2.js"></script> <script type="text/javascript" src="http://jqueryui.com/latest/ui/ui.core.js"></script> <script type="text/javascript" src="http://jqueryui.com/latest/ui/ui.datepicker.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("#datepicker").datepicker(); $('#datepicker')

problem with jquery datepicker onselect

南楼画角 提交于 2019-11-28 07:07:40
问题 Following the basic onSelect spec on the jquery site I tried the following code: <!DOCTYPE html> <html> <head> <link type="text/css" href="http://jqueryui.com/latest/themes/base/ui.all.css" rel="stylesheet" /> <script type="text/javascript" src="http://jqueryui.com/latest/jquery-1.3.2.js"></script> <script type="text/javascript" src="http://jqueryui.com/latest/ui/ui.core.js"></script> <script type="text/javascript" src="http://jqueryui.com/latest/ui/ui.datepicker.js"></script> <script type=

jQuery datepicker, onSelect won't work

耗尽温柔 提交于 2019-11-27 19:15:11
I can't get onSelect working on my jQuery datepicker . Heres my code: <script type="text/javascript"> $(function() { $('.date-pick').datePicker( { onSelect: function(date) { alert(date) }, selectWeek: true, inline: true, startDate: '01/01/2000', firstDay: 1, }); }); </script> It's like it doesn't register the onSelect function. What am I doing wrong? No comma after the last property. Semicolon after alert(date); Case on datepicker (not datePicker) Check your other uppercase / lowercase for the properties. $(function() { $('.date-pick').datepicker( { onSelect: function(date) { alert(date); },