javascript

How to get element by href in jquery?

i want to get an element by it href attribute in jquery or javascript, is that posible?? thanks! ...

JavaScript confirm() crashing with FF 3.6.4

Hello, Yesterday I added a line of JavaScript that uses confirm(), and I was using FireFox 3.6.3 and it was working fine, but today FireFox upgrades to 3.6.4 in the background and the confirm() freezes my browser, although it still works in IE. I suspect it is a FireFox 3.6.4 issue. I was wondering if that was indeed a FireFox 3.6.4 is...

Javascript to hit a url and cause a open/save file dialog to appear (without a new window entirely)

What javascript could I use to open a url without leaving the current page and get an open/save file dialog to appear? ...

convert from javascript to servervalidate in vb.net

this is my javascript code - function ae_Validate(sender, args) { var cbs = document.getElementsByTagName('input'); args.IsValid = true; for (i = 0; i < cbs.length; i++) { if (cbs[i].type != 'checkbox') continue; if (!cbs[i].checked) continue; var price = document.getElement...

Using timezone other than browser zone in Javascript

I have a page which allows a user to view and edit times (with dates) stored in a database. The times are stored in the database in UTC and attached to a location with a different timezone. When the user views the times they are shown in the attached timezone and not necessarily the timezone of the browser. The user should then be able t...

How do I extract images from Google Images based on user input and place them on a page?

Hello all, I'm new to web programming, but I had an idea I could use as an instructional tool, and I was hoping I could get some guidance. Here's my idea: I want to have some form that takes the data entered by the user, submits each word in the form to google images, and retrieves the first image returned by Google Image Search. Eac...

Django template variable not being rendered into JavaScript

I have the following Javascript between tags in a template: YAHOO.util.Event.addListener(window, "load", function() { YAHOO.example.Taco = function() { var myColumnDefs = [ {% for field in included_fields %} {key:"{{ field }}", sortable:true, resizeable:true}, {% endfor %} ]; var myDataSource = n...

How do I register a JS function to run when a browser window is resized ?

How do I register a JS function to run when a browser window is resized ? I assume it's in the Page.ClientScript class methods somewhere, but I am a bit confused. ...

In jQuery, how does the this.each() work?

To make my question more specific, I read the documentation on .each() for jQuery, but I am a little more confused. I have this code: $.fn.imgAreaSelect = function (options) { options = options || {}; this.each(function () { if ($(this).data('imgAreaSelect')) { if (options.remove) { $(this).data('imgAreaSelect'...

Get Cookies PHP

Hi, I'm setting a cookie on an anchor click on my page: $("#btn_twitter_signin").click(function() { $.cookie("bookmarklet_twitter_signin", "true"); }); and on the server side i'm trying to retrieve it $_COOKIE['bookmarklet_twitter_signin'] but strangely i'm getting an "Undefined index: bookmarklet_twitter_signin", though i mad...

How to automatically update or compress a CSS, JS and HTML file every time I save its "source file" in Vim?

I wanted to minimize or compress CSS, Javascript and maybe Html files like Google does. Because, I used Google's Page-Speed and it recommended me to compress files. It provides me the compressed versions but I would like to do this automatically.I don't want to deal with 2 files every time I want to edit something. So basically, I want t...

Removing an anonymous event listener

Is there anyway to remove an event listener added like this: element.addEventListener(event, function(){/* do work here */}, false); without replacing the element? ...

jquery hide method only hides div for a second but then div reappears automatically

Hey all, I seem to have same issue as the one I posted before. I want to hide all the divs that are there by default and only display one. Then the user can click on a side tab to display another. Problem is the divs are only hidden for a second after page loads but reappear soon after. This is code that's suppose to hide the divs of th...

WMP troubles with controls.previous() & controls.next()

I'm creating a Windows Media Player skin and have ran into a road block. I can load a song fine, but my code (see below) for the next and previous features are not working. I'm wondering if there is something in the windows API to handle this feature? Do I need to use directory info or something? Any comments would be helpful-- Thanks f...

How to check/uncheck a checkbox with javascript in lotus notes

How to check/uncheck a checkbox with javascript in lotus notes? I´ve tried a lot of different javascript codes but none worked.... the input type checkbox is insidea form called form1.. thanks ...

OpenX Async Tags

Hi all, We all want to make our site faster, google showed a few samples here: http://code.google.com/speed/articles/html5-performance.html We use OpenX to serve ads, so, assuming browser supporting (FF3.6+), I presume we can just modify the OpenX ad tag from : <script type='text/javascript'> ... ad codes </script> into <script ty...

How to show a popup without a browser

I need an "alert" type feature to troubleshoot an error. I am not using a browser and using javascript as windows administaration purposes. So is their a way to view a varibales value if I am not using a browser? ...

How do nested tags work in E4X?

Suppose I have the following XML: var foo:XML = <root><a>this is a <b>special</b> case</a></root> Is there any way to detect the position of <b> relative to the contents of <a> without a custom subparser? ...

How to add two "on submit=" values to a form?

I am trying to validate my form using two separate JavaScript functions: <form onsubmit="return formCheck(this); return validate_dropdown();" action="somepage.php" method="post" name="something"> When I add just one on submit value, each function works fine individually, when I add two only the first function's v...

Critique My JavaScript Search Array Function

I have been doing tons of Ajax recently and work with lots of my domain objects converted their JavaScript counterparts. I found myself writing several functions that looped through the arrays of objects to search by property values. I decided to write a simple jQuery plugin that would allow me to search an array of primitive or complex ...