<title>Sample</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<script type="text/javascript" src="jquery-1.4.2.min.js">
</script>
</head>
<body>
<select onchange="alert('hi')">
<option value="0" selected="selected">Option1</option>
<option value="1">Option1</option>
<option value="2">Op...
I have an HTML table where the first cell of each row contains text and the second cell contains a link. Like so:
<table id="foo">
<tr>
<td>Some text</td>
<td><a href="/path/to/file/"><img src="/path/to/image.jpg" /></a></td>
</tr>
...
</table>
I have a hover effect on the first table cell and when a user clicks on the f...
How to open the homepage in FULLSCREEN with javascript without opening a new window ??
...
I have seen similar questions but I can't figure out what I am doing wrong here. The dropdown is shown after an ajax call completes succesfully then I want to hide it when a user clicks anywhere. I would like to remove the event though because there is no need to hide it if it is already hidden.
dropDown.slideDown('fast');
...
I am using this code but it doesn't work because the new window is half of the my screen ( 1280x800px ):
<a href="javascript:void(0);" onClick="window.open('http://www.stackoverflow.com', '',
'fullscreen=yes');">Open Full Screen Window</a>
Why ?
...
Dear Stackers,
I'm developing a web application which requires long-running Ajax requests. Unfortunately, under Firefox, pressing Escape during a request has the drawback of killing the request and any information it was holding. This is rather annoying, as this can lead to all sorts of nasty complications if this happens at the wrong t...
Hey,
As I've understood the browser will freeze all DOM rendering when it sees a script tag and only continues once it has processed it. When I inserted an external javascript file (typekit) directly in the HTML this seemed to be the case, but now that I'm including it dynamically it causes a repaint of the window. Is it possible fixing...
I have a PHP script that allows image upload. I modified it slightly to load newly uploaded image into a modal window in order to allow manual crop, if needed.
It seems I got it working in FireFox (all the way until actual crop).
IE throws an error: "Object does not support this property or method" and Opera just chokes and does not k...
Is there any way in jQuery to attach a listener to a cell so that when the text inside the cell has changed (by JavaScript, not the user), the event is triggered?
...
Hello,
I've a webpage fullfilled by a JS script that creates a lot of HTML tables.
Number of <table> created can vary between 1 and 1000 with 100 cells in each of it.
My question is : how to bind efficiently the click on theses tables? Should I bind the click on each cell of the <table> or directly to the <table> itself and retrieve t...
Chrome and Safari doesn't trigger the HTML5 onpopstate event.
Here is my example:
<!doctype html>
<html>
<head>
<title></title>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
window.onpopstate = function(e) {
document.getElementById("log").i...
hi,
i have a situation where i have to halt a program and for this i need to provide the halt reason.I have a gridview where i can select multiple items by checkbox.i need a java script which will validate that halt reason text box has some text while i click the halt button to halt the selected items.Here is my gridview
<asp:GridView ...
Forcing focus() on an element is easy, but after having debug issues, I realize trying to determine where is my focus gone is a lot harder.
thing is I'm generating a modal window using jq.UI, and from time to time, while focus is supposed to be set on first input of the form inckuded in the modal, cursor just disappears, to never show ag...
Hi,
I want to simulate a ctrl+c to copy the text into it. I first tried this:
$('#codetext').click( function() {
$("#codetext").trigger({
type: 'keydown',
which: 99
});
}
HTML:
<input type='text' id='codetext'>
I have also tried using $(this) instead of the selector, but the input element also has focus on it, does...
I am trying to load some content into a page using Ajax. The html that is loaded contains some javascript code. Even though the code is wrapped within $(document).ready, it gets executed before the content is inserted into the document, because the parent document's Dom is ready by the time the content is loaded.
How can I defer the exe...
Hi,
I often need to create single events that are not needed after they have run once. The way I do is something like:
A.prototype.someMethod = function () {
var me = this;
this.onWindowMouseUpFunction = function () {
me.onWindowMouseUp.apply(me, arguments);
};
window.addEventListener('mouseup', this.onWindowMou...
So, that's the question =)
How to capture mac's command key via javascript?
...
var game = (function() {
function start() {
//somefunction
}
function save_count(someparamt) {
//somefunction
}
})();
How could I trigger savecount() from the browser url?
javascript:savecount(); won't work and neither game.savecount() and neither window.game.savecount();
...
I'm trying to do a javascript application that needs this particular feature:
Whenever the user presses one of the arrow keys, it must act acording to the key direction.
And if the user press a key, hold it down, and press a second one, then, only the action of the seccond one must be executed until released. And if the first one stil...
Hi,
I have a complicated UI structure which is manipulated dynamically, and say I have an ui_state object where i keep user's latest UI states such as which tab was visible, what was inside that tab etc.
For instance:
var ui_states = {
tabs : [
{
name : "some tab",
active : true,
children : { ... }
}...