javascript

JavaScript Error "Object does not support this property or method" in IE6

There is no error while loading the page but if i click on the page after successful loading, the js error pop up comes up with "Object does not support this property or method" message. No errors encountered in IE7 or FF3, it is happening only with IE6 What could be the reason for this? Please help. Thanks ...

window opener close issue for javascript

Hi EveryBody, I have a problem with browsers window managament with javascript. I have two page in my proof of concept application. First page contains login information (username, password, login button etc.) and second page is a managament screen. I need that when the user pressed to the login button on the login screen it open to main...

"Access is Denied" error in javascript

I am using window.open(0 method to open a new popup window. It's showing javascript error "Access Denied". My code is below: Script Code: function wopen(url, name, w, h) { var win = window.open(url, name, 'width=' + w + ', height=' + h + ', ' + 'location=no, menubar=no, ' + ...

How to get the value from URL Parameter ?

Just Consider : I am having the URL and with parameter www.test.com/t.html&a=1&b=3&c=m2-m3-m4-m5 I just want to get the value of 'c' . I need to get the all value of c because i just try to read the url but i got only one m2 . But i want all value using Java Script ...

Merging the Strings

HI , In Java Script , var a ="apple-orange-mango" var b ="grapes-cheery-apple" var c = a + b // Merging with 2 variable var c should have value is "apple-orange-mango-grapes-cheery" .Duplicated should be removed. Thanks , Chells ...

Jquery and javascript height different to div

I have a contianer div around all the content in the site that dynamically streches, have also got severall other divs that strech (all using the same method as 20 other sites I have). Not matter what method is use with jqueyr or javascript to get the height of the container, javascript and jquery seem to return a value bigger that heig...

Rewriting javascript to jquery for multiple forms on a page

Hello Everyone, I have a question concerning multiple similair forms on one page. Lets say you have a page with two or more polls. The HTML forms in itselves are very similair. Previously the was a soltuion built with inline javascript. Which is of course not the nicest solution. The way it was built is that eacht poll form had its own ...

jQuery :cant use split function

I am using jQuery autocomplete pluggin . I have the following code $().ready(function() { function findValueCallback(event, data, formatted) { $("<li>").html( !data ? "No match!" : "Selected: " + formatted).appendTo("#result"); } }); I am trying to split the value coming in data.When i alert it,It is showing properly.But i cant u...

Show loading gif after submit button is clicked?

I'm trying to show a loading gif after a user clicks submit on a form. I have search endlessly for a good tutorial showing how it done. I get half way there but the gif doesn't hold for long enough, do any one know of a good tutorial or the scripts need to complete this. ...

Javascript / Flash notifications in Slideshow Pro

Hi, I am using SlideShow Pro (a flash slideshow/media player) on a site. I want to receive notifications (in JavaScript) from the flash player when a video is finished playing so I can load another video via Ajax. There is an onVideoEnd() ActionScript call in the API: http://wiki.slideshowpro.net/SSPfl/API-onVideoEnd In ActionScript: ...

jQuery Disjoint

Hello, I have two arrays: var a = new Array(1,2,3,4); var b = new Array(5,3,2,6); I want to find out which elements are in array a but not in array b and which elements are in b but not in a? I know one way is to iterate through them each, but is there a more efficient way? Thank you for your time. ...

using cakephp values inside JQuery

Hi, I m new to CakePhp and JQuery. I am getting an error in using the cakephp code inside my JQuery. My code <script type="text/javascript"> $(document).ready(function(){ var attributeid;var fieldname; $("#"+<?=$r['Attribute']['id'];?>).change(function () { fieldname=<?=$r['Attribute']['label'];?>; ...

Is there a AJAX or JSON interface to retrieve the stackoverflow.com userId for a given username?

I'm trying to develop a stackoverflow.com widget for Mac OS X and I'd like to show the flair for a given username. The different possibilities described in User Flair are all expecting the ID of a user but I'd like to let the user enter a username, instead. Is there any way to retrieve the userID for a given username? Better yet, is t...

"element.dispatchEvent is not a function" js error caught in firebug of FF3.0

Hi All, i am getting the following error while loading my index page in FF3.0. Sorry, i am unable to paste the script here as it is 2030 lines of code. element.dispatchEvent is not a function on expansion it gives me below things, fire()()prototype.js?1 (line 3972) _methodized()()prototype.js?1 (line 246) fireContentLoadedEvent()prot...

JavaScript: Invoking click-event of an anchor tag from javascript

I have a page with an anchor tag. In my JavaScript I am setting the HREF attribute of the anchor tag dynamically based on some if-else conditions. Now I want to invoke the click event of the anchor tag programmatically. I used the below code, but was not successful. var proxyImgSrc="CostMetrics.aspx?Model=" + model +"&KeepThis=true&TB_i...

Dynamically upgrade/replace prototype library

I am developing a survey invitation that can be embedded in many sites. To present the invitation I am using Modalbox, a javascript library that shows an animated modal box over a semi-transparent overlay. This Modalbox library depends on Prototype and script.aculo.us/effects libraries. The invitation will be dynamically embedded in sit...

How can I pass variables from JavaScript to PHP?

I am using jQuery to calculate prices. Here is a small snippet of my JavaScript: // Prices: radio var curLam = "gloss"; $("input[name=lamination]").click(function(){ var gloss = 5; var matt = 6; if ($(this).val() == 'gloss' && curLam != 'gloss'){ $('#prices span').text(parseInt($('#prices span').text()) + gloss - matt); curLam = ...

Jquery $().each method obscures 'this' keyword

I am creating a Javascript object that contains a function that executes a jQuery each method like the following: function MyClass { Method1 = function(obj) { // Does something here } Method2 = function() { $(".SomeClass").each(function() { // 1 2 this.Method1(this); }); } } Which objec...

IE 6 Images are not shown

I have a dynamic div created which contains text + images. These images are shown well in all browsers, except IE6. I need to do a right click show pictures, then they come. Looks like its a bug with IE. ...

Javascript regex pattern

Hi, I have a combo box and input box. If I enter any letter in input box then all the words or sentence that match with that letter should display in the combo box assuming that a list of words or sentence contain in the list. ex1:) input box: a combo box : America Australia joy is in Austr...