I am experiencing a memory leak in IE that occurs upon a page refresh (as I described in this SO post).
All I want to know at this point is: is there a way, on the document "unload" event (which could get called when the page refreshes or closes), to clear EVERYTHING? I'm looking for a simple solution that would ensure that everything...
Is JSunit really a direct port of Junit to Javascript? So I have heard, but I am wondering why my company is not using it. My company has lots of smart minds, so If we are not using it I wonder if there are any major issues with Jsunit as a javascript test harness.
Input would be much appreciated.
thanks!
...
I'm using the following Javascript code to populate a DIV with an ordered list:
// send script back in split list
var scriptList = script.split("\n");
var finalScript = "<ol>\n";
var count = 0;
while(scriptList.length >= count) {
if((scriptList[count]=="") || (scriptList[count] == undefined)) {
count ++;
continue;
...
how can I append variables to an URL with javascript without navigating to the url ?
thanks
...
I am using multiple scripts to get to a sub window. I want to know how to alert the parent window name. is there anything like alert(window.opener)?
...
Hi,
If you ever visit dzone.com you'll notice that all the posts appear on 1 page only. When we scroll that page down, older posts will be added to the end of the page (and maybe some posts at the beginning of the page but outside the view port will be removed).
My questions are:
- how to know if the user scrolls down/up with javascrip...
I am setting an object like this
n.name = n.name.join(String.fromCharCode(255));
n.description = n.description.join(String.fromCharCode(255));
I want to be able to alert(n); but it tells me [Object]
is there a way to alert complete object?
thanks
...
QUESTION: How do I trigger the :active state for non-anchor elements via JavaScript (jQuery)?
While reviewing Section 5.11.3 of the W3C CSS2 specification in reference to :hover pseudo selector to see about triggering the activation of a , I came across the following which led me to believe it should be possible:
"The :active pseu...
How can you apply a translate to an element but make it move to a point on the page rather than relative to itself?
For example, in the code below the "card" elements will move 50, 100 relative to their starting position. What I want instead is for it to move to the center of the page.
<html>
<head>
<style>
.face {
-webkit-backfac...
I am using JavaScript to display a swf video, and I want to override the Full Screen button if possible, so that it redirects to another url instead of making the video full screen. Is there a parameter that I can pass to the SWFObject that will allow me to do this? I would appreciate any help. Thanks.
...
Hi everyone
My problem is that when the condition is true it will close the window but not execute the php part !
here goes my code..
<script type="text/javascript">
function onClose()
{
var r=confirm("Is the meeting Over!");
if (r==true)
{
<?php $result=mysql_query($sql);?>
window.close();
}
else
{
<?php $res...
I'm abit stuck.
I'm using jQuery.
I have a cookie which has the value such as :
1,something|2,somethingg|1,something
We are treating it as [0] as id and [1] as name.
I need to remove ONE where the id == '1' for example, this will leave the cookie like this:
1,something|2,somethingg
How do I go about this, it will probally be in...
I'm looking for a tool that will scan my HTML and JS files and report whether the scripts are cross browser compatible or not. I'm not really interested in an online tool which I have to enter all my URL's.
...
Can't believe how difficult this seems to be all I want to is to validate a user inout using javascript to make sure that it is an email address. But can't get it to work:
I am using:
//validates a regulaer expression
Utilities2.prototype.validateEmail = function(stringToValidateArg)
{
alert('about to check regexp');
var regE...
Hi,
I am trying to send a date to the server as part of a get transaction, however, looking at the urls (through firebug), it appears that the var sDate is never replaced with its value.
Sorry i'm very new to JS and Jquery, so this is likely a very elementary mistake - i'm guessing it has something to do with the map that i am trying t...
I have a javascipt code something like
<script type="text/javascript" src="http://ads..........." ></script>
this script shows a banner. i want to use onClick event with this script without disturbing the banner click. is that possible?
...
I am developing Javascript app that will wrap every line of text entered inside iframe (designmode) with P (or div) like it happens by default in IE.
For now I am not pasting my code because I just started, the first problem is when i type some text in firefox and even before I click enter or calling any function firebug inserts
<br _...
I know that for safety reasons that this is not easy to achieve, however there would be a way to do so as firebug does...
Please help, would like to invoke some script in the page's context to achieve some effect...
Basically, I would like to achieve two functionality:
1. add jQuery to any web page automatically if not already exist.
2...
I have a form that when you submit it, it sends the data for validation to another php script via ajax. Validation errors are echo'd back in a div in my form. A success message also is returned if validation passes.
The problem is that the form is still displayed after submit and successful validation. I want to hid the div after suc...
Sorry if this is a common question, but I couldn't find any answers that seemed pertinent through searching.
If I attach an event listener like this:
window.addEventListener('scroll', function() { check_pos(box); }, false);
it doesn't seem to work to try to remove it later, like this:
window.removeEventListener('scroll', function() ...