javascript

Faking Fixed Position in IE6

I have a site that utilizes a bottom fixed position masthead here: http://www.entheospartners.com/newsite/ This setup works great in all browsers except IE6, which doesn't support fixed positioning in the least, so here's what I've done: When an IE6 user comes to the page, I make the determination if scrolling is necessary using this b...

Help me understand JavaScript events

I have a table full of cells and i would like to get on which cell the mouse is. For this i have attached events to all the cells and then i am finding the elements. But i guess there could be a better options. right ? Is it possible that i attach only single event handler on top and still be able to catch all the information. like wh...

jQuery events .load(), .ready(), .unload()

Hi folks, Just a simple question, for the jquery event. Are the .load(), .ready() and .unload() run in order when the DOM is loaded? The answer seems yes when I see the jQuery Documentation. <script type="text/javascript"> $(window).load(function () { // run code initializeCode(); }); $...

how to remove a div with same ids but display='block' and display='none' in JAVascript

I have more than 1 divs with same id, but one has diplay='block' and others have display='none'. I want to delete all the divs which have display='none'. Kindly tell the easiest way. ...

XSLT+JavaScript: using classes

I'm trying to use classes in XSL (the 'msxsl:script' tag). But I get the 'Syntax error' message when debugging the file. Here's a simple code that I'm using: function Test1(str) { this.str = str; } Test1.prototype.getStr = function() { return this.str; } function test() { var newTest1 = new Test1("some string"); return...

Decimal in javascript

The text box should accept onli decimal values in javascript. Not any other special characters. It should not accept "." more than once. For ex. it should not accept 6.....12 Can anybody help??? ...

run javascript from a page in code?

Maybe i'll call the project unreasonable and give up on it. There is a page i am sending data to and it is expecting certain cookies to be set in javascript. The code is semi weird. Is there a way i can run javascript on a page to update cookies in C#.NET then continueing submitting my data? ...

jqGrid problem, expecting jQuery.jgrid but $.jgrid exists instead

I'm using jqGrid for a JIRA plugin and have included the jquery and jqgrid libraries as web resources. I've set up a column in jqGrid as required and when I try to submit the form with the respective column empty I get an error in firebug: jQuery.jgrid is undefined jQuery.jgrid is null but $.jgrid has the correct data. Does anyone kno...

Jquery to find a name on html page and add hyperlink

Here is my example: I have a a website that contains the following: <body> Jim Nebraska zipcode 65437 Tony lives in California his zipcode is 98708 </body> I would like to be able to search for zip codes on the page and wrap them with hyperlinks like: <body> Jim Nebraska zipcode <a href="/65437.htm">65437</a> Tony lives in California...

Hot to convert UTM to Lat/Long?

Is there a way to convert UTM to Lat/Long in Javascript? I have seen another thread on this but it was in Java and Python which won't help me much. Please let me know, thanks. ...

Is there a 'has focus' in JavaScript (or jQuery)?

Is there something I can do like this (perhap via a plugin) if ( ! $('form#contact input]').hasFocus()) { $('form#contact input:first]').focus(); } Basically, set focus to the first input, but only if the user has not already clicked into anything? I know this will work too, but is there anything more elegant? $(function() { var...

How to set cell's background in HTML table ?

I would like to set the background of a cell in HTML table to be like this. What are my options besides using an image as background ? Are there any predefined backgrounds like this ? Maybe dotted, or diagonal lines backgrounds ? In case of image background, if I don't know in advance what would be the size of the cell, what image size...

How can I convert UTM coordinates from Meters to Feet?

Does anyone have a formula or conversion that will switch my UTM coordinates from Meters to Feet? I found Javascript code that will convert UTM coords in meters to Lat/Long but I will need my UTM in feet before I convert it to Lat/Long. Thanks, ...

Clear dropdown selection on radio button click

I have a set of radio buttons. When primary is selected, the Primary Company field is hidden. I would also like to at this time clear the drop down selection. How can I do this? <p> <label>Company Type:</label> <label for="primary"><input onclick="javascript: $('#sec').hide('slow');" type="radio" runat="server" name="...

way of pasting code snippets/blocks in gmail/wave/gdocs?

often i want to email some code without attaching a file, are there any gmail/google wave/gdocs plugins for code sharing? gmail would obviously be most useful! ...

Avoid Google Analytics from categorizing pop-up as entrance

hey there, in my google analytics account there is a page tracked usually opened as a javascript window.open() pop-up (same domain as referring page). unfortunately, g.a. categorizes the pop-up page as entrance, although it is just a step in the whole navigation flow. how can i avoid this? thanks for your help! ...

jquery range slider not sliding after changing min value after init

I init my range slider on loading of the page: $("#slider").slider({ range: true, min: 634606, max: 734818, step: 1, values: [634606, 734818] }) on user input (html form) i retrieve data from the server with an ajax request. The data has to limit the slider (user input). I'm ...

javascript add rel facebox

Hi all,i want to enable facebox jquery using javascript. here in normal html <a href="stairs.jpg" rel="facebox">text</a> how do in javascript ?something like this? document.location.href="stairs.jpg"; document.location.rel="facebox"; ...

sIFR3 smoothing and IE

Hi, i've started to use sIFR3. I don't know how to turn on smoothing of font. Do i need to change it in my font.swf file? In FF3 it work perfect, everything is okay, but when i turn on my IE8, nothing changes. Even live example doesn't work (http://work.likeaninja.co.uk/sifr/demo/). What's going on? My Flash Player is "WIN 10,1,51,95"...

best PHP programming approach?

Hello guys, i guess that many of us has acceptable years of experience in PHP programming, me myself got 5 years programming in PHP since in University (not very solid), i just want to gather some suggestion here, what is better approach in PHP OOP? Since there is a lot of PHP framework out there as well as javascript framework, can a...