Stopping Ctl-click In IE

Jul 23, 2005

I have a situation where I want to react to a ctrl-click on a <span> and
it works in Netscape and Firefox browsers but in IE I have a problem.
In IE I do catch the ctrl-click but IE also renders the span in inverse
video, essentially selecting the item.

Here is a short sample that demonstrates the issue:

<html><head>
<script type="text/javascript">

function Clicked(evt){
evt.cancelBubble=true;
}

</script></head>
<body>
<SPAN onClick="Clicked(event);">click me</SPAN>
</body></html>

I thought the cancelBubble would prevent the event from triggering the
selection from happening but I think that the ctrl-click selection
happens before I get control.

Is there a way to prevent the selection from being rendered on ctrl-
click while still allowing my javascript to react to the event?

View 6 Replies


ADVERTISEMENT

Stopping The Right-click Menu On A Webpage?

Apr 16, 2009

how can i figure out what code is stopping the right-click menu on a web page? the tools i have available are firefox, firebug, etc.

View 3 Replies View Related

JQuery :: Automating A Slideshow And Stopping It With A Click?

Jan 30, 2010

I have a Portfolio section of a website I'm working on. I have the page for the most part working perfectly. I wanted to add one more effect to it. I wanted to page to run in a slideshow automatically for 5 seconds on each picture and continue to loop until someone clicks on a thumbnail below which would stop the slideshow and display the larger picture of what they clicked on. If you take a look at the page this might make more sense. This is one of the pages I wanted to add this effect to. I have alsoadded to here the jquery function that I believe this would need to be added to.

$(document).ready(function(){
$('.mini a').click(function(e){
e.preventDefault();

[code]....

View 1 Replies View Related

JQuery :: Stopping A Click Event With Another Click Event?

Nov 23, 2010

I would like to create a plugin that I can put before a click event on a button. The click event should occur if the user's time on the page hasn't expired. The plugin should check the user's time, and then stop the click event if the time has expired. With the plugin, I'm essentially putting two click events on the same button, as I need to check the expiration when the button is clicked. The plugin is working on my test page, but I'm afraid that this is contingent on an arbitrary ordering of the click events by jQuery. If I have my click event chained after my plugin, can I be assured that the plugin would always stop the click event if the time is expired? Or could jQuery execute the click event before the time gets checked?

(function( $ ){
$.fn.checkExpiration = function(
$this = $(this);
return this.each(function(){3

[Code].....

View 3 Replies View Related

Stopping And Starting A Gif Using JS?

May 7, 2004

I have a gif animation that I want to stop when the user mouses over the gif, and restart when the user mouses out. Is there a way to stop and start gif animation with JS? Or will I have to use Flash instead?

View 3 Replies View Related

Mouseout Stopping A Function

May 12, 2006

I have a function that is activated by a mouseover. The function
triggers an image rotation. I need to stop the rotation on the
mouseout but I don't know how to do this. the mouseover triggers the
rotate() function below. currently the mouseout produces the default
image but then it keeps cycling the other images.

<script language="javascript" type="text/javascript">
if(document.images) {
bubbles = new Image
off = new Image
bubbles.src = "images/bubbles.jpg"
off.src = "default.jpg"
}
else {
bubbles = ""
off = ""
}

adImages = new Array("images/whitemarble.jpg", "images/bubbles.jpg",
"images/oak.jpg")
thisAd = 0

imgCt = adImages.length

function rotate() {
if (document.images) {
thisAd++
if(thisAd == imgCt) {
thisAd = 0
}
document.ImgField.src=adImages[thisAd]
setTimeout("rotate()", 3 * 1000)
}
}
</script>

View 4 Replies View Related

Stopping Animated Gifs

Feb 16, 2007

I'd like to write Javascript that stops animated gifs from animating.

On Firefox, at least, window.stop(); does the trick, although it stops
everything on the page and is kind of unpredictable. If I connect it
to the onload event, sometimes only half the page will be displayed.
Does the onload even fire before rendering?

Does anyone know a reasonable way to accomplish my original goal of
stopping animating gifs from animating?

View 4 Replies View Related

IE Not Stopping Default Event

Apr 5, 2007

I'm currently overriding function keys (F1 to F4) to perform other
actions. In order to do this the default popup windows of Help (F1),
Seach(F3) etc must be turned off. In FF it's easy enought to do using
the preventDefault and stopPropagation event functions.

IE's equivalent is supposed to be cancelBubble and returnValue,
however I can not seem to get them to stop no matter what I try.

Can someone please point out my error? The test code is below....

View 6 Replies View Related

Stopping A Switch Function?

Nov 19, 2011

I have a switch function with four cases: each case executes a sequence of six css changes.How to stop it, if the viewer wants to abort, by choose another menu option?I've done a trawl, and the closest I've come to finding something which could be adapted is from this site,by MattEvans, a while back, buit it had to do with a loop in the function to be stopped:create a public/global variable called "stopped", set it to false when you start the loop.inside the loop put:

if(stopped){
break;
}

then when you press "cancel" set the stopped variable to true .So, maybe something like

var=stopped
function wrapSwitch() {
if(stopped){ break; }

[code]....

View 8 Replies View Related

A Timer Stopping Problem?

Nov 17, 2004

I have a code like below, and want to make to button working I tried but couldn't make it work. When the page loads the timer starts ticking from 5 seconds but the stop timer button is not working??? Code:

View 2 Replies View Related

Stopping Location Load

Sep 17, 2005

If I have a submit button like

<input type="submit" value="submit" onClick="Check()">


how do I keep it from loading the action part of the form when clicked if Check() returns false.... Say check is:

function Check()
{
var flag = true;

if(document.someForm.someInput.value == &#391;')
{
flag = false;
//Therefore I don't want the page to go to another page..
}}

Can I somehow stop the submit buttons operation if a certain condition has not been met.

View 2 Replies View Related

Stopping A Link From Working?

Jan 11, 2010

The site I'm working on can be found at:http://autumnjonesdesign.com/proofs/...of2ivinex.htmlThe link to GOOGLE on the left side of the screen doesn't work.I've found that if I remove the jquery-1.3.2.js from the page the link will work perfectly but then my desired effects go down the tube.I am in no way a javascript coder, any help on figuring out what in that js file is stopping the link from working without affecting the overall site effects and layout?

View 1 Replies View Related

Stopping A Function So It Can Restart

Dec 10, 2010

I have this function:

Code:

function startAnimation() {
lastVertex = 0;
k=0;
i = 0;

[code]....

but if you click the button again, the original function continues working while the second one executes.Is there some way that that button click can say "stop the first one and start the next one"?

View 9 Replies View Related

Stopping User From Pasting Into A Text Box

Dec 21, 2005

I know this might sound weird, but I have a form where I ask the user to
enter their email address in one text box and then again in a confirm email
text box to make sure that they have entered it correctly.

My problem is that many users appear to type their email address in the
first box and then copy and paste it into the 2nd box.

If they typed it incorrectly the first time then all they have done is
confirmed that it is wrong.

Is there anyway that I can stop them pasting into the confirm email text box
so that they have to type it twice?

View 12 Replies View Related

JQuery :: Stopping A Loop Animation?

Mar 19, 2011

I'm having trouble figuring out how to apply stop() to a function which cycles an animation.The animation changes the background by fading in, pausing, and fading out a background div.For smooth effect the animation needs to stop on completion of the fade out.

[Code]...

Maybe stopping also needs a straight js solution,

View 1 Replies View Related

JQuery :: Stopping Actions From Happening?

Aug 16, 2010

I have a text box where a user can press enter, tab (keypress) or click out of it (focusout) and an action happens. The box then gets removed. The problem is, the user presses enter, but that event is fired and then as the text box is removed the focus out is firing again.

How do I prevent removing the text box from firing the focusout action? I can remove the action totally but the text box could be returned to the document later.

View 3 Replies View Related

JQuery :: Stopping An Event Or Timing Out

Jan 20, 2011

I'm using this function from a jquery plugin:

But since I'm using it for multiple instances, is there a way to have this time out after a few seconds? Or stop it so that it doesn't have multiple instances running at the same time?

View 3 Replies View Related

JQuery :: Stopping An Image From Loading?

Aug 19, 2011

I am attempting to stop the loading and replace images with processed ones using the below code, the problem seems to be that even though I am removing the src attribute the original image still loads.

[Code]...

View 6 Replies View Related

AJAX :: PeriodicalUpdater Stopping OnSuccess

Feb 12, 2009

I'm trying to figure out how to stop the updater from running but when I call updater.stop() from the killUpdate() function nothing happens...it's still running. Does anyone have an idea how to stop this thing from running.

Code:

View 1 Replies View Related

Stopping Enter Submitting Forms On IE?

Jan 29, 2010

I have a simple form that works via a suggested results system [URL]

While in firefox the go button is greyed out and enter doesn't submit the form in IE pressing the enter key submits the form.

Is there any way with a bit of javascript to stop IE from doing a form submission on enter but only for this form (since there are many more on the site)

<form action="index.php" method="GET" name="qsform" id="qsform"><input type="hidden" name="p" id="p" value="compdetails" style="border:1px solid #000000;" /><input type="text" name="quicksearch" id="quicksearch" value="Find Company" style="border:1px solid #000000;" onFocus="clearText(this)" onBlur="clearText(this)" /><input type="hidden" name="cid" id="cid" value="" style="border:1px solid #000000;" /> <input type="submit" name="go" id="go" value="Go" disabled="true" /></form>

View 1 Replies View Related

Stopping Submit If Form Invalid?

Dec 24, 2010

I wrote a form and a JavaScript to valid the form. I cannot figure out however how to stop the form from submitting if the form is invalid.

[CODE]
function validateForm()
{
if(""==document.test.custName.value)

[code]....

View 2 Replies View Related

Stopping Page Loading If Error

Nov 18, 2010

Im checking for validation on my page but also trying to submit the data to another form but if theres an error if still loads onto the other page is there any way i can stop this to allow the user to fix the errors?

View 1 Replies View Related

Stopping Http Or Meta Refresh

Jan 14, 2009

I have a web page which takes a while to generate due to serverside processing. I currently show a "please wait" page, which includes a meta refresh tag, as well as a refresh http header, to refresh the current page every X seconds to check if thier data is finished processing. They're also provided a manual link to click to refresh the page, just in case thier browser doesn't like automatic redirection.

I think this works great for just about all users. But I have this idea that it would be nice if I used ajax to check back with the server instead of making the browser reload the webpage. I want this to be an enhancement of functionality, so that users without javascript or ajax capability still fallback on the solid current functionality. This means I need a way to stop the browser from obeying the http refresh header and meta tag. Is such a thing possible with javascript?

View 3 Replies View Related

Apostrophe From Database Stopping Javascript!?!

Nov 8, 2007

we had someone write this script for us a few years ago and we thought it was working fine until this week. It uses javascript to generate a dependant drop down menu eg. Depending on what the user chooses in the first drop down menu, (in this case a manual/book title) the second drop down displays the chapter/category headings that are available within that manual and then the users uploads a file that appears under that heading.

If our user adds a chapter/category heading with an apostrophe in it the script quits and the second drop down does not display the corresponding chapter headings. We are storing the info in a mysql database and use php and javascript to extract the data/build the drop down menus. Code:

View 3 Replies View Related

Stopping A Unique For I=0 Loop At 5 Entries?

Jun 6, 2010

I've borrowed some code from various sources to get a delicious JSON feed onto my website. The problem is it this loop gives me the entire feed that is available, where I would only like to have 5 current entries. I understand how to do this in a for i=0 loop, however there is an extra bit of code that I do not understand within the loop. What do I need to do to end this loop at 5 entries instead of the 15 or so it generates?

Code:

<script>

<!--To be honest I have no idea what this does. I sampled code from 3 different resources to make this work, and the author of this code didn't attempt to explain what is going on here. It doesn't work without it. I'm fairly certain it parses the JSON file so that it is readable. -->

Function.prototype.bg = function(ms){
this.PID = setInterval(this,ms);
return this;

[code]...

View 2 Replies View Related

Stopping A Video That Is Playing In A Hidden Div

Mar 15, 2010

I seem to have coded myself into a corner, and I'm hoping you can help me out.On a product demo page, I have set up popup video modals based on hidden divs. Everything works great.exceptIn IE (all versions as far as I can tell)When the video window is closed (div hidden), the video keeps playing. This does not happen in any other browser. URL...[code]I have implemented it on a test video. It stops the video playing when the window is closed, but when the user clicks the video a second time, it won't play at all.The only alternative I can see, is to make a "new window" pop up for each video (which is not what the designers wanted)[code]

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved