javascript

Calling javascript after a .net validator fails

Is there away to call a javascript function after a validation control fails validation? ...

Load images when the user scrolls down the page -

I have been noticing a trend in blogs where the images don't load until you scroll down the page and the images appear in the view screen. I imagine that this must be some sort of jquery magic, but after some googling I haven't been able to figure out how it works. Does anyone know how this is done? EDIT: If you want to see an exampl...

Jquery: iphone style checkbox plugin, why is it so big? can't it be so much simplier?

I was looking up jquery checkbox scripts/plugins, and I came across this one: Jquery Checkbox Plugin Why is it 8kb? that's absolutely HUGE for something that could be so incredibly simple, right? I'm not that good at Javascript/Jquery, but I know that you can set up a click event on an image that toggles a checkbox that has the same cla...

Server logs showing GET request right before POST request

When I look through my server logs, I see periodic GET requests coming in instantaneously before the POST request from the same ip with the same referrer. I expect the POST, but not the GET. Has anyone seen this before? I'm dynamically creating a form inside of an iframe with javascript in order to send the POST request to a server. I...

Could not convert javascript argument

After trying to append some code to a div layer I received the following error and don't know why. uncaught exception: [Exception... "Could not convert JavaScript argument arg 0 [nsIDOMDocumentFragment.appendChild]" nsresult: "0x80570009 (NS_ERROR_XPC_BAD_CONVERT_JS)" location: "JS frame :: http://code.jquery.com/jquery-latest.min.js...

Remove eventlistener in Javascript after event ocurred?

There are 24 div-objects waiting/listening for a mouse-click. After click on one div-object, I want to remove the eventlistener from all 24 div-objects. for (var i=1;i<=24;i++){ document.getElementById('div'+i).addEventListener('click',function(event){ for (var z=1;z<=24;z++){ document.getElementById('div'+z).rem...

add a delay to jcarousel

Does anyone know how I could add a delay to jcarousel? I want to be able to click the 'next' button, there be a short delay, and then continue to the next slide. cheers ...

Javascript - Location href with _blank

Hi, is it possible to use the window.location = "http://google.de" with _blank? I dont want to use the <a href ... > at all, because it makes problems with the CSS (link-color). You must always insert this code and that nervs :/ .bone a:link { color:#FFFFFF; text-decoration: none } .bone a:visited { color:#FFFFFF; text-decoration: n...

Running Ajax in IE, FF, and Safari

I'm trying to create an ajax connection to a weather xml feed and then parse returned data. I don't have any issues making a connection via IE, but for some reason I don't have any luck in FF or Safari. Basically what I'm doing is running an html file that contains the following code. <html> <script type="text/javascript" language="jav...

How to get the available area on the screen

In my Flex application, the modules can be larger than the resolution of the screen and have a vertical scrollbar. When the user clicks somewhere, I popup a small component at the position of the mouse co-ordinates. However, if the user clicks too close to the edges of the screen, I need to prevent the component from appearing outside ...

how to exchange variables between two html pages

I have two html pages example1.html and example2.html, how will i pass variables from example1.html to example2.html using query string and retreive that variable in example2.html without using any serverside code ...

Firefox reloads javascripts

Hello, I am a beginner web developer and here is my problem: In short: I keep getting similar message in Firebug for all the javascripts I include in the page: GET =1284615828481">http://localhost.:33085/Scripts/jquery.form.js?=1284615828481 200 OK 1.01s In details: I am loading a webpage using AJAX . This page contains references t...

Reg. exp. in javascript to get last <a> tag in substring

Hi, I need to find the text of the last <a> tag in a page using javascript. I read the full HTML like this: var str = document.body.innerHTML; I now need to find a subpart of the str and inside that subpart i need to find the last <a> tag. There could be more than on <a> tag, but the exact count will be different. Here is an example...

HTML form default values override actual values at post time in Internet Explorer 9

I am just testing the brand new Internet Explorer 9 Beta with my website. I see a weird behaviour for some form values and I am not sure if it is my mistake or a bug in IE9. What do you think? I have one form which declares several hidden input fields like this <input type="hidden" name="NewStatus" /> <input type="hidden" name="lastSav...

Calendar not working?

Hi all, I have a button called 'view', when I click it will fire an ajax call and show details of a product in a div in the page. In this div, I show product details like description, uploaded date. The problem is that, all data are coming nicely in this div including date, but when we click the calendar to edit (this div content is e...

jQuery, Select by attribute value, adding new attribute

Hi, I have an anchor in my HTML. it has a page attribute with a value. So everytime it is clicked I use the page attribute value in my js. Now I want to set a style attribute with a background color to show that a certain a element is selected. So I have to select the element by page attribute and add a new attribute with a value to the...

Need help with Javascript "mouseover" and "mouseout" events

Consider the following code: HTML: <div class='a'></div> <div class='b'></div> CSS: body { position: relative; } .a { position: absolute; left: 100px; top: 100px; width: 100px; height: 100px; background: #777; } .b { position: absolute; display: none; background: red; } JavaScript: $(functi...

How does one include a javascript (widget) on a page created using the Textile markup language?

The static page on my site can be edited and written using the textile markup language. Now if I need to include a GetSatisfaction widget or a Wufoo form on the static page, how do I go about it. Adding the widget code as it is doesn't help. Neither does the use of == in the string. ...

Keeping track of javascript memory usage

A web application I am currently working on appears to be leaking memory: with each refresh of a page IE's memory usage goes up and it never releases that memory. Since certain pages are ment to be kept open in a browser and auto-refresh this is quickly turning into a problem. The application is very javascript-heavy and relies on a com...

Regarding highslide lightbox issue

Hi, I am trying to open a page with onclick as below HTML <a onclick="loadwave(44,33)" href="javascript:void(0);"> wow its working pretty</a> Javascript function loadwave(qid,wid){ url= gSitePath+'question/forum/?qid='+qid+'&wid='+wid; return hs.htmlExpand(url, { outlineType: 'rounded-white',wrapperClassName: 'draggable-head...