javascript

JavaScript: void(0), IE6, SWFAddress

Greetings, We're about to launch a secured site (sorry, no URL) and have caught a rather esoteric bug in IE6 that I'm hoping someone might have encountered or be able to shed some light on. This only occurs when three factors are present: The browser is IE6 (it's a financial client, and that's their approved browser) SWFAddress is bei...

encodeURIComponent for double quotes disappears on form action

Hi, I'm trying to pass a url like: my_url = 'http://somedomain.com/somepath/somepage?key="query"'; when someone clicks on a form. I tried using encodeURI and encodeURIComponent and even using alerts to see that I have either "query" or %22query%22 because I call something like document.my_form.action = my_url but when the browser hi...

Preventing click event with jQuery drag and drop

I have an elements on page that are draggabe with jQuery. These elements have click event wich navigates to another page (ordinary links for example). What is the best way to prevent click from firing on dropping such element, while allowing clicking it in not drag and drop state? I have this problem with sortable elements, but think i...

Question mark in JavaScript

I came across the following line in a JS function (it was an RGB to HSB color converter, if you must know) hsb.s = max != 0 ? 255 * delta / max : 0; I'm wondering if someone can explain what the "?" and the ":" mean in this context. ...

Use of double quotes in a 'input type="text"' value wont work, string stops at double-quote !

How can I make it possible for users to use the '"' (double quote) inside a textfield... Whenever I do use double-quote in the field (the value) then when receiving the variable in my PHP file with: $text=mysql_real_escape_string($_POST['subject']); and then echo it, I get a string which is escaped properly, but the string stops e...

jquery FullCalendar

hi guys, I'm trying to use jquery Full Calendar from http://arshaw.com/fullcalendar I searched the docs alot but I could not find how I can retrieve the current month a user is on at a certain moment. On render it is set as the current month in the title, but I cant find a way to use that info. I want to sent the month to my ajax call ...

JS: Hiding DIV based on another DIVs content

I am looking to hide a number of DIVs based upon the specific text of another DIV. My Javascript (below) isn't working. The HTML: <div id="LEGEND">abAB</div> <div id="small-a"></div> <div id="small-b"></div> <div id="big-a"></div> <div id="big-b"></div> If the LEGEND DIV contains the text a, then I want it to show only DIV small...

What is wrong with this JavaScript code?

self.location = 'cache:' + self.location I want to redirect from "[URL]" to "cache:[URL]". I just want this code to work in Chrome browser. ...

Jquery Tablesorter custom date

Hi, I'm trying to setup a custom date parser but can't get my head around it. Basically my dates are in the format mm/yyyy. Can anyone point me in the right direction? Thanks ...

Is it possible from javascript to see whether the page is focued (in current tab) and browser is an active application?

And the same question is for flash. Thank you. ...

Get Character value from KeyCode in Javascript...then trim.

This is what i have now: $("input").bind("keydown",function(e){ var value = this.value + String.fromCharCode(e.keyCode); } If the e.keyCode may not be an ASCII character (alt, backspace, del, arrows, etc)... I would now need to "trim" these values from "value" somehow (preferably programmatically - not with lookup tables) I'm us...

is it good to use Wait cursor in websites?

Hi all. Just wanted to ask - is it good to use Wait cursor in websites? on heavy loading pages.. we dont generally see it used with websites...(please share some if u have seen any) if i implement the following.... will it be compatible with the current browsers? function doHourglass() { document.body.style.cursor = 'wait'; } and...

Converting a 64-bit long UTC timestamp into Actionscript Date

I'm using a Java 64-bit long representation of UTC time System.currentTimeInMillis() and sending that to an Actionscript client as a String, and I want to convert to an Actionscript UTC Date. The trouble is Actionscript (and other ECMAScript like Javascript) only use a 64-bit Floating point number representation, so precision is lost w...

Spring Forms + GWT

I'd like to learn how to use Spring Forms and GWT. Basically my forms just ask for a bunch of links and you can submit them. The twist is that when I add a link I want it to be previewed (e.g print the title of the page, some description etc) via an RPC call. The solution I can think of is to use GWT's form panel and bind the inputs to...

What are the best practices for dealing with the Back Button in IE (and Firefox)

I know this in old issue but I can't figure out the best practices for dealing with the back button. I'm writing a web application with lots of data movement between the browser and the backend server. I currently use post and of course when the user bypasses the application navigation and uses the back button both IE and Firefox popup ...

How do I set the StripFormattingOnPaste property of a Telerik RadEditor with JavaScript?

I don't have access to the actual asp.net server tag itself, so I need to change the StripFormattingOnPaste property to the EditorStripFormattingOptions enum with JavaScript and I'm not sure how. I have some code that adds an OnClientLoad() and OnClientCommandExecuted() functions that works so I can add it in there, I'm just not sure whe...

mouseover not working in ie7

Hello! Having problems in IE7.It does not show me the "mouse over- drop down". This "mouse over" was working well till yesterday also works in FireFox. There a table that displays all the current documents.When one does a mouse over on a given document,it displays a list of options in form of a dropdown. Can it be corrected in IE sett...

jQuery difference between live() and ready()?

What is the exact difference between live() and ready()? Edit: found that die() is the opposite of live() ...

One click closure windows tool to compile all js files in folder

Is there a tool or a bat file or some such that allows one click to compile all js files inside a folder into one compiled js file? Thanks. ...

How can I insert a character after every n characters in javascript?

I have a string: "The quick brown fox jumps over the lazy dogs." I want to use javascript (possibly with jQuery) to insert a character every n characters. For example I want to call: var s = "The quick brown fox jumps over the lazy dogs."; var new_s = UpdateString("$",5); // new_s should equal "The q$uick $brown$ fox $jumps$ over$ the...