javascript

How to open results in another page.

This is probably a simple question but I cannot figure out how to open the results from my database in a javascript popup window. I have an index.php page with a input box and an input button. When the user selects a date and presses the button, I'd like the results to open in a new window. How can I do this? Thanks ...

Open select ie6

Hi all. I searched for a way to open a select element (combobox like) in ie6 from javascript. document.getElementById("sel1").click(); This method works fine in Firefox but doesn't in ie6. So does anyone know a way to do that? ...

Safari issues with javascript + css

I have some strange behavior going on with safari, im using the jQuery.GridLayout plugin and css for styling. Just for some context, this website layout is a simple header followed by the content which are a collection of blocks (each block is a div) positioned by the javascript and rearranged every time the window is re-sized. When I ...

JavaScript Regex, match P but not PARAM

Using JavaScript RegEx. How can I match a <p> element(including attributes), but not <param> or other HTML elements starting with a "P". ...

HTML Canvas: draw image without anti-aliasing

I want to do pixel-true rendering of some images on my Canvas. Right now, I obtain the images through Javascript, so my images are HTMLImageElement instances. I can draw these on the Canvas' rendering context with drawImage. However, this performs anti-aliasing on the image, which I don't want. There appears to be a lower-level image m...

Sporadic "SetVariable is not a function" in Firefox

I'm using swfObject to embed a flash player in my app. Sporadically, I see errors in FireFox (only, not in IE or Chrome) when trying to communicate with the embedded flash object. The error says "SetVariable is not a function". The code which causes this error executed fine just moments ago, and now shows this error. If I re-load the pag...

Javascript toFixed function

Hello, I have a question regarding toFixed() function. If I have a float e.g. - 3.123123423 and 0. How can I output it to input box with toFixed(2) so the inputbox values would be 3.12 and 0. I mean if the value is integer I want output it without trailing .00 :) ...

Django: problem with Javascipt. Getting 302 and 404 error

I am trying to run WMDEditor in my Django site. I have installed WMD files in a directory called /static/js/wmd.wmd.js of the root of my website. However when the page get served I get: INFO 2009-09-08 11:00:48,217 dev_appserver.py:3034] "GET /static/js/wmd/wmd. js HTTP/1.1" 302 - INFO 2009-09-08 11:00:48,733 dev_appserver.py:3...

Dojo - dojo.byId() over an ajax response

Hi all I'm using Dojo support for Ajax function handleSubmit(evt, targetUrl, submitForm, updateDiv) { dojo.stopEvent(evt); dojo.xhrPost( { url: targetUrl, handleAs: "text", load: function(response){ updateDiv.innerHTML = response; wireEvents(); return response; ...

Is there a way to know if someone has bookmarked your website?

I want to make stats for my website. One thing I want to do is to know how many people bookmark my website. What's the best way to do that without a survey? ...

Adobe Air Jquery loaded html with load() problem

Hello, I have a index.html file which loads html files. $('#content').load(url,function() {}); Inside those html files there is jquery code which works fine on all browsers but when i convert it to adobe air it doesn't work at all. Any ideas? ...

how to create a json object in vb.net 2005

I want to create a json object in vb.net to send the response back javascript function to do something please tell me if anyone have any idea about it. ...

Adding an event listener to an iframe

Is it possible to add an event listener to an iframe? I've tried this code, but it doesn't seem to work: document.getElementsByTagName('iframe')[0].contentWindow.window.document.body.addEventListener('afterLayout', function(){ console.log('works'); }); I've also just tried using getting the element by id and adding my li...

AJAX Length Limitations

I understand that the maximum length for an AJAX call using GET is 2083 (at least with IE6.) Is there any such limitation when doing an AJAX call using POST? I've never used a POST with an AJAX call so I'm not even sure what other differences there might be. ...

How to select the first element in the dropdown using jquery?

I want to know how to select the first option in all select tags on my page using jquery. tried this: $('select option:nth(0)').attr("selected", "selected"); But didn't work ...

Silverlight 3 onload event binding multiple instances

I have two silverlight instances embedded in a page like follows (content simplfied to relevant details only):- <object id="SL1" data="data:application/x-silverlight-2," type="application/x-silverlight-2"> <param name="source" value="/clientBin/Common.xap"></param> <param name="minRuntimeVersion" value="3.0.40624.0"></param> <p...

get zindex javascript chrome

Hi all, can anyone tell me how can i find zindex of a div in Google chrome document.getElementById(id).style.zIndex;//does not work ...

Browser opening text/xml in external program

Is there a smart way to - from a browser - open hrefs to text files and XML files in an external program. My target platform is Win32 so preferably I'd have the files open in the default editor for it (as set in explorer.exe). The solution must work in Firefox. It's a bonus if it works in IE and Crome. My html is generated from a local...

IE jQuery problem

HTML: <div id="media-photo"> <img src="/uploads/photos/16.jpg" alt="" /> </div> <a href="/uploads/photos/5.jpg" class="img"> <img src="/uploads/photos-thumbs/5.jpg" alt="" /> </a> <a href="/uploads/photos/6.jpg" class="img"> <img src="/uploads/photos-thumbs/6.jpg" alt="" /> </a> JQUERY: $(document).ready(function() { ...

Access object's properties in object definition

so I have an object definition that looks like this: var Foo = window.Foo = { MIN_ROWS : 10, MIN_COLS : 10, NUM_ROWS : (function(){ return Math.max( parseInt(this.params.rows) || 0, this.MIN_ROWS); })(), // etc... params: (function(){ /* ... */ })() // parses the GET querystring parameters from the URL and returns as a JSON...