I have gone insane trying to figure out how to make this work. Code looks roughly like:
function onDropDownChanged() {
$("#updatePanel").load(
"myUrl",
{ id: $("#myDropDown option:selected").val() },
onPanelLoaded
);
}
function onPanelLoaded() {
$("#theTextInput").focus();
}
$(document).ready(function() {
$("#myDropD...
I have a standard HTML input that I want to run JavaScript code when it loses focus, sadly my Google searches did not reveal how to do this.
To make it clear, I'm looking for a way to do this:
<input type="text" name="name" value="value" onlosefocus="alert(1);"/>
...
We use a modified version of Jiffy to measure actual client-side performance.
The most important thing we do is measure the time between when the request was received and when the page load event fires in the browser.
On some pages we have iframe elements that point to external sites that we don't control - they sometimes take a long w...
I have two textBoxes lets say EmailID and UserId.
Currently when a user Types his/her EmailId the same gets shown in the UserID TextBox, for this I am using OnkeyDown event javascript.
The Issue That I am having is if the user copies the EmailId an Paste it in the EmailId textBox then the OnKeyDown event is not fired, is there any other...
From inside of the fireAlert() function, how can I reference the element that called it, without having to pass this as an argument through the link?
<script type="text/javascript">
//function
function fireAlert(){
alert();
}
</script>
<a href="javascript:;" onclick="fireAlert();">Fire</a>
...
I have a function which starts to gobble up keys after a hot key is pressed and fires off an AJAX process at the end of a sequence (barcode scan).
The issue is what happens if the user accidentally presses the hot key?
My paper napkin solution was:
on hotkey: if(okay(true)) {buffer=""; ts=now(); consumekey();}
on EOTkey: if(okay(false...
I'm having a weird problem with some Javascript/DOM code I've ben playing with. I'm trying to assign the .onKeyUp and .onChange events/methods to a text input like so:
form.elements["article"].onkeyup = "alert('test');";
Oddly, assigning using that method is doing nothing, and I'm forced to do this manually using:
form.elements["arti...
Hi all,
Im working on a simple javascript validation function for a html form, but have run into issues with it using IE7. I dont get any error messages, the form simply submits without validating. Firefox, and Opera work fine, so Im really not sure what i am doing wrong here. Ive googled around, but not found anything helpful, or maybe...
I have a SELECT element which adds its value to a hidden INPUT via Javascript every time an OPTION is clicked (along with a visual representation of each selection) and I'd like to be able to monitor changes for another Javascript function. For the sake of modularity, I can't integrate the second function into the first one. I would also...
Hi all,
I have a textarea which converts english to hindi onkeyup event.But when i move the caret backward for editing, the first letter I type converts to hindi and the caret moves to the end of the string.Can it is posible to store the caret at the same point within the textarea,so that it doesn't moves to the end of the string..
Waiti...
Greetings all - Given the following HTML fragment:
<form id="aspnetForm" onsubmit="alert('On Submit Run!'); return true;">
I need to remove/clear the handler for the onsubmit event and register my own using jQuery or any other flavor of JavaScript usage. Anyone know how to do this?
Thanks - Jordan
...
I try to answer this question a few minutes ago and prepared this example for myself :
<script>
function trialMethod()
{
alert('On Submit Run!'); return true;
}
function trialMethod2()
{
alert('On Submit Run trialMethod2!'); return true;
}
</script>
<form id="aspnetForm" onsubmit="trialMethod();">
<input type="...
I'm executing an external script, using a <script> inside <head>.
Now since the script executes before the page has loaded, I can't access the <body>, among other things. I'd like to execute some JavaScript after the document has been "loaded" (HTML fully downloaded and in-RAM). Are there any events that I can hook onto when my script e...
Hello,
There are two img elements that use the same map with one area. Now, we bind e.g. a click event handler to the area element. Is it possible to determine from the event handler which image instance has been clicked?
...
Hi,
I am delevoping a page which has a re sizable and draggable div. An I have attached mousedown, mousemove and mouseup event handlers to this div.
The problem is with the mousemove event handler. I have to get the current width, height, top and left of the div. For that I am using functions to return the specific values and I have to...
I tired to write a function to check key code with javascript. It's working fine for firefox but not IE. Does anyone know what is going wrong with my code? Please see below code for more details.
function textCheck(e)
{
var e = window.event || e
alert("CharCode value: "+e.charCode)
alert("Character: "+String.fromCharCode(e.charCode))...
I have a list of items on a page with a set of controls to MoveUp, MoveDown and Delete.
The controls sit at the top of list hidden by default. As you mouseover an item row, I select the controls with jquery
//doc ready function:
..
var tools = $('#tools');
$('#moveup').click(MoveUp);
$('#movedn').click(MoveDn);
$('#delete').click(Dele...
I've confused myself nicely here. My scenario is as follows.
function DesignPad() {
function EditBar() {
...
this.removeHandler = function() {
**// how do I call Dragger.removeAsset**
}
}
function Dragger(){
...
this.removeAsset = function() {}
}
this.init = function() {
this.editBar = new...
Hi there can anyone help, i have a developed a function that when called should open a window but it returns NULL. If i do the opening window in the original javascript function it works. I suppose its the original function passes control to the other function but for some reason this doesn't work..
Here is my original function, this b...
I'm an Ubuntu user, so I'm not knowledgeable of Internet Explorer. We have a javascript based drop down menu thingie using li's and ul's and all that. It works fine in FF and IE6. However not in IE7. It looks like IE7 doesn't call the onMouseOver function unless you go over the text in the middle, as opposed to the blank area between the...