I've noticed an problem when trying to catch keyboard shortcut: CTRL+an arrow.
I've handled keydown event. Now when I hold CTRL key then keydown event is fired once. If I hold an arrow (so that now I'm holding CTRL+an arrow) it doesn't fire another event. Is it forbidden from any reason? I guess I've already encountered this problem in ...
Hi All,
I like to call a JavaScript function from c#. Can any one can give me code snippet.
More detail...
I have a asp.net page which has a asp button. when i click that button, i like to call javascript function.
like wise....
in my asp.net page,
<button id="save" onclick="i like to call a method resides in asp.net page'>Save</b...
Using .remove() so that the select all check box is not submitted to the server.
However, it is visible to the user as the select all checkbox is "physically" removed from the web page, upon submit.
Instead, I would like removing the select all check box to appear seamless but NOT on the server side. i.e. - I would like to keep the i...
I have a need to do variable substitution at least in CSS from JavaScript (let's ignore whether that's client or server side for the moment). Ideally, I'd use the LESS syntax which offers more features than just variable substitution. Has anyone found a JS implementation of LESS?
...
I'm working with animation in JavaScript, and I have a bunch of functions you can call to add things to the animation queue. Basically, all of these functions look like this:
function foo(arg1, arg2) {
_eventQueue.push(function() {
// actual logic
}
}
I'm wondering now if it would be possible to cut down on this boile...
I'm using prototype to construct an ajax request from an inline onclick on a link. The function shows an element on the page and this all works fine, except that the browser scroll bar resets to the top after every click of the link. This is bad b/c sometimes the content that I want to show is partially scrolled down the page and this ...
I want to get "the-game" using regex from URLs like
http://www.somesite.com.domain.webdev.domain.com/en/the-game/another-one/another-one/another-one/
http://www.somesite.com.domain.webdev.domain.com/en/the-game/another-one/another-one/
http://www.somesite.com.domain.webdev.domain.com/en/the-game/another-one/
...
I want to implement infinite scrolling (with an AJAX-based loader) in an HTML table body.
My HTML looks something like this:
<table>
<thead>
<tr><th>Column</th></tr>
</thead>
<tbody>
<tr><td>Row 1</td></tr>
<tr><td>Row 2</td></tr>
</tbody>
</table>
I get a scroll bar on the <tbody> like so:
tbody {
height:10em;...
I'm having an issue with jquery-ui draggable() inside of iframes.
See test here: http://jsfiddle.net/TDfkn/
I have iframeFix:true, but if you try to drag the image nothing happens until the mouse cursor moves outside of the iframe. Is there a way to fix that?
...
Do you know of a .NET library for generating javascript code?
I want to generate javascript code based on information in my .NET application. I would like to be able to create an AST-like datastructure (using C#) and have it turned into valid javascript. I need to be able to create functions, statements, expressions etc., so I need som...
My goal is to remove all <[script]> nodes from a document fragment (leaving the rest of the fragment intact) before inserting the fragment into the dom.
My fragment is created by and looks something like this:
range = document.createRange();
range.selectNode(document.getElementsByTagName("body").item(0));
documentFragment =...
Hi,
I would like to update the following javascript code based on Prototype framework to jQuery framework:
Event.observe(window, 'load', function() {
$$('.piece').each(function(item) {
new Draggable(item, { revert: true } );
});
$$('.cell').each(function(item) {
Droppables.add(item, {
accept: 'piece',
onDrop:...
Hello everyone,
I am making a Google Analytics like project for my school assignment. I have two questions primarily:
1) Exactly when does Google store the data to the database? When it does it use XHR with some server side scripting language to store it to the database or is there a way to do it using plain javascript?
2) How do I get...
I have a situation where an element is shown using ajax. I have attached mouseenter and mouseleave events to it to show a menu connected to the element using prototype. This works fine, but the problem I am having is that if a user has his/her mouse in the place where the element is shown before it is shown, the mouseenter does not get...
I have a search that returns JSON, which I then transform into a HTML table in Javascript. It repeatedly calls the jQuery.append() method, once for each row. I have a modern machine, and the Firefox response time is acceptable. But in IE 8 it is unbearably slow.
I decided to move the transformation from data to HTML into the server-s...
I have some web forms that I'm bringing over with AJAX, and as I was dealing with the database on the back end, I thought that it might be easier to just handle each input on the form atomically with AJAX, saving the form in 'real time' as the user edits it. The forms are ~20 fields of administrative settings.
Would this create massive...
Note: This question uses jQuery but the question has nothing to do with jQuery!
Okay so I have this object:
var box = new BigBox();
This object has a method named Serialize():
box.AddToPage();
Here is the method AddToPage():
function AddToPage()
{
$('#some_item').html("<div id='box' onclick='this.OnClick()'></div>");
}
The ...
Hi,
Can you please tell me if there is any DOM API which search for an element with given attribute name and attribute value:
Something like:
doc.findElementByAttribute("myAttribute", "aValue");
Thank you.
...
I am somewhat new to web developing, so I am trying to learn along the way. I have a div that is 500 x 500. Inside of that div I have two divs that are each 250x500. So my outer div is filled up with the two inner divs.
I have it setup so that when I click on the first div (the left one) a java script is called, and a prompt pop up box...
I cannot figure out what I did or did not do here syntactically to cause this error. I don't see what's missing:
function ShowWaitMessage(button)
{
var isValid;
if (buttonSelected())
{
showWaitMessage(button, "showMessage1");
isValid = true;
}
else
{
Page_ClientValidate();
if (Pa...