Shift Key Detection On Input
Mar 23, 2006
I'd like to detect the shift key when a button is "clicked" in
Firefox/Mozilla. If the button is clicked with the mouse, no problem.
However, if the onclick event is keyboard originated, then my method is
not working. Same thing for SELECT elements.
The simple web page below shows the issue. Click with the mouse while
holding down the shift key, and the Shift key's status registers.
However, use Shift+Alt+o, or either (while the button has focus)
Shift+Space or Shift+Enter to kick off the onClick event and the shift
key is not detected. Works fine with IE 6 on my Win XP Pro. Code:
View 7 Replies
ADVERTISEMENT
May 5, 2003
I'm going to make an attempt at coding a nice tree menu that is decent with browser support.
I want the tree to be displayed on all browsers (well, within a decent range). Of course, on older browsers, the menu won't be as functional.
Now, I'm going to be combining the javascript with a server-side language (asp.NET) and I'll be able to do some basic browser detection on the server.
But, I read about javascript object detection and am wondering how well that works exactly.
Like, what if a browser that doesn't support objects period tries to run some object detection code? Also, which browsers support user defined objects?
See, I'm thinking of breaking down the script in 3 categories. Browsers that won't get any javascript... these would be the browsers that don't support object detection, browsers with basic javascript... with these I would be able to code my own object and I would test for different features. And then there would be the browsers that can run it all.
So, basically, my question is what browsers support what features and how should I break down my code between them? A long time ago (back in the Netscape 4 / IE4 days) I did some javascripting, but since then I haven't really done any. I remember that NS4 didn't support div tags but supported layers... anyway, it got really messy.
View 4 Replies
View Related
Jul 20, 2005
I need to convert an UTF-8 string to Shift-JIS in a web page (preferably using JavaScript).
View 4 Replies
View Related
Jul 23, 2005
I would like to use shift button to select multiple rows in table but there
seems to be problem with it. I have table rows inside the <a> tag so I can
drag them and drop like in windows explorer. I would like to mimic also
explorer style of selecting multiple rows using the shift button. But when i
click on one of my rows using shift button then rows are selected but new
windows is also opened - and I would like to prevent this kind of action. Is
it possible?
View 1 Replies
View Related
Jul 7, 2005
I started playing around with this keyevent thing and said, hey this works pretty good, I want to add keyboard shortcuts for everything.
I thought I had come up with a solid system, based on some other threads I read in this forum. It works great in Firefox, but IE seems to handle the Control key differently, also IE seems to ignore the arrows. Code:
View 3 Replies
View Related
Jul 19, 2009
What I want to do is to create a function which shifts a table column one position to left. Therefore I'am trying to select all relevant td and th elements. My problem is to rearange the elements. Within the both each calls, see the code below, $(this).get(i) would result the td respectively the th element where the before function is undefined. But how to insert the elements correctly or is this the wrong way?
$.fn.shiftLeft = function(col) {
// Make sure col has value
if(!col){ col = 1; }
var trsToMove = $('tr td:nth-child('+col+')',this);
[Code].....
View 1 Replies
View Related
Nov 5, 2009
to see the unexpected page shift in action go to http://lawlocaust.net/gamerverse/ while hovering over the banner u can use the arrow keys to navigate the UI and the page will shift in firefox
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
[code]....
View 6 Replies
View Related
Nov 27, 2010
I developed this under Safari on my mac. I have only been scripting for about 1.5 days so I am not the best with debugging. What would cause this?
<html>
<head>
<script ="Javascript>
// Setting vars
var winW = screen.width
var winH = screen.height;
var winLW = (winW / 2) - 240
[Code]....
View 3 Replies
View Related
Oct 27, 2006
I'm working on controlling a windows media player I'm trying to figure out how to control it with keys like CTRL+SHIFT+P to play it. The problem is that I don't know how to capture all three at the same time.
I'm ONLY supporting IE because that's what the client only want's supported. I have been reading through the forums but nothing about capturing both CTRL+another key or SHIFT+another key.
View 2 Replies
View Related
Oct 14, 2010
This is a proof of concept question ... that I've been unable to prove. Ultimate goal to is allow one button to have different actions with the Shift, Control or Alt key pressed for a link "<a...>" or a button ("<input type='button'" or "<button>.") click. The following appears to work in FF and MSIE on PC (with some side-effects), but not at all on a iMac using FF or Safari.
The display in the textarea shows that I can detect when the Shift, Control or Alt keys are pressed and an event is created with a mouse click. With a left mouseClick, the display shows
[Code]...
View 2 Replies
View Related
Oct 21, 2011
I am at my wits end! I've added DD belated PNG to nearly every site I've ever made with little or no problems, suddenly it's being super-extra mean to me. It will only load PNGs correctly if you clear your cache when refreshing the page (shift + refresh). Check it out at the link below (obfuscated so google doesn't index the site):
[Code]...
NOTE: Just so everyone's aware, this is an IE6 only script that is supposed to fix PNG transparencies, so you'll need to look at it in IE6 to see the problems.
View 1 Replies
View Related
Feb 15, 2012
would like to note the following case:Ive run the following test numerous timesie:
<html>
<body>
<script type="text/javascript">
[code]....
View 2 Replies
View Related
Mar 24, 2009
i am trying to build a function that takes into account a click event and SHIFT key press event on a particular element.
so for example, i want to do something only when i click a box WHILE pressing the SHIFT key.
how do i program this using jquery?
View 4 Replies
View Related
Aug 13, 2009
I am trying to trap the shift+click event of a DIV. Works in IE and Chrome but not in Firefox. Purpose of the code: The DIV provides a hidden link (no decoration) for an editor who wants to edit content. The DIV ignores a simple click (meaning a click without a combination of the shift key) to avoid accidental access to the casual surfer. Here is the logic of the code: DIV is clicked. call function to check for the shift key being depressed if the shift key were depressed during the "click", initiate access. If the shift key were not depressed, ignore the "click" Here is the HTML code:
[Code]...
View 2 Replies
View Related
Jul 23, 2005
I have a page with a script that works only in IE and as I heard from
feedbacks it doesn't run under IE on Mac.
I have browser type redirect script for that page that seems to be
working fine except it doesn't detect the OS ( IE on Mac just gives
blank page). Can someone add to the code that I would give me one page
for IE on Windows and another one for all others? Code:
View 1 Replies
View Related
Jul 20, 2005
I have on different form elements an onChange routine.
Now I was wondering how I can see which element fired the routine. Can I
write something like "if (self.name=='elementA')"?
View 1 Replies
View Related
Jan 3, 2007
Is there a way in which we can disable the history scroll functionality in IE? Basically disable the SHIFT key + Mouse Scroll combination.
View 1 Replies
View Related
Nov 21, 2009
I'm using the code below for the "launch page" to open a JS window and know when it has been closed, and than execute some other code that should be run after the pop-up closes.
javascript Code:
This works, and does exactly what I want. Do any of you JS experts see any reason for concern? Anything that makes it suboptimal?
View 3 Replies
View Related
Jan 30, 2007
So I need script, which will detect users browser, and if browser will be IE, then show some link in content, if browser is FireFox or Opera, then hide that link. Link looks like:
<tr>
<td align='center' valign='top'><a href='/' target='_blank'>link</a></td>
</tr>
View 4 Replies
View Related
Sep 28, 2005
I would like to have my page display the IP address of the user when the page loads. I have heard of the IP detection scripts when using the
"var ip = '<!--#echo var="REMOTE_ADDR"-->" attribute to make a window or alert popup and display the IP of the user, and I have also come some scripts that display the IP in the status bar. However, I want the current IP adress to be shown on the page itself, part of the <Body>.
View 2 Replies
View Related
Mar 23, 2006
function doDOMStuff() {
var el = document.getElementById('myElId');
// object detection
if(!document.getElementById) return false;
//or
if(!document.getElementById) return;
// doStuff
}
View 5 Replies
View Related
Jan 18, 2004
I currently have a site which uses cookies, the problem is that I want it to detect if the browser being used has cookies enabled. I know you can accomplish this by setting a cookie in JavaScript and testing for it (i don't know how to do it, though), *BUT* I need the script to be compliant with all (or at least most) browsers. By this I mean, Mozilla, Firebird, Opera, IE, Netscape, and anything else you can think of.
View 2 Replies
View Related
Oct 3, 2004
Is there a simple object detection to sniff for IE 6 only ( not IE 5.5 or lower ) ?
View 2 Replies
View Related
Apr 23, 2001
How do you find out if a certain Plugin has been installed in IE 5.5 using Javascript?
I know that in netscape you can use navigator.plugins so I was hoping there was something as easy as this.
View 2 Replies
View Related
Jul 23, 2005
I have some html code i would like to be printed to the page only if the
browser has javascript enabled. I have tried to use document.writeln()
but the string i want to print bot contains some ' and " in it. I don't
know how to set the delimiters of the string that is passed as argument
so that i don't get an error in the page.
View 1 Replies
View Related
Jul 23, 2005
I've have got this script, the only thing I want to be changed is the first part. It has to detect IE version 6 instead of just "Microsoft Internet Explorer". Can somebody help me out? I tried "Microsoft Internet Explorer 6" but that doesn't work.
<SCRIPT LANGUAGE="Javascript">
<!--
bName = navigator.appName;
if (bName =="Microsoft Internet Explorer") {
document.write('<link media="screen" rel="STYLESHEET" type="text/css"
href="stylesheet1.css">')
} else {
document.write('<link media="screen" rel="STYLESHEET" type="text/css"
href="stylesheet2.css">')
}
//-->
</SCRIPT>
View 8 Replies
View Related