Category "dom-events"

How to access textbox inside grid view of parent page in popup page?

I have a pop up page where I want to get the textbox value which is inside gridview of main page, and populate value in that textbox. I have tried: var Emp =

Deactivating and activating an E-mail form

I'm trying to get the code below to keep an E-mail form deactivated until 6 seconds after the page is fully loaded. What can I do to make it work like that? var

How to disable link button after click (no JQuery)

I want to disable link button after user click on it. But I made something wrong here. Button is still enabled after click. What am I doing wrong? <asp:Li

Why doesn't this JavaScript code(embedded as an HTML attribute)work?

Why doesn't this work? <button onclick = "function(){alert('Hello');}">press me</button> while this does: <button onclick = "alert('Hello')

Using Chrome, how to find to which events are bound to an element

Lets suppose I've a link on my page: <a href="#" id="foo">Click Here</a> I don't know anything else, but when I click on the link, an alert("bar"

What version of IE doesn't pass the event as argument to listeners?

As some old versions of IE didn't provide the event as argument to event listeners, we got used to (event||window.event). In order to decide whether it can sti

Can you pause a form submission and then restart

Without using any JS libraries, is it possible to pause a form submission, run some code and then restart it? Reason I ask is that I currently have a form that

Check if form field changes

I have some form fields like <input>, <textarea>, <dropdown> etc. If a user make a change in any form field it should be prompted at once that

Getting the list of voices in speechSynthesis (Web Speech API)

Following HTML shows empty array in console on first click: <!DOCTYPE html> <html> <head> <script> function tes

Is there a bug in this code example from "Beginning JavaScript with DOM Scripting and Ajax" or I am missing something?

I'm reading a book called "Beginning JavaScript with DOM Scripting and Ajax" (2006) On Page 168/139 it offers some example code, a stopBubble function, which pr

onClick going off without being clicked

I'm very new to writing with JavaScript and am creating a basic tab navigation interface as a prototype/practice. Right now I'm trying to make an alert appear u

html-php form submission after validation through JavaScript [closed]

What I intend to do is : first validate a form and then process if some conditions are satisfied. I have pasted the prototype of my code below

How to attach an event in IE?

I try to attach an event on a input element, then I put this code on onload of body element: bornDate.attachEvent("onblur", validade(true)); But in onload, the

How to stop element with first onclick event to be fired when enter key is pressed first time

I was fixing a bug in a jsp page in which even though a function is defined with onkeypress event to click a particular button (actually its an image of button

Javascript anchor href change and form post

I have a form coded like below. Basically the href value for the anchor tag is determined by the value selected in a dropdown. <form name=xyz method=post>

Javascript mouseover event to change form submit button image

I am attempting to dynamically change the "src" attribute of a form submit button via JavaScript by containing the form element within a link in order to captur

How to use oncopy in Internet Explorer

Is there a way to make this work in IE? It works in Chrome and Firefox. <html> <body> <div oncopy="alert('text copied')"> Copy me

onClick change list styles

Let's say I have a simple list: <ul> <li class="notClicked">1</li> <li class="notClicked">2</li> <li class="notC

onClick change list styles *but

Following up from the last question answered: onClick change list styles Instead of changing all classes, change all classes but "li's" with a particular class.

Overriding control+s (save functionality) in browser

I am trying to override the browser save shortcut i.e. Ctrl+S to give the functionality of save in my web App , I am using Google Chrome... I tried keydown list