Creating and handling JavaScript events inline in HTML or through a script.

learn more… | top users | synonyms (1)

0
votes
1answer
13 views

Firefox attachEvent and addEventListener issues with both

So i've got 2 sets of js one with attach event and one with addEventListener attach event works perfectly in IE 8 as expected and addEventListener for IE 9. if i use addEventListener on firefox in ...
0
votes
0answers
36 views

Magnetic card reader opens downloads pane

I am working on a simple login function for a web application that allows an employee to swipe their security badge in. I can capture the input from the card and successfully login however I am ...
0
votes
2answers
29 views

How to make a link redirect to a bootstrap modal with jquery

I have a link that redirects to a product page by it's id, but I want to show a modal before it redirects. I would like the user to confirm that he has read it, and only redirect if he confirms, ...
0
votes
0answers
18 views

How to I get the original icon's context so that it can be compared to the new icon's context and then animate accordingly?

I am trying to animate (absolutely positioned) icons that are clicked on in a ul. The icon markup is as such: <div id="tool-name"> <ul> <li>...</li> ...
0
votes
1answer
50 views

how to stop a image from hovering by clicking on a <a> tag

I want to stop image from hovering when clicking on the <a> tag,at first it had the undefined $ or jquery error in firebug but after adding <script ...
0
votes
1answer
39 views

Why is the 'click' event not fired when the shift key is pressed?

I'm trying to understand how the events are implemented in leaflet, and I have difficulties understanding how it works. Here is a map made with leaflet (comes form a standard tutorial on the leaflet ...
0
votes
0answers
4 views

javascript multiuploader request fires multiple times

I am using the multiuploader script found at:http://www.9lessons.info/2012/09/multiple-file-drag-and-drop-upload.html On the first run, it works ok, but after uploading the first set of files, if I ...
0
votes
1answer
21 views

JQ Drop Down Menu expand issue

I have Drop Down Menu which looks like that: http://jsbin.com/akidiw/2/edit Click on "First" then next on "Second" and next on "Third" and you'll see the problem. I know it's all because of that part ...
0
votes
0answers
23 views

Pausing Bootstrap carousel When a Video playing

I have multiple slide with videos and images. Carousel is set to autoplay when loaded. But when someone plays a video and move mouse out of the side it keeps sliding ( as expected ). How do I keep ...
0
votes
1answer
14 views

listen for multiple events in socket.io

I would like to display to the user the state the socket.io connection is in. To do that I have a bunch of these to tell the user. #I can't use `*` because I have some customized events socket.on ...
0
votes
0answers
17 views

Application is not working in IE8 OS-window7

I have created an application which is working fine in IE7 OS-XP but the same application is not working in IE* OS-windows7. I already changed the tools setting but still it is not working. I have ...
0
votes
0answers
10 views

Silverlight event register in Javascript

I am try to implement SMF player in within .aspx page. Currently i can call java-script functions from the silver-light application and also i can call silver-light methods from the java-script. But i ...
1
vote
1answer
23 views

How can I debug MSPointer events in IE10 when console.dir only outputs “[object Object]”?

I am having a bitch of a time debugging the new event object model in IE10. Since Microsoft changed the event model, code bound for "touchstart" throws errors when it encounters ...
4
votes
1answer
30 views

Multiple on() or switch() within one on()

I have a menu on my page and am currently writing the script that sets all the click events for the menu buttons. Each button will call its own method so it must be set explicitly. My question, quite ...
0
votes
1answer
30 views

Cross browser & IE 8 support event Listener

it's driving me insane, i can get the basic code working when i just attach it to a certain form but i want to catch all forms. here is my basic code i've started from var form = ...
0
votes
1answer
23 views

NotFoundError: DOM Exception 8 when substituting innerHTML

I'm new to js-development. I have the following code: <html> <body> <div><span id="inline">Click here to start editing</span></div> <script> var inline ...
1
vote
0answers
34 views

Execute a URL Via JS or jquery that's not XSS

i need to be able to execute a php link after the form has been submitted i've got everything working in JS apart from executing an URL without some godly alert box that isn't very user friendly to ...
0
votes
1answer
23 views

Catch any event which is doing http request with javascript

I have my website running some 3rd party app which is doing some http request to inject the data. I want to know if it is possible to catch any http request which is initialized from my page, and how ...
0
votes
1answer
53 views

Removing listeners with JQuery? Should or should not?

Okay, I am building a webpage and I have started using JQuery and I use it a lot with listeners (keyup, focusin, focusout...) I have a question though about the way they are stored. One of the pages ...
0
votes
3answers
29 views

How to get click event object data from dynamically created button using JQuery or javascript

I am collecting page button click events. Normally i am collecting the objects from statically created DOM elements. By using, $('input[type=button]').each(function () { ...
0
votes
0answers
13 views

How to pre-fill UserVoice dialog with a specific value?

I'm using UserVoice for our site and when someone clicks on some button in my page, I want to pop up a UserVoice dialog, which is already embedded in my site. I know I can do it with the ...
2
votes
2answers
34 views

html5 capturing mouse clicks in a canvas

Here is simplified code that takes into account the answer suggested by nycnik. The code works better, but the scale and offset are still off. Click drag and release, and the line drawn appears to ...
-1
votes
3answers
36 views

pass the value of a text to a jquery function

How can I pass the value of a text to a jquery function, when I click on that text? $.each(docs2, function(i, item) { $('#body).append($('<div class="mytext">' + item.text+'</div>')); ...
0
votes
1answer
49 views

Javascript EventListener not executing url on submit

so simply i've got an issue, i need to submit the same infomation to two url's so the form submit action is perfectly fine for one then i had the thought i could do a javascript listener to submit the ...
0
votes
0answers
17 views

javascript event on listcell

I would like to add a click event on a listcell. I have something like : var i = document.createElementNS(XUL_NS, "listitem"); var c1 = document.createElementNS(XUL_NS, 'listcell'); var ...
2
votes
2answers
38 views

Generic Way of Capturing Page Title, Control labels

One of our customers has a new requirement to dynamically capture the page/screen title and the labels of all the controls(textboxes, checkboxes, radio buttons, normal buttons,link,images,menu/menu ...
1
vote
0answers
7 views

need help from experts about facebook comment box notification

Hello every one i need your help in some thing Iam trying to integrate facebook comment box into one of my website and this is so easy that work for me with no problems but the problem is i need to ...
0
votes
3answers
41 views

How to call function on hyperlink text click

How can I call this *on_search* function by clicking on the text (item.name)? $.each(docs, function(i, item) { $('#body').append($('<div><a href="">' + item.name ...
0
votes
2answers
20 views

Repeating event and how to avoid

My jQuery code is: $(document).ready(function () { $('.selector').mouseenter(function () { $(this).find('> ul').slideToggle('fast'); }); $('.selector').mouseleave(function () { ...
0
votes
1answer
13 views

jquery mousewheel stop propagation

How to stop propagation with the mousewheel event listener? When using the mousewheel over the content element the whole document is scrolling too This doesn't work content.on('mousewheel', ...
1
vote
1answer
18 views

onmouseover and onmouseout event being triggered on page load not on events

I have the following code var statusList = document.createElement('ul'); //I am populating this list elsewhere statusList.style.display = 'none'; var statusSpan = document.createElement('span'); ...
0
votes
5answers
43 views

How do I pass additional parameters to the handlers in $.fn.hover()?

The documentation of jQuery's hover shows only one method of using the function: $('.myClass').hover(function () { console.log('on mouse over'); }, function () { console.log('on mouse out'); ...
0
votes
0answers
11 views

How to catch only right click event in javascript?

I would need to handle the right click event in javascript, I saw we could do it thanks to oncontextmenu but it takes into account also the left click. I need to handle distinctly left click and ...
0
votes
0answers
28 views

Simulating mouse click / trigger event in bookmarklet or greasemonkey [duplicate]

A specific web page (not owned by me) displays data rows. Problem is it only shows 50 rows and has a "show more" button on the bottom. Clicking the show more initiates a AJAX call to display another ...
1
vote
2answers
77 views

How to know when the cursor has halted somewhere?

I have a graph, and I want to display the value onder the cursor by using the default tooltip (set by the Title attribute). To show the right value in the tooltip, I could calculate the value each ...
0
votes
0answers
21 views

Is it possible to bind events to the recline.js slickgrid view using the “events” feature?

Using the SlickGrid view from recline.js, I've been trying to bind an click event to a row without success. It's easy enough to $('.slick-row').click(function() {...etc}), but I was hoping to use the ...
1
vote
1answer
19 views

Resize Frame when Ajax is finished

I am trying to resize an iframe after the content is loaded. The page (that is loaded into the iframe) has some controls that cause it to load addition information to the bottom of the page, and it ...
0
votes
0answers
28 views

Remove all the plus sign of the string outside the brackets [duplicate]

I am working on some kind of project where i am using code block as follows: var string = .row-4 .col-2.grid-unit+.grid-unit+.grid-unit,.row-4 .col-3 .grid-unit .row-4 .grid-unit:nth-of-type(2n+3) ...
0
votes
1answer
24 views

Implement view photo functionality like in Twitter

I'm looking to add a twitter feed into my site that shows images posted, but rather than click on an image and it takes you to twitter to see the photo I would like to be able to click on a link ...
0
votes
3answers
36 views

How do I make a table cell clickable in this JavaScript generated table?

How do I make a table cell click able in this JavaScript generated table? I think where I've placed the comment in the script tag is where I need to change the code! This code works so far! ...
0
votes
2answers
31 views

Getting event default handler's result from jQuery handler

Let's say there is a DIV element with an onclick event: <div onclick="return 'Hello world'"></div> Now I want to get this 'Hello world' string from delegated jQuery event: ...
0
votes
2answers
25 views

How to completely stop jQuery cycle function from running (not pause / resume)

I'm having an issue using jQuery cycle in a responsive mobile design. Using CSS I can get it to display properly on page load, but once the cycle has loaded it no longer becomes responsive as ...
0
votes
1answer
46 views

Detect DOM element position change using pure javascript

I want to notify when the position of DOM element changes. I have an image with absolute position in a document at the top of an element but when for example the size of something on top of my element ...
0
votes
1answer
35 views

Jquery place the values in their corresponding element from json

When the user clicks on edit icon in UI, Ill fetch the corresponding json data from Service. I am showing josn values in their coresponding element by hard coding that element id, if it is text ...
0
votes
0answers
9 views

Google maps JS SDK on mobile: how to cancel the zoom in

I am trying to cancel the zoom-in feature in Google maps on a mobile browser. On a desktop I can simply set the map's 'scrollwheel' to false: map.setOptions({scrollwheel: false}); But this doesn't ...
2
votes
2answers
53 views

Clone element with all its events

I'm cloning a textarea in a page but the cloned element doesn't have any event of the primary element, is there any way to clone all events in cloned element? var dupNode = node.cloneNode(deep);
0
votes
1answer
32 views

Using click() on links in Android Stock Browser not working

I want to trigger a click on a link with JavaScript but have problems getting it to work on the Android Stock Browser. The following code works fine in Chrome (Desktop, Mac) and Safari (iOS) but not ...
0
votes
1answer
26 views

jQuery binding events strange behavior

I have code written in vanilla JavaScript, which at some point during the runtime trigger custom event, which is handled by jQuery with the following piece of code: // Fired on when snapshot is ...
1
vote
1answer
37 views

Is `event.target` guaranteed to be a descendant of / equal to `this` in event callbacks like “click” in JavaScript?

If I recurse through .parentNode of event.target, am I guaranteed to reach this? Is this mentioned anywhere in the spec? Here's some code to demonstrate this, which will log if event.target is a ...
0
votes
2answers
44 views

Simple javascript loop for checking total size of multiple file

How can I implement this code into a loop for 20 files? They will have id="myFile1", "myFile2" etc. <script type="text/javascript"> var myFile = document.getElementById('myFile'); ...

1 2 3 4 5 173
15 30 50 per page