Image Map Blocking ClientX In IE?
Jan 6, 2011
I'm doing some code to show an image where a user clicks on an image map. I've got code that tracks the mouse location and uses that to place the image where you click (it also stores the value in some inputs so the co-ords are sent through post).
Works perfectly fine in FF but in IE it stops tracking the mouse's location once you move over the image (so when you click it places the image at the edge).It should be tracking the client mouse at a document level so I find it bizarre it doesn't track it for this one element.
Code:
<script>
if (window.Event) {
document.captureEvents(Event.MOUSEMOVE);
[code].....
View 1 Replies
ADVERTISEMENT
Jul 23, 2005
I'm trying to create a simple image gallery that has a floating image
that popups up when the user clicks on a thumbnail. So far so good.
Now, when I tried to align the popup image so it's near the cursor,
things get a little screwy: it works fine for Internet Explorer 6
(although always appears near the top for a long page) but completely
fails with Firefox (causing it to ignore the rest of the JavaScript).
Can someone help explain why? The code that's causing the problem
(which is used to calculate the x and y positions) is:
var posx = 0;
var posy = 0;
if (!e) var e = window.event;
if (e.pageX || e.pageY)
{
nc.style.left = e.pageX * 0.6;
nc.style.top = e.pageY * 0.5;
}
else if (e.clientX || e.clientY)
{
nc.style.left = (e.clientX + document.body.scrollLeft) * 0.6;
nc.style.top = (e.clientY + document.body.scrollTop) * 0.5;
}
View 5 Replies
View Related
Apr 27, 2009
For some odd reason, event.clientX and event.clientY don't work in safari in mac os x leopard. They used to, but it appears it cannot find the object "event".
[URL]
In the file windowsxp.js (don't get confused with windowsxp.jos), the movecursor() function moves the cursor div. It works, but the event.clientX issue seems to be messing the entire function up. Why is this happening? Anything in my page that is messing it up?
(notice: the url I've given will open a "launcher" webapp, and you must click on "windowsxp.jos" to load external files and see the problem) TypeError: Result of expression 'event' [undefined] is not an object.
View 4 Replies
View Related
Dec 28, 2010
someone wrote a script for me to simulate an image map on a background header in wordpress. it works great in chrome and ie, but not firefox.
<code>
<script type="text/javascript">
function geturl() {
myMouseX=event.clientX
[Code]....
View 1 Replies
View Related
Sep 3, 2002
I was wondering if javascript is powerful enough to block certain IP address? and these IP addresses could be stored in a seperate file..
what i mean by blocking, is it wont let certain IP addresess in....
View 1 Replies
View Related
Oct 20, 2005
I'm trying to use the window.event.clientX value for positioning a
javascript routine, but I'm having trouble. When the javascript
routine comes up, it comes up in a certain position based on
window.event.clientX. However, the user could click on something in
the script display (say, like a menu, or a calendar, or something),
that my "refresh" (reload that same script but with different values).
Thus, the first time, it works perfectly, but thereafter, it sets the
new x,y values to the most recent window.event.clientX and
window.event.clientY positions. I want it ONLY USE the positions which
were first used.
Does this make sense? Ok, here is the code snippets:
// This is the javascript
function RollOver( Text )
{
HelpText = Text ;
HelpX = window.event.clientX;
HelpY = window.event.clientY;
ToShow = setTimeout( "DoRollOver()", 1, "JAVASCRIPT" );}
// This is the HTML
<input type="Text" name="timestamp1" value="">
<img src="myImage.gif" onmousedown="RollOver( getText() );">
The first time the image is clicked, the source comes up in the correct
place. But this new script that came up is now the current "event" so
when someone clicks on something to reload the script with a different
value, it sets the position relative to the lastest script placement,
not the original image.
View 5 Replies
View Related
Jul 4, 2005
I want to know is it possible to block user from selecting any text displayed on a webpage? What I want is to block user from selecting anything by mouse drag.
View 5 Replies
View Related
Jul 27, 2005
Does anyone know how I could make an iframe so that the links in the
frame page are disabled ... or if this is possible?
View 5 Replies
View Related
Apr 29, 2007
I wrote a script that tracks the number of characters a user types into a text box. It has a limit you can set, and when that limit is reached I would like to block the user from entering any more text.
How can I block the user from typing characters in the textarea?
View 2 Replies
View Related
Feb 18, 2011
In an attempt to block access to my website I have entered the following:
[CODE]
<script language="javascript">
var ip = '<!--#echo var="REMOTE_ADDR"-->'
[code]....
View 12 Replies
View Related
Oct 17, 2007
I am using google translator in my own site to translate it to other languages ,but , when mouse is over the text , google popup page indicated , that containes original text in english! Can I disable this popup page ?
View 1 Replies
View Related
Jan 28, 2005
I am working on a website that utilizes a DHTML (HTML + Javascript) Navigation bar, but IE blocks the "ActiveX" content, despite the fact I am just using javascript. This site will be used by every computer on our network.
Is there any way I can modify the script so that it is not blocked even when this "security feature" enabled?
View 4 Replies
View Related
Aug 4, 2011
How do I do a blocking call in javascript?
In the code below the alert at the last line of this code snippet hits before the code in if block completes which returns some value, by calling chached.get method in different js file.code...
View 1 Replies
View Related
Oct 17, 2005
Should I expect some of my users to not be able to view a report that I
am launching in a new web browser if they have any popup blocking tool
bars or other software installed on their computer?
View 13 Replies
View Related
Jan 14, 2010
I am trying to achieve the same thing as this website.[URL]hen you click on the next page, or last page, the <DIV> get lock with a updating message. How is that done?
View 4 Replies
View Related
Feb 3, 2006
I am very new to this and have just written some code to randomly generate an image on my web page. Each time I test it, a bar at the top of the page comes up saying:
"To help protect your security, Internet Explorer has restricted this file from showing active content that could access your computer. Click here for options..."
How do I stop this coming up on other peoples computers, because if they don't click OK, they can't see my images? Is it my script that is causing an issue, or is there a simple fix for this?
Many thanks in advance for your help, and please remeber I am very new to all this, so try to explain in simple terms.
View 3 Replies
View Related
Oct 26, 2006
I'm trying to halt a function's execution while waiting for user
interaction.
For example, I have a function called getUserValue() that pops up a hidden
div containing several buttons. Each button sets a value. I want use a
function to pop the box, wait for the users' button press, and then continue
the function based on what the user presses.
Behold, simi-code:
function getUserValue() {
... lots of code ...
var returnValue = doPopBox();
... lots more code based on users selection in doPopBox();
}
I've written quite a bit of supporting code, but the getUserValue()
continues to execute after the box is popped up, even before the user
presses a button.
I used setTimeout() to check to see if the button has been pressed -- but
when the timer starts, the interface is locked and a button cannot be
pressed. I also tried using a recursive function, (check value=null, if it
is, recheck), but Firefox and IE apparently don't like what may seem like an
unending recursive loop.
View 2 Replies
View Related
Sep 7, 2010
I am struggling with a problem involving using a javascript dropdown menu in conjunction with the jquery accordian. My dropdown menu is being blocked by the accordian option and I can not view most of the items within the dropdown menu in order to navigate.I did notice is that if I get rid of jquery-ui-1.8.4.custom.css I can see the dropdown menu, but then I do not get the settings I desire for the accordian. Below is the code for index.php and master.css
index.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
[code].....
View 1 Replies
View Related
Oct 26, 2011
There are pages containing input field where in user enters value. Now I have a requirement to block UI untill the document is ready and every input field is rendered. I have found that I can use blockUI plugin for this : [URL] I have also found few good examples in : [URL]
how do I call $.blockUI() on pre-ready stage and call $.unblockUI(); on .ready(). I would want my UI to be locked untill the doc is ready. I can put call to $.unblockUI(); in .ready() but where do I put $.blockUI().
View 1 Replies
View Related
Aug 12, 2011
IE is blocking my JQuery Cycle plugin on my [URL]
The slider works with no block in Firefox and Chrome.
View 1 Replies
View Related
Aug 6, 2010
I am working on a site with a left menu that slides out, and I've converted it to the top to drop down. So far, it is working ok, but the submenu items need to be below the parent, preferably left aligned. I have played with it a bit and so far can't seem to achieve what I want. See below where I'm clicking Resources and the menu is way too high and over to the right.
//** Dynamic Drive Equal Columns Height script v1.01 (Nov 2nd, 06)
//** http://www.dynamicdrive.com/style/blog/entry/css-equal-columns-height-script/
var ddequalcolumns=new Object()
[code]....
View 2 Replies
View Related
Jan 19, 2010
I'm trying to force my users to close a popup window before they can return to the Parent window. I more or less want to "lock" the parent window and force the user to fill in the info on the popup and hit submit, which in turn will close the popup and then allow the user to continue working on the parent window.
View 1 Replies
View Related
Feb 3, 2010
I have a script that's dimming the page by appending a black transparent canvas element to the body, positioning it over the page with a high z-index, and then using clearRect to cut out the sections of canvas element so that certain sections of the actual site show through..I'm having a hard time figuring out the best way to pass a click through the canvas and onto whatever would accept it if the canvas wasn't in the way so a user can edit the text.
My first choice was hiding the canvas on mousedown, and then listening for mouseup for everything underneath. but it looks terrible to have that 200ms flicker. can a trigger() be used to emulate a click at a certain (pageX,pageY)? the last option i can think of would be adding 30 divs and duplicate the punched-out canvas..but that seems like a lot of math, does anyone know of a plugin that does this? a reverse blockUI
View 5 Replies
View Related
Feb 12, 2009
Currently I am building a mini CMS thing for a client. The areas they are editing deal with links so as the code is being pulled in I replace any:
I am doing this so a person is not in the middle of working on an edit and accidentally clicks a link and all their edits are wiped clean cause they left the page.
Now everything is working just fine and my javascript:void(0) is blocking any links from allowing the use to leave the CMS, well all links except ones that have a url ending in .html
So again all:
Any reason why the javascript void wont work on urls that have .html but do work with urls that have .php?
View 1 Replies
View Related
Feb 4, 2011
I have a page, with two tables, each placed in a div (lets call them div1 and div2), to give the tables a fixed height. I load data into the tables with $('#div1').load() function, but before I load the data, I call $('#div1').block({message: 'wait'}), and in the load callback, I call $('#div1').unblock(). I do the same for div2. The refresh of the two tables sometimes runs in parallel.
The problem is this:
The first two or perhaps three refreshes, I get the expected behaviour, but after that, the overlay is not shown. If I look at the DOM during the opreation (both in Chrome and Firefox DOM inspectors), I can see the blockUI DOM elements being created and removed, but they never show.
I have tried several things, among others this:
1) Call unblock before block, to make sure, that the element is not blocked.
2) Only to have one div blocked - same result
I have not yet made a page with a simplified example, but that would be my next step.
View 1 Replies
View Related
Oct 29, 2004
Code:
<script ... javascript >
document.onmousemove=(hit_test);
function hit_test(evt)
{
if (!evt) evt = window.event;
if (evt) document.getElementById("a").innerHTML = evt.clientX;
}
</script >
which works nicely;
I understand that the 'event' object is a globally accessible object in IE but not in Mozilla; instead in Mozilla the 'event' object is sent, by default, as the first parameter in a call to a function; is this true? ...
View 2 Replies
View Related