javascript-events

Are JQuery Events automatically unbound upon destruction of what they where bound to?

Hi All If I have the following code in two functions of an object: add: function() { // create trip. var trip = new Trip(); // add the trip using its id. this.trips[trip.id] = trip; }, remove: function(tripId) { // remove trip. delete this.trips[tripId]; } NOTE: The constructor for the Trip object binds a bu...

What are the best light-weight solutions for Drag and Drop?

I love and use jQuery quite a lot, but I am hoping to find an alternate solution for a special project. I am creating a bookmarklet which will interface with my application to allow users to enter information much quicker. One of the greatest pains in my application at the moment is uploading images. Users (understandly) hate the proces...

Enabling and Disabling Save button on a GWT page

The application I am working on has pages of setup data with lots of textboxes; each page having a save button. I have defined most of the pages as a *.ui.xml file and used the GWT 2.0 UI binding. I would like to add a save button which is disabled onload and is only enabled after a user modifies the data into one of the textboxes. I ...

event.srcElement is not working when the class sector is using

Hii, I have an issue of using event.srcElement that i have write an event handler for a class selector but when i am taking the source element the exact element which i have clicked is not getting.Is there any alternative there ...

JavaScript table type errors

I have a search criteria table that I want the user to be able to grow and shrink based on how specific they want their search to be. Here is the HTML for the table: <html:form action="/queryDocuments"> <table id="searchTable" align="center" style="background-color: #cccccc; font-family: verdana"> <tr> ...

jQuery: identify that the DOM has changed

edit: changing .ready() call per Matt's suggestion. I use jQuery to configure some stuff like so: $(function () { $('.myThing').each(function() { ... configure it ... }); }); My problem is when a new element gets added to the DOM after .ready() has been called. The configuration is not performed on those elements...

How do I register a JS function to run when a browser window is resized ?

How do I register a JS function to run when a browser window is resized ? I assume it's in the Page.ClientScript class methods somewhere, but I am a bit confused. ...

JavaScript to update values in MSCRM

Hi, I am working on CRM I want to update the contact entity with values in the appointment entity. Contact entity has two fields Last Appointment Date and Next Appointment Date. two fields in Appointment entity called Start Date and End Date. These two value should be copied to contact field values. I want this to happen using JavaScript...

onclick not firing for download

Hi, Im having trouble with a onclick event for a download. It does not want to fire when I click on the link. It just carries on as normal. But it does work with an external link. Have I done something obviously wrong? <a href="http://www.wildlifetrusts.org/" target="_blank" onclick="trackExternalLink(this, '/links-the_royal_society_o...

how many are checked

I have check buttons on the document. I want to know how many of the buttons on the docment are checked. I tried to do this alert(document.all.CustmerRequested.checked.length); but it says undefined. Any idea what I can do. sorry a complete newbie in Javascript ...

set browser as my website as homepage for firefox using javascript

i have to set my webpage as homepage in firefox using java script i used an script onclick="this.style.behavior='url(#default#homepage)'; this.setHomePage('http://www.example.com.html');" it work in internet explorer not in firefox any suggestions.... ...

Precedence of the javascript events

Is there any precedence to the javascript events that occur in a HTML page ? For example: consider these two events onchange and onblur. Change the text of a text box. The event onchange occurs only onblur of the text box. In this case which event will be processed first. I hope I gave the understandable example. ...

javaScript: Is there a way to see what events does js object raises?

If I get a reference to javascript object, how can I see what events does it raise? ...

iFrame Automatic Sizing

Before the "beating a dead horse" comments begin, let me clarify what I am trying to do to see if someone can help me. I have a parent window with an iFrame in it. The content in the iFrame is loaded from a separate domain which is where I think my problems begin, although it needs to be this way. When the page originally loads I have t...

WebSocket Events Not Firing

I'm trying to create a simple WebSocket example using the HTML5/JS API. Based on what I trace out on the server, it seems like the socket is connecting, but none of the events fire (onopen, onmessage, onclose, etc). I'm a Flash developer so I'm not very good at debugging the JavaScript and I'm hoping someone can help me out. Here's the c...

How do I get a user control with related Telerik ComboBoxes to work as an Edit Control in a RadGrid

The user control contains Related ComboBoxes as in the provided example at http://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/multiplecomboboxes/defaultcs.aspx which works well when added to a page. When I add the user control as Edit Form in a RadGrid as shown in the example http://demos.telerik.com/aspnet-ajax/grid...

Detecting Download Status in Firefox

Is there any way to detect whether a download has completed or is how much it has downloaded , in the context of a greasemonkey script Or and extension .(i.e) how to detect if firefox is still downloading a file or not, in a greasemonkey script or an extension ? Also please give a Reliable way for using jQuery in greasemonkey. ...

Will I trigger a change event if I use Javascript to set a <option> as selected?

I've observed that, in Google Chrome, setting an <option> as selected via Javascript does not trigger the respective <select> tag's change event. Can I count on this behavior holding true in all other modern browsers? ...

Loading scripts dynamically

I'm loading a few YUI scripts dynamically in my code in response to an Ajax request. The DOM and the page is fully loaded when the request is made - it's a response for an user event. I add the tag to head, as children. But I stumbled in a few problems: I add two YUI scripts hosted at the Yahoo! CDN and an inlined script of my own res...

Submit Button is not working but checks validations.

Hi, The following code works when I submit the form with valid content. But When I submit the form with invalid content, It validates and shows there is an error and reloads the page. But then the form does not gets submitted. Can you please help me with this? Thanks. View Code <h1 class="hdr1">Ask question</h1> <%= link_to Profi...