javascript

Scripting.Dictionary access methods?

Is there anyway to access intercept when an item gets added to a Scripting.Dictionary or hook up an event in javascript?? Do they have accessor methods eg. set, get or not? var test = new ActiveXObject("Scripting.Dictionary"); test("a") = "test"; I need to do some more tasks when this is set. Any help would be greatly appreciated. ...

jQuery Flexigrid Resize columns in IE7 broken

In firefox, column resizing works fine. But in ie7, it's broken. Here's a thread about flexigrid broken from jquery 1.3, I've tried the suggested edits to the flexigrid code, didnt work. We're currently using jquery 1.3, although i've tried 1.3.1 & 1.3.2, neither fixed the problem. While inspecting the css in ie7, I noticed <div clas...

Why is this jQuery animation jumping up and down?

Javascript: jQuery(function() { jQuery("#showquickfind").mouseover( function() { jQuery("#quickfind").animate({height:"show",opacity:"show"},"slow"); return false; }); jQuery("#quickfind").hover( function() {}, function() { $("#quickfind").animate({opacity:1.0},1125).slideUp(375); return false; })...

IE 6 and the multiple button elements all sending their name & values.

When using multiple button elements in a form, I realised that IE7 sends the innerHTML instead of the value of the button. All good I thought, I'll simply change my PHP code to this <?php if (isset($_POST['button-name'])) { add_product_to_cart(2); } ?> Now my old friend IE6 is going a little step further at being a nuisance. It s...

SVG vs CANVAS, where is the Web World going towards?

I need to pick one of two technologies (svg, canvas) for an ongoing project of mine. I would prefer to pick the technology that is more maintained and in active development rather then choose a technology marked for "putting down". Which of the two should I choose? Is there a good JS library built on top of them? ...

Javascript - Trying to wrap my head around custom events

I'm trying to get my head around custom events. I understand how to register and trigger custom events. However, it seems like its not possible to register truly custom events. Everything has to trace back to a DOM event like click, onload, blur, etc. Or am I wrong? For example, suppose I have an array. I want to register an event that ...

Dynamic proxies in javascript ?

I can proxy a single function in javascript by doing something like this (just jotted down from memory so bear with me) function addAroundAdvice(target){ var targetFunction = target.aFunction; target.aFunction = new function(){ invokePreCall(); targetFunction.apply(target, arguments); invokePostC...

Can I assume that DOM is not ready yet on dynamically loaded JS script?

I have written an external script that needs to run after DOM is ready (or after onload if thats impossible). I use this method to load the script dynamically since I need parameters on the script: <script type="text/javascript"> document.write(unescape("%3Cscript src='mydomain.com/script.js.php?u="+encodeURIComponent(window.location.h...

Is monitoring location.hash a solution for history in XHR apps?

As is well known, in XHR (aka AJAX) web applications no history for your app is build and clicking the refresh button often moves the user out of his/her current activity. I stumbled upon location.hash (e.g. http://anywhere/index.html#somehashvalue) to circumvent the refresh problem (use location.hash to inform your app of it's current s...

Identifying Between Refresh And Close Browser Actions

When we refresh the page (F5, or icon in browser), it will first trigger ONUNLOAD event. When we close the browser (X on right top icon),It will trigger ONUNLOAD event. Now when ONUNLOAD event is triggered, there is no way to distinguish between refresh the page or close the browser. If you have any solution then give me. ...

javascript to overlay a modal popup that is center aligned.

want to know Simply the javascript to overlay a div on centre of the page. Just want to use plain java script to show and hide a div on the center of the page with "Please wait..." message and disable the background. Also this div shoud show on top of the other content of the page. My div looks like this <div id='mydiv' style="display:...

Problem with flooding menu (php,javascript,ajax)?

I have two drop down menus on my website. Technologies used are Javascipt , php , mysql. City : [ ] Area : [ ] TODO: When user selects city I want to query database for areas in city and dynamically populate the area drop down menu. When user selects area I want to query database again for results that belong to that p...

Clear all HTML fields using javascript

Hi friends , is it possible to clear all textboxes in HTML by calling a javascript function ? ...

How can I convert javascript to vbscript?

HI, How can I convert javascript in to vbscript? I am making a script entriely using vbscript. But for some sections i got code in javascript. ...

JavaScript / jQuery problem on Internet Explorer 7

I have a simple HTML page that looks like this: ...<div id="main"> <a href="#">Click here!</a> </div>... I have a piece of jQuery JavaScript in the header that looks like this: <script type="text/javascript"> $(document).ready(function() { DoHello(); }); function DoHello() { $("div#main a")....

form submission within thickbox

I have a contact form open in thickbox i want when user click on submit form data submit to my php that will process that data and show sucessfull msg back to thickbox. php page is called but how i will get form data? ...

Javascript 'this' question

I have the following: var o = {f: function(fn) { fn.call(o); }}; var ob = {f: function() { o.f(function() { this.x = 2; //HERE: how can this reference ob? //ob.x = 2; }); }}; ob.f(); ob.x; // undefined o.f(fn) calls fn where this is bound to o. At HERE, I want to use this to access ob. However, when ob.f i...

External JS and browser

I have an external JS file that I include in my ASPX page. Whenever I make changes to the JS, I need to close the browser and reopen it to see the changes. I have tried Ctrl F5 to refresh the cached JS copy but that doesn't work in IE. Is there some way to not restart the browser to see the updated changes? ...

How do I reload a page without a POSTDATA warning in Javascript?

I want to reload a page using: window.location.reload(true); But I receive the POSTDATA warning because the refresh function want to resend previous POST form data. How can I refresh my page without this warning? UPDATED: I have no control of the project! I can't workaround the POST itself! ...

Dashboard Cross-domain AJAX with jquery

Hey everyone, I'm working on a widget for Apple's Dashboard and I've run into a problem while trying to get data from my server using jquery's ajax function. Here's my javascript code: $.getJSON("http://example.com/getData.php?act=data",function(json) { $("#devMessage").html(json.message) if(json.version != version) { $...