Displaying 20 results from an estimated 23 matches for "onkeypress".
Did you mean:
keypress
2006 Feb 24
0
observe_field and onkeypress
...in the docs, it says:
The frequency (in seconds) at which changes to this field will be
detected. Not setting this option at all or to a value equal to or less
than zero will use event based observation instead of time based
observation.
I''d like my field to make an ajax call for the onkeypress event, rather
than every 1 second or so. I thought it might do this if I omited
:frequency, but it doesn''t seem to do anything. Is there a way to set
this?
--
Posted via http://www.ruby-forum.com/.
2006 Jun 19
2
Autocompleter enhancement feature request
...one
character must be typed for autocomplete to kick in.
http://dev.rubyonrails.org/ticket/5435
I have also made some code changes directly in the script
Event.observe(this.element, "blur", this.onBlur.bindAsEventListener(this));
Event.observe(this.element, "keypress", this.onKeyPress.bindAsEventListener(this));
Event.observe(this.element, "focus", this.onKeyPress.bindAsEventListener(this));
The last line is what I have added.
And then I have commented some code:
onObserverEvent: function() {
this.changed = false;
// if(this.getToken().length>=this....
2006 Feb 13
2
[PATCH] Allow generic autocompleter (Ajax.Watcher)
...this.element = $(element);
+ this.url = url;
+ this.callback = callback;
+ this.observer = null;
+ this.active = false;
+ this.changed = false;
+ Event.observe(this.element, "keypress",
this.onKeyPress.bindAsEventListener(this));
+ if (this.options.firstRun) {
+ this.onObserverEvent();
+ }
+ },
+ onKeyPress: function(event) {
+ this.changed = true;
+ this.hasFocus = true;
+
+ if(this.observer) clearTimeout(this.observer);
+ th...
2006 Mar 08
4
Event.Observer - (was: Ajax.Autompleter not working on IE)
See if I can stir up a little life with a demo. I can''t believe that
Ajax.Autocomplete doesn''t work on IE, so I *must* be doing something
wrong.
Trying to figure this out I added some alerts to control.js and it
seems that IE is not getting the onkeypress events.
So, here''s a demo:
http://hank.org/demos/form.html
That contains two fields with onkeypress events:
<input name="email" type="text" id="form226email" onkeypress="javascript: alert(''key pressed'')" />
and
<i...
2006 Mar 03
11
event.keyCode broken in prototype?
I ran 2 tests. One using proto''s Event.observe, and another using an
in-line handler of the "keydown" event in a textbox.
Using .bindAsEventListener, the event.keyCode is always returning a
capital letter, no matter what. The in-line event handler returns
lowercase vs. uppercase correctly... What''s going on?
I guess I find it hard to believe no one has tried
2006 Aug 31
2
Event.observe problem
...ent.all) key = e.keyCode
alert(''Unicode value of key pressed was '' + e.keyCode);
}
window.onload = function(){ Event.observe($(''testselect''), ''keypress'',
handler);}
//--></script>
<form>
Inline: <input type="text" onKeyPress="handler()">
Observing: <input id="testselect" />
</form>
Let''s say, I press an "s" key. In the first, inline event, it alerts
keyCode 115 =s. Doing the same in the observed input it alerts keyCode
83=S. Somehow the Event.observer capitalizes...
2007 Jul 16
4
Problem with keypress event handling
...a cross browser Javascript control that enhances the
HTML text input element in order to accept only digits (more or less).
Supposing that ''domText'' is the DOM element corresponding to the HTML
text input, we wrote the following:
Event.observe(domText, "keypress",
this.onKeyPress.bindAsEventListener(this));
where
this.onKeyPress = function(evt) {
var evtc = evt.keyCode; // char code for IE and Opera
if (evtc == 0 || evtc == null) {
// Firefox
evtc = evt.charCode;
}
if (evtc >= 48 && evtc <= 57) {
// Digit...
2006 Nov 30
12
Disable autocomplete (Ajax.Autocompleter) on the fly.
I''m sure there is an easy way to do this, but it is one of those things
that is incredibly difficult to search for.
How can I disable an ''Ajax.Autocompleter'' element from working ''on the
fly''? I have a page where I''m using two (I know it''s crazy)
Ajax.Autocompleter elements and once one of them has got a result I
want the other field
2005 Nov 14
1
keystrokes from browser
Gmail has keystrokes now and I''m kind of jealous. What javascript
library are they using? Any tips or leads on helper functions?
-Mike
2010 Oct 11
0
Converting observe_field to UJS in Rails 3
...lt;br/>
<% if params[:area] != nil%>
<% form_tag({:action => "foo"},{:id => "search"}) do %>
<%= label_tag(:query, "Search for:") %>
<%= text_field_tag("query", params[:query], :autocomplete =>
"off" , :onKeyPress=>"return disableEnterKey(event)") %>
<% end %>
<%= observe_field ''query'', :frequency => 2,
:update => "search_results",
:url => {:controller => params[:area], :action =>
"search",:area => params[:...
2006 Mar 07
2
ipw can not work in adhoc mode
...uot;headerlogoright">
<h2 class="blockhide">Peripheral Links</h2>
<div id="searchnav">
<ul id="searchnavlist">
<li>Text Size: <a href="#"
onkeypress="return false;"
onclick="setActiveStyleSheet('Normal Text'); return false;"
title="Normal Text Size">Normal</a> / <a
href="#" onkeypress="return false;"
onc...
2007 Jan 22
0
How to stop return key from submitting form
...t in a form_observer in hopes that I could trap the return key in
there, but no joy; the submit button "sees it" first and goes on to the
next page instead of adding the item.
I did a search and all I found was the addition of some javascript to
the options for the field tag, like this:
:onkeypress => "return event.keyCode != 13 || ($(''add'').click(),false)"
Unfortunately this doesn''t seem to work either. Also didn''t work with a
''10'' in there (I''m on a Mac so I thought it might see it as a LF
instead).
Any help for...
2007 Jul 26
0
Problems with RJS & Ajax
I try to create an "onKeypress" event handler for a form but nothing
works!
I have already studied the reference books on Ajax, but that didn''t
help.
Can someone explain me how todo this?
These are the code-snippets:
1) application.js
var GridControlTracker = {}
GridControlTracker = {
gridEventHandler: functi...
2010 Oct 18
0
Ajax call-request.xhr? = false Rails 3
..._for({:controller => params[:area], :action
=> :search, :area => params[:area] }), :method => :get, :remote =>
true do %>
<%= label_tag(:query, "Search for:") %>
<%= text_field_tag("query", params[:query], :autocomplete =>
"off", :onKeyPress=>"return disableEnterKey(event)") %>
<%= submit_tag("Search", :name => nil, ) %>
On reaching the controller in question request.xhr? is = to false
Anyone has any ideas why? or what am I doing wrong.
I have prototype.js and rails.js files loaded in my la...
2006 Jun 21
0
Ajax.Autocompleter and onchange event
Hello,
currently I''m working on a JavaScript-on-screen-keyboard for use with touch screens. To autocomplete inputs I want to use the Ajax.Autocompleter control. The problem is that Ajax.Autocompleter only responds to onkeypress events made with a real keyboard, but my on-screen-keyboard causes onchange events when a letter is clicked and appended to the input field. So, is there a way to make Ajax.Autocompleter work with onchange events?
Thanks,
M
______________________________________________________________
Verschi...
2005 Sep 20
1
Tabular structure where you can use keyboard to navigate up and down
Need some help in creating a table structure such that I can use the keyboard up/down keys to move through the rows.
Can anyone give me a pointer to this?
So, if I have 5 row in the table, I want to be able to use my keyboard to go up and down and select every row (without using the mouse).
Thanks,
Mandy.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2007 May 01
3
How to get TinyMCE editor value( text content)
...r. I dont know how to include
the submit button .
And also I wrote a javascript for getting the textarea content when the
user press the enter button. Its also not working. Why it is.
tinyMCE.init({
mode : "textareas",
});
<textarea name="msg" id=''msg'' onKeyPress="submit_on_enter(event)">
TinyMCE.</textarea>
function submit_on_enter(e)
{
var key;
if(window.event)
key = window.event.keyCode;
else
key = e.which
if(key == 13){
sendmsg();
$(''msg'').value='''';
}
re...
2006 Jan 17
5
NOOB: Numeric only input...can it be done on client?
I was wondering if there''s a way to limit what a user is typing on the
keyboard to only valid numeric input. Is there a simple plugin or something
which would allow this? I guess with AJAX it could also be one. Has anyone
already solved this requirement? Thanks in advance.
James
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2006 May 12
7
RJS and page.select collection size
I need to implement a conditional in my RJS template which looks
something like:
if (page.select(''row1'').first != null)
page << "new TableRow.MoveAfter(''row1'', ''newrow'');"
else
page << "new TableRow.MoveAfter(''row2'', ''newrow'');"
end
Now, dumb question.. My
2009 Jul 16
2
[PATCH server] updated anyterm/ovirt integration
...+ if (!open) {
+ alert("Connection is not open");
+ return;
+ }
+ open=false;
+ var resp = sync_load(url_prefix+"anyterm-module","a=close&s="+session+cachebust());
+ handle_resp_error(resp); // If we get an error, we still close everything.
+ document.onkeypress=null;
+ document.onkeydown=null;
+ window.onbeforeunload=null;
+ var e;
+ while (e=frame.firstChild) {
+ frame.removeChild(e);
+ }
+ frame.className="";
+ if (on_close_goto_url) {
+ document.location = on_close_goto_url;
+ }
+}
+
+
+function get_anyterm_version() {
+ var sv...