I have a bookmark that opens my a google calendar page (http://www.google.com/calendar/renderOnline) and a bookmarklet that applies some javascript on it:
javascript:document.getElementById('gadgetcell').setAttribute('style','width:300px');document.getElementsByClassName('sn-frame')[0].setAttribute('style','width:300px');
Is there a wa...
I'm working on a site, for kids, which has a small avatar in the corner that talks.
The avatar is a flash file and the plan is to determine what it says through a mix of javascript and ajax.
Unfortunately when I make the flash file play an Mp3 file through JavaScript, I can't seem to stop the sound.. so when I keep clicking on a link wh...
I am sure I could search for this if I knew the words to describe what I am looking for.
I have a link that when pressed directs the user to another anchor tag using href="#anchorTagName"... however the link also has an onclick function which makes the div visible that anchorTagName is contained within. As a result the user is never dir...
I setup a jquery dropdown menu that works perfect. It drops down when a user rolls over a link. The problem is that when the user rolls over the content area of the drop down menu, it slides back up. I need to set up the code so that the slidedown box remains in the down position while the user's cursor is still over it.
Here is my HTM...
I have a page that selects all the elements in a form and serializes them like this:
var filter = 'form :not([name^=ww],[id$=IDF] *,.tools *)';
var serialized = $(filter).serialize();
This works, unless the form gets around 600+ elements. Then the user gets s javascript error saying that the script is running slow and may make their ...
Hi,
I've got a bit of a problem. I'm currently working on converting an old system to a newer version. In the old version, data requests were managed by Java applets, which had no problems with the "-char in the data.
Now, though, I'm fetching the data from a database and converting it to a JSON-string using XSLT, and then - with the pro...
Yes, I realize this is horrible UI and bad accessibility wise, but I am forced to seek out the options due to contracted work ( to which I didn't initially agree upon and am stuck with ).
I know that you can assign an event handler to onbeforeunload like:
window.onbeforeunload = function() {
return 'You have unsaved changes!';
}
...
How to display an image using JavaScript from an array creating in JavaScript.
Any help please?
Thanks.
...
Suppose I need to add unit tests for the following class from legacy code (that has no unit test for now). It is just a simple map or dictionary.
function Map(...) { ... }
Map.prototype.put = function (key, value) {
// associate the value with the key in this map
}
Map.prototype.get = function (key) {
// return the value to whic...
As you know, the javascript's parseFloat function works only until it meets an invalid character, so for example
parseFloat("10.123") = 10.123
parseFloat("12=zzzz") = 12
parseFloat("z12") = NaN
Is there a way or an implementation of parseFloat that would return NaN if the whole string is not a valid float number?
...
I'm have a problem with this code not working when it probably should be:
<script language = "javascript">
$(document).ready(function() {
$('#dept').change(
function() {
var datas = $(this).val();
$.cookie("deptdata", datas);
var urlDept = 'catch.cfm?dept=' + datas;
$.ajax({
...
Is there any way to get POST values in jQuery?
...
This is trivial I know but I'm so used to OOP languages. I'm trying to figure out how to write out each name/value in either one alert or many, just so I can verify the data
var dCookieNameValuePairs = {};
for (i = 0; i < cookieValues.length; i++)
{
var akeyValuePair = aCookieValues[i].split("=");
dCookieNameValuePairs[keyValu...
I'm developing a Google Map API v2 app, where markers are loaded from a database. These markers can then be dragged to a new location by a user and saved to the database.
I'm adding these markers as draggable, however I don't just want the users to be able to drag them accidentally. So I have added a button to enable the dragging and th...
I am creating a datetime string that looks like this : 2010-07-15 11:54:21
And with the following code I get invalid date in firefox but works just fine in chrome
var todayDateTime = year + '-' + month + '-' + day + ' ' + hour + ':' + minute + ':' + seconds;
var date1 = new Date(todayDateTime);
In firefox date1 is giving me an inval...
I'm using this function to only allow numbers in a text input.
$('input').bind('keydown', function(e) {
var key = e.charCode || e.keyCode || 0;
return (
key == 8 ||
key == 9 ||
key == 46 ||
(key >= 37 && key <= 40) ||
(key >= 48 && key <= 57) ||
(key >= 96 && key <= 105));
...
I have a selectbox that is dynamically filled with an Ajax call. The user enters a zip code in a textbox and then the selectbox is filled with cities in that zip code. My problem is that the selectbox starts out empty but centered correctly. Once it is filled dynamically from the Ajax response, IE simply expands the selectbox to the r...
I've implemented a web based instant messaging / chat feature using http binding and ejabberd. For the lazy here's the short version of my question:
How would you go about implementing a web based XMPP chat client which could be displayed in multiple browser windows simultaneously, each displaying an identical view of the open chats?
M...
I have a simple HTML Form that has some input fields for sending an SMS/TXT message. I also have a jQuery script that counts the number of characters entered and also works out how many SMS Credits will be used to send the message.
These appear in a div as follows:
<div id='message'>
<span id='char'>0</span> characters,
<span id='msg...
I am asking a small percentage of users on a site if they would take a short survey. If they click 'yes' I would like to close the little pop-up window i have open that is asking them, and launch a new window in the background that comes to the forefront once they leave my domain - or close their browser.
Right now I am using a form:
...