When i call window.open, I can include a list of parameters. One of these paramaters is scrollbars, which can be set to yes or no.
When I put javascript in the child window, the javascript needs to detect if scrollbars were set to yes or no when the window was opened. I want to know if the window has scrollbars enabled by default or not...
Hi I am trying to detect a ctrl + click on a link and then to send a variable to a js function . I have stripped the code down so I can show it as an example below. I find I can detect the ctrl+click event no problem .
<script language="JavaScript">
function mouseDown(e) {
var ctrlPressed=0;
var evt = navigator.appName=="Netsc...
Hello
Suppose I have a class like this:
function myClass(q) {
this.someFunction = function(e) {
console.log("Click event");
};
jQuery(q).click(this.someFunction);
}
Is there a way to indicate to JSDoc that someFunction is not just a function that should be invoked directly but rather is an event handler ? I see the @even...
I have five forms in the page. I have my validation also in place using jquery validation plugin. There is this odd little case where I want to cover - wherein the server returns no results (for any of the forms) and I need to display the same jquery validation. I was able to do that with :
$("#form1").validate().element( ".myid" ); ...
I javascript I have an object that looks similar to:
var myObj =
{
prop1: 1,
prop2: 2,
prop3: ["a","b","c","d","e"],
prop4: 4,
prop5: ["f","g","h","i"]
}
It's an object containing a number of properties. Each property may or may not be an array.
var serializedMyObj = JSON.stringify(myObj);
serializedMyObj is (fou...
I tried to use $.cssRule() plugin and found that it makes it inconvenient to debug those rules in FireBug because each rule appears to be attached to every css file loaded on my page and consequently defined many times.
Source code shows that it does that on purpose inside that for loop: for(var i = 0; i < document.styleSheets.length; i...
Consider the following partial, it gets inserted into a page if someone clicks ajax "add comment" link. The question I have is: Is this the best place to include that javascript?
I thought it was best to put it in the application.js, but because the partial gets added via ajax, the validate method called within $(document).ready block ...
<script>
1..z
</script>
This gives no syntax or runtime error. Looks like number and variable name can be any other (123..qwerty). I'm wondering what does this statement mean?
...
I got a selection list:
<select>
<option value="0" onclick="anders('1')">Anders</option>
<option value="200" onclick="anders('');" selected="selected">€ 200,-</option>
<option value="300" onclick="anders('')">€ 300,-</option>
<option value="400" onclick="anders('')">€ 400,-</option>
<option value="500" onclick="anders(...
I need a solution that will set the heights of two divs whose class = col to the height of the tallest one.
I found a solution here that I have used to implement this: http://www.cssnewbie.com/example/equal-heights/
This is the code that I have placed on my site:
<script language="javascript" type="text/javascript" href="jquery.js"></...
Hi,
I'm having some difficulty getting IE to behave. I have created a web page containing various hidden divs.
These act as sub pages, when a nav item is clicked they fade in/out in a very basic lightbox manner.
It works in Firefox & Safari but in IE (8) it fades in to about 60% then vanishes completely, also knocking out the backgroun...
How can I get the domain name with jquery ??
...
also threw it up on jsbin: http://jsbin.com/ohazo/2
but the code on jsbin is the old code, so overlay_nextimg is overlay_content.click in the javascript on jsbin
Jquery lightbox, grab next link from the one we just clicked, take it's href, fade out the current image, and load in the next img.
Also, how would i go about keeping the over...
Hi
i have one AJAX function which return the list of countries. It works fine.
My problem is that want to load that countries in on select box which is already in HTML and is empty means no option value in it.
I want to know that how can i create a new option element and inject into the select box using moo tools 1.2
I have used be...
I need a javascript solution to launch only one window, with a Java Applet in it, for a given URL. I found a solution posted here on Stack Overflow -
here: http://stackoverflow.com/questions/528671/javascript-window-open-only-if-the-window-does-not-already-exist
But it doesn't seem to work .. I get
Error: launchApplication.winrefs is ...
I have a page on my website that I am making a call to using a jQuery ajax call. It loads in a div. But whenever I the page is loaded, it loses the snytax highlighting that it should be displaying. Ex:
<html>
<head>
<!-- syntax highlighting script -->
<script type="text/javascript" src="syntaxhighlighter.js"></script>
</head>
<body>
<!...
Hi i want to create a button which has caption (ex Category) and the Image of it in the Button too.
so we can say that button has both Caption + Image
I hav to use javascript only
...
how to refresh the parent window while clickin the button (close button) in the child window
child is popup window
...
<a href="/list" onclick="????">
<div>
LOTS OF INFO HERE
LOTS OF INFO HERE
LOTS OF INFO HERE
LOTS OF INFO HERE
</div>
</a>
I have a div, which is inside a hyperlink. The whole div is clickable.
When the user clicks on this big div, I would like the entire div to turn light blue, and then slowly fade into white. This will give t...