javascript

How do you debug through a compressed javascript file?

I'm using django-compress to shrink my javascript files. However, I am now having trouble debugging through it because everything is squished. I believe stackoverflow use some kind of js compression too. How do you go about to debug through your javascript on the live site or on your dev machine with the code well formatted? Firebug h...

How to Communicate between two browser windows ?

I have parent browser window P . on clicking a button a new browser window WIN-A is opened. then again pressing the same button it should read the title of the WIN-A window and open WIN-B how to achieve this using Javascript? Thanks in advance ...

Javascript caching question

I'm making an application that draws a lot of widgets and tiles on a canvas. The core UI will be defined by a long string of characters and drawn at page load by javascript. Since that core UI is big, >250K, and never changes, whats a good way to cache that? I know I COULD just stick it in a variable at the top of the file, but is there...

Can you access properties/methods of parent window from the child?

if I create a popup in JavaScript I can access its properties: var myWin = window.open("test.htm"); myWin.property1; but my question is, can I access properties/methods of parent window from the child? ...

Javascript links made by php in Firefox.

I'm working on a script and it works fine in IE and Chrome, but the links do not work in Firefox. Basically I am using php to query a database and generate some links inside the page. Example of the relevant link code: <TD class="bodycopyblue" onmouseover="this.style.background='#FFFF80';this.style.cursor='pointer'" onmouseout...

Changing input text value with Javascript doesn't change display

I'm trying to change the value of a text input field based on user actions. I'm doing it like this: document.getElementById(textFieldID).value = newValue; It isn't quite working -- the original text in the field remains on the screen, unchanged. However, when I submit the form, it behaves as though the value was indeed changed correc...

IE Keyboard focus being stolen in popup window

I have a Flash application that integrated Facebook friend connect. When the user initiates Facebook Friend Connect it pops up a new window that prompts the user to log into facebook. On internet explorer when I type in my username and password I intermittently lose key strokes. If I remove the flash page from the HTML content and do th...

How do to wrap a span around a section of text WITHOUT using jQuery

<p>Lorem Ipsum <a href="#">Link</a> <div ... </div> </p> I want to put a span around 'Lorem Ipsum' without using jQuery, so the result looks like: <p><span>Lorem Ipsum </span><a href="#">Link</a> <div ... </div> </p> Any ideas? Thanks ...

Select DOM elements using ASP.net AJAX similarly to how Jquery does it

I'm trying to select a particular set of div elements and change their height properties to auto. The jquery code I use to do that at the moment is: $("div#TreeView1 td > div").css("height","auto"); Unfortunately I have to use the MS javascript lib (despite my protests). How can I do something similar using Microsoft's ASP.net AJAX? ...

Multiple instances of CKEditor (in Safari)

I'm having a problem creating multiple instances of a CKEditor in a JQuery UI dialog. The dialog loads a remote form via AJAX, so the goal is to be able to close and reopen the dialog and have a new instance of the editor. With the default options, when reopening the dialog it gives an error saying that an editor with that name already e...

window.print on IE7

I am trying to print an HTML page on IE7 but it only prints 1 out of 3 pages. I prints fine on Firefox and IE8. Is there a bug on IE7? Here is the code: Click <a href="#" onclick="window.print();">here</a> to print this page. ...

ModalBox display only once sitewide

I am using the script called ModalBox. I want to display the ModalBox on page load the first time a visitor reaches my site. Every time after the first visit the modalbox should not display again. How can I do this? I have set up a testing page. Please Visit this page to view my code. Testing Site The code that I am using to pop up the...

What to learn before using a JavaScript library / framework?

It seems that many of the JavaScript questions are answered by the simple use of pushing a library, without taking into account the person asking the question. I think libraries are great myself, but sometimes I think that we're too quick to throw a library down someone's throat. Imagine a person asks a question and it's apparent that t...

how to remove # sign after url

I have windows media player on my main page with video links. So when I click the link that particular video should play in the media player inside my web page. I am using javascript to handle this. My video files are also stored on the remote server. But when I click on the video link the address box shows a # sign after the url which d...

FireFox warning "Unknown pseudo-class or pseudo-element 'hidden' " keeps running over and over

Hello I recently have discovered a warning happening in Firefox that says Warning: Unknown pseudo-class or pseudo-element 'hidden' Here is page http://eleven23.net/eleven23/beta/work/web/lounge22.php And the warning happens when it gets to the part of javascript that has img:hidden $('img:hidden').eq(0).fadeIn(500);//fades in...

Help registering an event listener on an element

This is the structure of HTML. I have to add an event listener when user click on div with className "next_button". I try to add an event listener by using prototype. <div id="horizontal_carousel2"> <div class="previous_button"></div> <div class="container" > <ul> <li></li> <li></li> <li></li> <li>...

Javascript Function Beautifier

I am looking for a javascript beautifier with a very specific function. I need a beautifier that can sort functions and vars alphabetically based off of their names. I have a very long javascript file that is an eyesore to look at. Does anyone know of any javascript beautifiers that will do this? ...

Brighten a section of a webpage background

Is there any way to have a semi-transparent overlay in a webpage and will brighten the underlying content? I'm wanting to have a dynamic content in the background of a transparent overlay with one section highlighted in a brighter than the rest of the background. For example, in the mock-up below there is a graph in the background, over...

Firefox and Opera do not finish loading webpage with an embedded Windows Media Player file

BROWSERS CAUSING PROBLEM: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5 Opera/9.80 (Windows NT 6.1; U; en) Presto/2.2.15 Version/10.10 CLIENT MACHINE: Windows 7 Ultimate 64-bit, 4 GB RAM, 250 GB HD, 2.3 GHz. TEST WEBSITE: http://www.microwavecontrolledfusion.us I have no problems loading the ...

What are scriptmanager benefits over direct jquery ajax calls?

I am a little confused about the benefits or conc using scriptmanager with ajax calls or use JQuery to direct call webmethods. Can some one give me some hints about this issue? when to use which? there is any different while dealing with JSON? ...