Possible Duplicate:
What does !! operator mean in javascript?
I've seen operator ! used like !!. For example
var filter = !!(document.body.filters);
If I'm not wrong it's equivalent var filters = typeof document.body.filters != 'undefined'?
Is it a good practice to use !!?
...
I am trying to make a full Flash site SEO'd and have come across a problem which it seems the swfaddress optimizer javascript can fix, but i can't find out how to configure it. Does anyone know of any documentation or examples to help me out.
Thanks
dai
...
I just want to implement hover on a single div(for IE 6). what is the simplest , lightest, solution in jquery?
<div class="hoverforie">
</div>
i will add this script in IE condition comment.
Thanks in advance.
...
I'm working with CMS i'can't edit source of . can i add any in through javascript?
Edit:
For example I want to add this
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
just above <title>
...
When catching / handling exceptions in JavaScript, how can I determine what the call stack was when the exception occurred? (and also if possible what the line number was)
try
{
// etc...
}
catch (ex)
{
// At this point here I want to be able to print out a detailed exception
// message, complete with call stack, and if pos...
I have a function with the name MakeInitialCapital. I want to supply control name as an argument and the text in that control must be converted to Initial Capital.
How to modify this Javascript code:
function MakeInitialCapitalControl(controlName)
{
TextInControl = getElementByID(controlName).value;
return str.toLowerCase().replace(...
Is there a simple way to call Python libraries from JavaScript? Especially from the inside of a Firefox extension.
A good option to compile a pure Python library would also be great. I looked at Pyjamas, but it seems to offer only partial support for Python.
...
^(?=[\w-%&?#=]+\d)(?=[\w-%&?#=]+[a-zA-Z])[\w-%&?#=]{8,12}$
Was meant to match the below conditions in a javascript based new-password check,
Must contain minimum 8 to 20 characters, mandatorily including one letter and number
May include only one of the following special characters: %,&, _, ?, #, =, -
Cannot have any spaces
With ab...
I want to verify that the date entered is in yyyy/mm/dd format. If by mistake user enters in dd/mm/yyyy format, it must automatically convert to yyyy/mm/dd using Javascript function.
Edited:
function CheckDateFormat()
{
EnteredText = document.getElementById('LDate').value;
LengthOfText = EnteredText.length;
Status = true;
for(i=0;i...
I am using the following javascript to dynamically add rows in a table:-
var trObj = document.createElement('tr');
trObj.setAttribute('name', 'dynamicTR');
var tdObjEmpty = document.createElement('td');
tdObjEmpty.setAttribute('colspan', '2');
tdObjEmpty.innerHTML = ' '
trObj.appendChild ( tdObjEmpty );
var tdObj = docum...
Looking to place different icons in front of items/options in a HTML select box.
...
Hello people
How to disable IE (browsers) message for reference information with JavaScript?
this is the situation:
I have a form that i submit, after submitting i reload the page and appears the following message :
"To display this page Firefox has to resend information that will repeat previous actions (such as a demand or confir...
I'm writing a GreaseMonkey script, as part of which I'd like to sort a list by dragging its items. I'm using mootools, but the component for sortable lists doesn't work in the GM sandboxed environment. Can you recommend a smallish library/piece of code to do list sorting in the most lightweight fashion? I want it to be independant of any...
In a multi-language web site, can I rely on the javascript confirm to translate the text of the Ok/Cancel buttons? If so, is it related to the browser or OS language setting?
...
In IE using Javascript, is there way to know if doing a regular GET on a URL using XmlHttpRequest will pull its data from the cache or hit the server?
If there is no way to know in advance, is there a way to tell XmlHttpRequest to NOT hit the server, and instead pull from the cache if possible?
To clarify: I understand how browser cach...
function redir(){
setTimeout(window.location = '/SV/main/main.html', 10);
}
I dont know if the delay is in miliseconds or seconds, but I have tried BOTH. (by adding three zeros).
Problem is, the redirect is made right away, without any delay at all... why?
Thanks
BTW its called like this: <body onload="redir();">
...
I've seen these charts referred to as tag clouds, task clouds, and cloud charts, but can anyone recommend a pure JavaScript (no Flash please) library or utility with which one can generate cloud charts? Many thanks.
...
I was using built-in JavaScript .set_map function as discussed on this stackoverflow entry but not, it just stopped working.
I've literally not changed my code in 2 months and now, Firebug is reporting:
Error: *set_map is not a function*
It appears the original poster of the Google Maps plugin is also experiencing the issue on his/her...
Using Google Chromes new Speed Tracer extension to profile my app.
Appears my app is constantly reporting "Sluggish (events) 100%", which means the browser is blocking html rendering.
I don't understand enough how to interpreter the Speed Tracer tool to fix this issue.
Any help appreciated. My web app is: bit.ly/7J0U
...
Hello all,
I've been using a rteEditor very sucefully until now.
The problem is in this line of code:
document.getElementById(rteName).contentWindow.document.execCommand('insertHTML', false, html);
I'm passing an ABSOLUTE path to the html var such as ("http://www.url.com/file.html").
But when it execute this insert command the outp...