When does script added to the page with Page.ClientScript.RegisterStartupScript() actually run? MSDN states "when the page finishes loading but before the page's OnLoad event is raised" but this isn't much detail.
For example, can a script added with RegisterStartupScript assume the DOM tree has been built? Does the behaviour differ bet...
Here's the scenario:
My users are presented a grid, basically, a stripped down version of a spreadsheet. There are textboxes in each row in the grid. When they change a value in a textbox, I'm performing validation on their input, updating the collection that's driving the grid, and redrawing the subtotals on the page. This is all ha...
Such as the
<div class="grippie" style="margin-right: 59px;"/>
on stackoverflow when you post a question or answer. I get a nice css curser which lets me know of the moveable edge but how is the Java script which resizes the field finding out I clicked on the 'Grippie'?
Thank you.
Edit:
Thank you for the answers which lead to Jque...
I would like to know if there is a jQuery event that I can use to determine when a particular DIV's "Top" property has changed.
For instance, I have invisible content above a DIV. When that content becomes visible the DIV is shifted down. I would like to capture that event and then use the offset() function to get the X/Y coordinates....
I was reading the great article about binding and unbinding events (because I am a js beginner using jQuery) on Karl Swedberg's blog, and I became totally puzzled at this part of the code (simplified for brevity):
function addItemUnbind() {
$Add a button but it won't have it's event added;
addItemUnbind();
});
Why is...
I'm working on a large web application with a lot of AJAX whose event handling has gotten out of control. I'm trying to set up an event delegation system to manage all of it, but am wondering if there's a workaround for IE's non-bubbling form submits (there are a lot of forms that get inserted/updated via AJAX). The best thing I've com...
Hi All,
I have the following code:
<script type="text/javascript">
function SubmitForm()
{
form1.submit();
}
function ShowResponse()
{
}
</script>
.
.
.
<div>
<a href="#" onclick="SubmitForm();">Click</a>
</div>
I want to capture the html response of form1.submit? How...
Here's my scenario:
I have a page containing several links; each link is meant to open another window containing a pdf. The catch is, I can't have that window directly go to the PDF because I do not want to make it apparent to the end user the PDF is located on another domain, and I need to name the PDF differently than how it would re...
Is there any way in JavaScript how to find out user clicked through the same domain 2 or more times?
I need to popup a window after user clicked anywhere on the site for 3 times. I know how to do it after one click - with document.referrer or addEventListener, but then I'm lost.
I need something that will capture all click events (not ...
function CaptureKeys (e,btn)
{
var c //= document.layers ? evt.which: document.all ? event.keyCode : evt.keyCode
if(window.event) // IE
{
c = e.keyCode;
}
else if(e.which) // Netscape/Firefox/Opera
{
c = e.which;
}
if (c == 13) //return /enter key
{
if (btn=="go")
{
if (document...
I am currently working on a Flot graph, the API which seems pretty powerful overall, although examples of advanced use are not widely documented.
The API suggests there are ways to set hoverable on the graph, not that I am sure what exactly that means I can do with it.
I would like to know if anyone could contribute some examples tha...
Hello Everyone,
I'm trying to get this Javascript to work properly. My intention is, when a user is trying to close the site page to get an alert saying "stay on current page or close" If they hit 'ok' I want it to close, if they hit 'cancel' i want it to redirect to another page. The problem is, when they try to go to another page on t...
Hello. I am having problems with my JScript code. I am trying to loop through all of the rows in a table and add an onclick event. I can get the onclick event to add but have a couple of problems.
The first problem is that all rows end up getting set up with the wrong parameter for the onclick event.
The second problem is that it o...
Hi,
I am using tags for links on a web page. How do I disable tab key from selecting either of them.
...
How to pass parameter while call a function using setInterval.
viz. setInterval('funca(10,3)',500); is incorrect.
...
Hello,
I've got problems with setting focus to an input field after validating it.
I've got 2 fields: from and to.
<spring:message code="template.fields.label.from"/>:
<mvc:input path="templateFields.selectorRangeFrom"
onchange="validateNumber('templateFields.selectorRangeFrom',true)"/>
<spring:message code="temp...
I want to be able to close an alert box automatically using javascript after a certain amount of time or on a specific event (i.e. onkeypress). From my research, it doesn't look like that's possible with the built-in alert() function. Is there a way to override it and have control over the dialog box that it opens?
Also, I don't want ...
Consider the code below:
this.usedIds = 0;
this.SendData = function(data)
{
var id = this.usedIds;
this.usedIds++;
this.xmlHttpThing.open("POST", "/Upload.aspx", true);
this.xmlHttpThing.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
var currentObject = this;
this.xmlHttpThing.onreadyst...
I'm trying to do something when a user selects an option from a select box - As simple as can be right? I'm using JQuery 1.3.1 to register a click handler with the id of the select box. Everything was fine until I tested using Chrome and Safari and found it didn't work.
Firefox 3.05 - YES
I.E 7.0.5730.13 - YES
IE6Eolas - YES
Sarafi 3...
I'm building a mobile web app targeting Android users. I need to know what JavaScript events are available to me. I have been able to make the following work, but not terribly reliably:
click
mouseover
mousedown
mouseup
change
I have not been able to get the following to work:
keypress
keydown
keyup
Does anyone know the full list...