Looking for a script to display a number of different time (zones) on a site - flash can do this but has become obsolete due to Apple and the Javascripts I have found all miss the daylight savings adjustment functionality.
Script/plugin needs to be un-styled for site branding purposes. Site = PHP
...
Hi all!
I'm automating the manual testing of some Web Application.
This app uses a lot number of JavaScript. And I want to know, what scripts executes when I manually clicking some button.
Here is the example of button's code:
<button type="button" class="x-btn-text " id="ext-gen525" title="Add Options">Add</button>
This button adds...
Hey all, I'm currently working to build a CMS for a client where the editing page looks exactly like the rendered page.
Hence I don't want an iframe based WYSIWYG, I am looking for something of a wrapper for contenteditable which irons out the differences between Firefox and Webkit.
For instance an "Enter key press" in Firefox results ...
Hi everyone.
I have 3 JS files I want to include in my page. The first one is defined statically in the html file. The other two are loaded into the DOM using the following function:
function loadJsFile(pathToFile){
var headID = document.getElementsByTagName("head")[0];
var newScript = document.createElement('script');
newScri...
I have an iframe with designMode set to 'on'. In it, there are multiple divs, and because the iframe is editable, the user is able to type in and edit any one of those divs. I need to disable the ability for the user to edit one of the divs.
I can prevent the user from clicking on the div like this:
document.getElementById('mydiv').add...
Hi everyone,
I'm trying to accurately detect when the browser goes offline, using the HTML5 online and offline events.
Here's my code:
<script>
// FIREFOX
$(window).bind("online", applicationBackOnline);
$(window).bind("offline", applicationOffline);
//IE
window.onload = function() {
document.body.ononlin...
Hi,
I have the code included below that allows me to do something the first time a user mouses over an element and then remove the event.
It plays nice in the W3C event model browsers but keeps throwing an error in IE6-8. I got the code from another question and believed it would handle IE. Anyone see what I'm doing wrong?
<scrip...
I have a UI using dynamic tabs, so content can be loaded into a tab and then the tab can be closed and the content removed from the page.
When I load content into a tab I attach a lot of events to elements using jQuery.
What happens when I remove these elements from the page? Does jQuery need to know?
Also, does it matter if I attach ...
In this code have button and anchor with click event.
alert(document.getElementById("btn").click); //not working in safari
alert(document.getElementById("btn1").click); // is working in safari
I want to execute anchor's click event What I do?
-----------------------Code-----------------------------
< script type="text/javascript">
func...
So I want an element i.e: <a id="target">click me</a> to perform a JavaScript function i.e:
functionName();
I want to avoid using the "on" attributes i.e: onclick="".
By cross-browser I mean the A-grade browser compatibility list from YUI
...
I have an array:
$k[23]='something';
$k[44]='something more';
If a user enters 2,3 and presses 'go' in a virtual 10 digit keypad (will look like a calculator), I need to pass 'something' to browse.php.
If the user press 4,4 and press go, then i have to pass 'something more' to browse.php.
Any ideas? I am new to javascript/php
...
here is what i need to do:
i want to launch a popup window when the user exits the website.
i found code that detects when the user closes the window, but that same code ALSO fires when the user clicks on an internal link.
( which i dont want )
any ideas how to do this?
Ive looked everywhere and i cant find a clear solution.
this sol...
I have a PHP array:
foreach($xpath->query('//a') as $element) {
$linklabel[] = $element->textContent;
$link[] = $element->getAttribute("href");
$i=$i+1;
}
I also have an HTML form:
<form name="keypad" id="form" onSubmit="return pass(this)">
<input type="text" size="100%" length="25" value="" name="lcd">
<input type="b...
When a user presses the down arrow key in a textarea, and it's the bottom of the textarea (i.e. the keyup has no effect), I'd like to an event handler to capture this.
$("<textarea />").keyup(function (e) {
switch (e.keyCode) {
case 40: // down
// if last line or alternatively
// if keypress does not chan...
I got a script error when given to display the ASP.net TreeView node text as "alert(event.originalTarget.text)". The error is shown as "originalTarget.text is null or not an object".
$(document).ready(function() {
$(".treeNode").draggable({helper:'clone'});
$("#<%=TreeView1.ClientID %>").droppable({
drop: fun...
I am using some third party control in my aspx form. The control renders into the following HTML code:
<input type="text" style="height: 20px; text-align: right;" class="edit" id="numberBox" />
Now at the time i presses any key in this input text field, event fires but those events are not registered here with element perhaps the even...
$(document).ready(function() {
$('#text').live('change', function() {
alert('hello');
});
$('#button').live('click', function() {
$('#text').val('some text');
});
});
<div>
<input type="button" id="button" value="Click Me" />
<input type="text" id="tex...
As per my knowledge we can disable ctrl+N key for new window with the following javascript code :
document.onkeydown = function() {
alert(event.keyCode)
if ((event.keyCode == 78) && (event.ctrlKey)) {
alert ("No new window")
event.cancelBubble = true;
event.returnValue = false;
event.keyCode = false; return false;
}
}
In my cas...
I am trying to basically disable the click event on a <div> temporarily.
I have tried the following (preview):
$('hello').observe('click', function (e) {
e.stop();
});
$('hello').observe('click', function (e) {
alert('click not stopped!');
});
However, when #hello is clicked, the alert box still appears. I do not want the s...
I have the following code:
$('#form1').live('submit.check', function()
{
//code...
});
Now when I try the following:
$('#form1').unbind('submit.check');
that event it still bound to the form. Is it not possible to unbind an event the that used .live() to bind it?
...