How could I identify which Ctrl / Shift / Alt keys are pressed in the following code ?
$("#my_id").click(function() {
if (<left control key is pressed>) { alert("Left Ctrl"); }
if (<right shift and left alt keys are pressed>) { alert("Right Shift + Left Alt"); }
});
I work with Firefox 3.6.3.
Thanks !
...
I am trying to add a ColorPalette into a TooltipDialog, which in turn is contained inside DropDownButton (dojo 1.3.1)
Code:
var paramsContent = new dijit.layout.ContentPane();
var colorPalette = new dijit.ColorPalette();
var tooltipThematic = new dijit.TooltipDialog({content: paramsContent});
var colorField = new dijit.form.DropDownBu...
Hi All,
I have to solve a defect.
The defect is there is a scroll bar attached to the vertical cascading menu. When I try to scroll through the items using the scrollbar , the menu disappears. That is, When i place the mouse over the scrollbar the menu disappears. But when i scroll the items through the mouse, the scrollbar is also mov...
I have a custom web part placed on one of the application page in SharePoint. This page it seems already have a function which gets executed on windows beforeunload javascript event.
My problem is that i too need to execute some client side code (to prompt user for any unsaved changes in my web part) on windows beforeunload event.
Ho...
I have a script that links to the server I am hosting (IP can change) usually I would just use for links:
var url ='http://' + window.location.hostname + 'end of url';
But in this case it isnt appearing to be so easy.
I have tried: (1)
$('#scriptid').attr('src', url);
as well as: (2)
var script = document.createElement( 'script'...
Now a community wiki!
I want to make it clear first: This isn't a question in relation to server-side Javascript or running Javascript server side. This is a question regarding rendering of Javascript code (which will be executed on the client-side) from server-side code.
Having said that, take a look at below ASP.net code for example:...
My JSON string looks like this,
[{"id" : "38","heading" : "Can you
also figure out how to get me back the
10 hours I
sp.....","description" : "Im having a
very similar problem with the Login
control - again it always generates a
default style containing
border-collapse - only in this case
.....","img_url" :
"~/Event...
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/mootools/1.2.2/mootools-yui-compressed.js"></script>
<script type="text/javascript" src="sexyalertbox.v1.2.moo.js"></script>
<link rel="stylesheet" type="text/css" media="all" href="sexyalertbox.css"/>
<body>
<p><a href="#" onclick="Sexy.aler...
xmlhttp.onreadystatechange=function() {
So this says onreadystatechange, invoke function(). Can I put parameters in function()? Second question, what does it mean when someone writes, xmlhttp.onreadystatechange=statechanged? Does that mean it will always be true or something?
...
I am making a greasemonkey script and i would like a link to go forward and modify the current html and allow the user to click back to go to the original page.
How might i do this? using jquery + greasemonkey + javascript. Targeting firefox mostly.
-edit- http://jsfiddle.net/ seems to do it. If you write random html in the html sectio...
I'm building a map viewer much like Google maps and i've run into an interesting performance problem when a page is zoomed (i.e ctrl + OR ctrl -). It seems to affect all major browsers but Firefox has the worst problems as far as I can tell.
The problem is that when the page is zoomed panning by dragging the mouse seems really sluggish....
Hello,
I would like to know memory leak in the below mentioned code. Does JavaScript do automatic garbage collection.
var aGlobalObject = SomeGlobalObject;
function myFunction() {
var localVar = aGlobalObject;
}
Do I have to clear the memory as given below.
var aGlobalObject = SomeGlobalObject;
function myFunction() {
var lo...
I need a html document, that contains multiple div's with 100% height (screen filling) one below the other.
I have tried to apply every element a height of 100%, but that won't work seamless nor clean.
Maybe there is a option with JavaScript? I don't have an idea.
Please suggest me your solutions.
chris
...
I've got a Servlet that generates a XML string (relatively long) which I then pass to a Javascript variable in the forwarded JSP file:
$(document).ready(function() {
...
var itXML = <% out.print((String) request.getAttribute("xml")); %>;
...
}
This seems to work just fine in Firefox, but when I run the same project on IE8 ...
Hi,
How to remove the text on a marker using Fluster2 Library ?
...
Hi,
is there a way to see which elements of a website are still loading so that window.onload can't fire yet?
...
My JSON looks like this:
{
"[email protected]":"Person1",
"[email protected]":"Person65",
"[email protected]":"Person24"
}
It's returned in various number of elements, and various keys. How do I traverse the data if my code is like this:
$.post("includes/ajax.php", {
group_id : $('#group').val()
}, function(data) {
//how d...
since my extension's pageload is triggered even when I view css or js files, i want to add another check that triggers my extension only when the current page's content-type is text/html .
//eg: at my page load handler
function onPageload(){
// only want to proceed if content-type reflects a text/html or */html page
if ( contentTyp...
Hi,
I have a complex background image and images, that should be on exact positions of the background image.
How can I organize web page?
I can't use absolute positions, because I need to organize background to view it nice on any monitor, any resolution and any browser. It can be aligned to center or smth else.
Web page can be writ...
Almighty Gurus,
Please tell me, I want to know can comparison sm. set of variables in row, like this:
x < y >= z
or i need to do it in two steps?
(x < y) && (y >= z)
...