search for: preventdefault

Displaying 17 results from an estimated 17 matches for "preventdefault".

2008 Mar 21
4
Prototype.js event.stop(event) FF2 not working
stop: function(event) { if (event.preventDefault) { event.stopPropagation(); event.preventDefault(); } else { event.returnValue = false; event.cancelBubble = true; } } /* br original stop: function(event) { Event.extend(event); event.preventDefault(); event.stopPropagation(); event.stopped = true;...
2008 Jan 28
6
cancelling form submit
Anyone know why my form would still submit in firefox but not in IE? aspnetForm is the id of the form. I get the alert, but the form still submits. Event.observe(''aspnetForm'',''submit'',function(e){ alert(''submit''); var t = $F(''ctl00_ContentPlaceHolder1_NewTag'');
2006 Apr 03
5
Event.observe on IE
I''m working again on unloading events before making my ajax call. This code works on Firefox/Opera, but IE doesn''t seem to get the onclick events registered. Could someone with IE take a look? http://hank.org/demos/ajax3.html The js is included in that file. There''s alerts() to show when the events are registered. The idea of the code is to look for any
2006 Jun 15
3
RE: Yahoo!-like Eventobjectemulation/abstractioninPrototype?
...this.pageX = Event.pointerX(event); this.pageY = Event.pointerY(event); this.clientX = this.pageX - (document.documentElement.scrollLeft || document.body.scrollLeft); this.clientY = this.pageY - (document.documentElement.scrollTop || document.body.scrollTop); this.preventDefault = Event.stop.bind(Event, event); this.stopPropagation = Event.stop.bind(Event, event); } } ); There are probably more things that would need to be addressed; I just based this off of what functionality was in prototype ''cause I believe most of the remaining attributes/functions w...
2010 Sep 21
0
Upload form with uploadify jquery plugin
...;<%= u cookies[session_key_name] %>''), ''authenticity_token'' : encodeURIComponent(''<%= u form_authenticity_token if protect_against_forgery? %>'') } }); $(''#uploadify_submit'').click(function(event){ event.preventDefault(); $(''<%= photo_field %>'').uploadifyUpload(); $(''#uploadify_submit'').hide(); $(''#uploadify_cancel'').show(); }); $(''#uploadify_cancel'').click(function(event){ event.preventDefault(); $(''&l...
2011 Jul 07
0
Question of uploading large file using carrierwave, uploadify and nginx upload module
...code. (http://www.uploadify.com/documentation/) _form.html.haml = javascript_include_tag ''swfobject.js'', ''jquery.uploadify.v2.1.4.min.js'' :javascript $(document).ready(function() { $(''#attachment_file'').click(function(event){ event.preventDefault(); }); $(''#attachment_file'').uploadify({ buttonText: ''Select files'', uploader: ''/uploadify/uploadify.swf'', cancelImg: ''/uploadify/cancel.png'', multi: true, auto: false, script: ''...
2008 Jun 05
0
Javascript & Scrolling
...tive if wheel was scrolled up, * and negative, if wheel was scrolled down. */ if (delta) handle(delta); /** Prevent default actions caused by mouse wheel. * That might be ugly, but we handle scrolls somehow * anyway, so don''t bother here.. */ if (event.preventDefault) event.preventDefault(); event.returnValue = false; } // mozilla Event.observe(''plist_con'', ''DOMMouseScroll'', wheel); // IE/Opera Event.observe(''plist_con'', ''mousewheel'', wheel); function moveP(){...
2013 May 27
6
Headache with Ajax in Rails using jQuery
...%= submit_tag "Send" %> <% end %> <div id="result"></div> And here''s my Ajax code in jQuery: <script type="text/javascript"> $("#contactForm").submit(function(event) { /* stop form from submitting normally */ event.preventDefault(); /* clear result div */ $("#result").html(''''); /* get values from elements on the page: */ var values = $(this).serialize(); /* Send the data using post and put the results in a div */ $.ajax({ url: "/main/contact", type: "...
2011 Sep 10
4
Finding HTML attributes with jQuery in Rails 3.1
I''m having trouble wrapping my head around the proper syntax to have jQuery (in an .js file) grab an HTML attribute and use the value of that attribute to load a partial. HTML fragment: <a href="/toggle" data-remote="true" section="training"> jQuery string (now setting a static partial, I need this to be dynamic)
2014 Apr 26
0
jquery_ujs.js 404
...mpl.dispatch (extensions::event_bindings:401:17) at Function.target.(anonymous function) (extensions::SafeBuiltins:19:14) at publicClass.(anonymous function) [as dispatch] (extensions::utils:69:26) extensions::event_bindings:383 event.returnValue is deprecated. Please use the standard event.preventDefault() instead. jquery.js:75 This is my application.rb // This is a manifest file that'll be compiled into application.js, which will include all the files // listed below. // // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, // or vendor/assets...
2017 Dec 08
0
Wine release 3.0-rc1
...pe string in DOMEvent object. mshtml: Added IDOMEvent::get_type implementation. mshtml: Use IDOMEvent for IHTMLEventObj::get_type implementation. mshtml: Added IDOMEvent::get_bubbles implementation. mshtml: Added IDOMEvent::get_cancelable implementation. mshtml: Ignore preventDefault calls for non-cancelable events. mshtml: Fixed event target leak in dispatch_event. mshtml: Added IDOMEvent::get_currentTarget implementation. mshtml: Added IDOMEvent::get_target implementation. mshtml: Added IDOMEvent::initEvent implementation. mshtml: Don't call...
2006 Feb 27
11
Disabling anchor clicking in a draggable
Hey guys I have an interesting problem - I have some draggable elements (sortable actually), with links (<A>) inside them. I want the user to be able to click on the link, however if the user drags the element I don''t want the link to get fired. Can anyone think of a way to do this? It only needs to work in Firefox. Cheers -Rob
2012 Nov 14
8
right click or Context Menu in ruby without javascript
Hi, This query is a replica of the link http://railsforum.com/viewtopic.php?id=51231. As I was unable to get any replies from the rails forum, I am posting the same here. I have developed an app using Rails 3. I have a table made to look like a calendar. I wanted to know if there were any methods or gems to acheive right click(context menu) action on the dates WITHOUT javascripts or
2011 May 25
0
Issues implementing jquery-form plugin for displaying image via an ajax call in my rails poc
...function(xhr) { xhr.setRequestHeader("Accept","text/javascript") } }) $(''#post_msg input'').val(''''); $(document).ready(function() { $(''#uploadForm'').bind(''submit'', function(e) { e.preventDefault(); $(this).ajaxSubmit({ //target: ''#output'' dataType: ''script'' }); }); }); Generally, I tried doing some research/homework on some work arounds by referring to :- http://stackoverflow.com/questions/988...
2009 Jul 16
2
[PATCH server] updated anyterm/ovirt integration
...return; + kb_buf+=k; + maybe_send(); +} + + +function esc_seq(s) { + return String.fromCharCode(27)+"["+s; +} + + +function key_ev_stop(ev) { + // We want this key event to do absolutely nothing else. + ev.cancelBubble=true; + if (ev.stopPropagation) ev.stopPropagation(); + if (ev.preventDefault) ev.preventDefault(); + try { ev.keyCode=0; } catch(e){} +} + +function key_ev_supress(ev) { + // We want this keydown event to become a keypress event, but nothing else. + ev.cancelBubble=true; + if (ev.stopPropagation) ev.stopPropagation(); +} + + +// When a key is pressed the browser delive...
2017 Oct 31
0
Wine release 2.20
...l: Store DOMEvent instead of nsIDOMEvent in HTMLEventObj. mshtml: Store event id in DOMEvent. mshtml: Pass DOMEvent instead of event id to fire_event_obj. mshtml: Store event target in DOMEvent. mshtml: Pass DOMEvent to call_event_handlers. mshtml: Implement IDOMEvent::preventDefault and use it where appropriate. mshtml: Implement IDOMEvent::stopPropagation and use it where appropriate. mshtml: Store current IHTMLEventObj in DOMEvent and create it in fire_event_obj if needed. mshtml: Use fire_event_obj to dispatch XHR readystatechange event. mshtml: Don&...
2018 Mar 16
0
Wine release 3.4
...ined3d_texture_init() into texture_init(). winex11: Restore the X11DRV_FLUSH_GL_DRAWABLE XFlush() for setups without OML_sync_control. Jacek Caban (3): mshtml: Use nsIDOMEvent directly to prevent default event handling in dispatch_event_object. mshtml/tests: Added more IDOMEvent::preventDefault tests. msctf: Added semi-stub support for ITfKeyTraceEventSink event sink. James Woodcock (1): msvcrt: Gets() should handle EOF on stdin gracefully. Johann Frei (1): dinput: Implement X/Y axis granularity and add test. Julian Rüger (1): po: Update German translation. Józ...