javascript-events

Telerik MVC controls, OnDocumentReady is firing twice

Hello there! I'm new to Telerik MVC controls, so excuse me if this is something simple. I started out with making a new TelerikMvcApplication solution. Site.Master: </div> <%: Html.Telerik().ScriptRegistrar().DefaultGroup(group => group.Combined(true).Compress(true).Add("Index.js")) %> </body> </html> Index.aspx: ...

Is it possible to receive tilt events in JavaScript on mobile Webkit for iOS or Android phones?

I've done some searching around and haven't found any good references for non-touch events provided to mobile browsers. Does anyone know of any good resources for what tilt events are supported or have experience with such things? I'm really looking forward to adding some yaw controls. ...

Making a button unclickable until jquery .load() has finished

I'm currently using the following code for my read more buttons: $(document).ready(function() { $("a.more-link").attr("href", ""); $("a.more-link").attr("onclick", "return false;"); $('.readmore').each(function(index) { var $link = $(this); $(".readmore").prependTo('.' + $link.attr("id") + ' > #bottominfo'); }); $(...

javascript event binding level 1 or level 2??

Since ie does not support event capturing, is it a waste of time using w3c event binding techniques? i'm thinking of just going with the level 1 event binding here - http://dean.edwards.name/weblog/2005/10/add-event/ But I'm having a hard time understanding the need for the hash tabling. ...

Want to get all the text inputs from a form and put them in a JavaScript alert. Why isn't my code working?

My HTML contains a fieldset, six text input fields formatted in a table, and a submit button. The submit button includes the attribute onClick="check()" and it's worked with simpler alerts so I know that's not the problem. Here's my JavaScript: var $ = function (id) { return document.getElementById(id); } function check() { var x...

alter group element with jquery

I have 3 textarea with a default text "Write something". Let say if i click on one of them, the default text will disappear and that textarea get focus. However, if i click on another textarea, the default text of another textarea will disappear but the default text of first textarea will reappear. How can I make this happen? Same thing ...

setup asp.net default enter press client side

Working with asp.net, and I am trying to find a way to change default ENTER key press target on client side. Based on something like the currently focused div or input. the target would be asp.net button controls with postback event. Looking for solution for both IE and Firefox. I am also using "WebForm_FireDefaultButton(event, contr...

Jquery selectable only with shortcut

I want to let the user select when the shift key is held. $("#div").selectable({ start: function(st) { $(window).keydown(function(e){ if(!e.shiftKey){ st.stopPropagation(); } }); }); no? ...

JavaScript event for contenteditable elements

Hi all, Is there a way to capture JavaScript events for when a contenteditable element begins and ends editing? Cheers - Greg. ...

Drag and Drop Functionality by using JavaScript for an email client application

Hi, I need a drop and drag functionality for my email client application. Description: I have some mails in my Inbox, I want them to move to my user defined folders by using drag and drop functionality by using Java Script. Looking forward for your response. Thanks, Ranjith ...

Javascript: Show second textbox on keypress

I have two textboxes (pass1 and pass2). I want for pass2 to be hidden and only appear when something is entered in pass1. Pass2 should hide when pass1 is null. ...

get user feedback before he leaves the site using Beforeunload event in Javascript/Jquery

Hi All, I would like to take users feedback before he/she leaves the site. I tried using the beforeunload event by have a issue, it pops up even if user is on my site, i would like it to pop up only if user is changing the Domain.. in the Browse address bar Thanks in Advance... ...

JavaScript Panning on ASP Image

Hey guys, got a little problem here. I tried to implement some javascript, which should add some client side functionality to an ASP Image component. Actually this image component is one of the DevExpress component, called "AspxBinaryImage". It's just a little modified ASP Image, with some more CSS and stuff, but the base is still just ...

Telerik RadControl Grid: Scroll bug in IE & Chrome

Hello, Im using the Grid control from Telerik's RadControls. The grid is populated with thousands of records and lists 50 records per page. I have some filtering options appearing above and the solution is in ASP.NET 3.5 with NHibernate 2.1. Everything works fine and dandy except for when i select one of the bottom rows and some weird ...

Javascript: Function for an event

So I would like to create a function from this: element.onclick = function(e){ ... code ... } To something like this: element.onclick = doSomething(e); element2.onclick = doSomething(e); function doSomething(e){ ... code ... } In this way I could call the function multiple times but in this way e is not passed as an event...

Simple Tab Javascript Sections (not menus)

This might be the simplest question of the day. I'm looking for the best answer based on all knowledged across community, not a basic tab effect but one that could be scalable, easy to implement and compliant with standards. What could be a good and simple (compatible) way to accomplish having different sections with javascript. I pers...

combo box issue in jsp

i have combo box in jsp using Struts2: select the value of combo box, page is refreshing but after refreshing it display the default value in combo box (first value), not the selected value. how i show the selected value in combox after refreshing. here is my code on jsp. Combo box: <select name="ItemName" id="ItemName" onchange="...

How to define a success-event for http-requests with JavaScript/jQuery?

Considering a http-request and the server will answer with a pdf. I like to show a spinner, while the request is processing. How to do that? ...

Is there a way to fire over events ignoring z-index ?

If I have something like this: Is there a way to fire the mouseover events on BOTH divs? Edit: Sorry all .. I tried to simplfy the problem so it was clear to understand and I forgot to mention I have more than 100 divs like that so probably those solutions don't work. I'm going to see if I can adpat them. Many thanks everybody anyway...

Please define me this short code of Javascript!!!

Hi, i am new to Javascript ... i am making a form in html and validating it via JS...recently i found a code for email validation from web surfing...i understand the basic purposes of the functions used in this code but i am not able to understand the logic well...please if any one can make me understand the logic of this code easily..it...