Tagged Questions
0
votes
2answers
27 views
Javascript : how to check , browser window is fully resized or not?
I want to execute one function , after my window is fully resized.
window.resizeTo('792','115');
myFunction();
My question :
1.Does the myFunction() method will be called only after the window is ...
0
votes
2answers
11 views
Why OnChange Event is not Dispatched When Target Is Manually Set
I'm confused on how JavaScript handles Change Events and am looking for some insight.
Let's say we have two HTML controls; a Checkbox and a Button and I want to use JS to display a message that says ...
0
votes
0answers
9 views
Why does it take so long between focusout and click on another element
I am trying to make my own combobox and I have problems with focusout timings thus I have set up a simple example to see the problem:
jsfiddle
which basically has two events on two items:
...
1
vote
1answer
38 views
event.preventDefault(); is not working on firefox on form submit
I had a form as below
<form name="attachment_form" id="id_attachment_form" class='class_attachment_form' action="/visit/something/" method="post" enctype="multipart/form-data">
...
1
vote
0answers
25 views
only run on scroll and not on page load
I have this code,
<script type="text/javascript">
$(document).ready( function() {
var t, l = (new Date()).getTime(), scrolling = false;
$(window).scroll(function(){
...
0
votes
3answers
32 views
Change binding on event for button using jquery
I've bound an event to an icon on click. the event changes the id of a button on the page. I want a new event to be bound to that new id, and the existing event bound to the old id to be unbound. ...
0
votes
1answer
16 views
Fetch event .focusout from input field in table cell
First, I have google visualisation dataTable.
After that I create for loop to get table cell value and put in input field:
for (var y = 0, maxrows = data.getNumberOfRows(); y < maxrows; y++) {
...
0
votes
2answers
42 views
How to alter dynamically generated nodes?
i've been searching for quite a while now to try and find a way to change (remove links, highlight, w/e) html content that had just been added dynamically.
First, I download an cross domain website ...
0
votes
1answer
31 views
Check Mobile type right ? Javascript show a div ONCE depending on mobile type
all what i need to know if i checking the mobile type in right way ?
there is other way to check the mobile type ?
see my way below in the code
how i can try it using any tool ?
anyone know the ...
0
votes
1answer
14 views
Assigning onmouse events with a loop to a div array - Javascript
I'm trying to assign onmouseover - onmouseout events to an array of divs with a loop.
I created the divs trough a loop ass well using a function parameter createDivs(x), x being number of divs and a ...
0
votes
1answer
14 views
touchStart event and queryCommandState delay issues
I am working on an editor in iOS that uses contentEditable. So, to know what some HTML elements are, I am using document.queryCommandState(). This works great, but it actually seems to have a delay ...
0
votes
2answers
13 views
Fire deferred change event when text field input changes
According to the jQuery API
The change event is sent to an element when its value changes. This event is limited to <input> elements, <textarea> boxes and <select> elements. For ...
0
votes
1answer
20 views
How to use Adapt.js
How to use Adapt.js
Can you give me some demo samples with adapt.js
For example After I get adapt.js into index.html Then in tag I try some lines as
<div class="container_12">
<div ...
0
votes
1answer
17 views
Sending message back to chrome extension from loaded iframe
I have a chrome extension that users install on their browsers, when you open the extension popup (background page), all it does is loading a whole application backend running on my server.
What I ...
1
vote
0answers
73 views
Javascript Onclick Not Working on First Click
I have a program that has calendar popups and text input fields. When the user clicks on the text input field I am doing an onclick to check whether the value of the calendar field is not zero. If it ...
-1
votes
3answers
39 views
Attach event handlers for click event on all elements in the DOM
So I want to be able to figure out which part of my page has been clicked. There is no guarantee the elements are all on the page from the get go, which means that I need to use something like jquery ...
1
vote
1answer
33 views
JavaScript/jQuery eventListener - declaring outside of window.onload
How does jQuery achieve declaring an event listener inside of a self invoking function without being in window.onload, whereas JavaScript returns null.
(function() {
// returns null
...
0
votes
1answer
19 views
Illegal Invocation on addEventListener
With jQuery you can use .on()/.off()/.trigger() methods on any jQuery object, giving you powerful access to the event system. I'm trying to do something similar in vanilla JavaScript but I keep ...
0
votes
0answers
19 views
Backbone & Jquery trigger / bind custom event not heard
So, I'm writing a backbone app within an ASP.NET MVC page, and I'm having a truly baffling (to me) problem with using two custom events.
So, the MVC View (Planning.cshtml) has a select control which ...
0
votes
0answers
13 views
Safari mobile - onbeforeonload support/workaround
I'm looking for a reliable-ish workaround to onbeforeunload for Safari Mobile (let's say on iOS 7). My purpose is to prevent users to leave the page in any way if certain conditions are verified.
I ...
1
vote
2answers
35 views
Stopping event propagation from an onclick handler
I am working on a legacy web app which I am progressively ajaxifying and have found the need to stop event propagation from an inline onclick handler.
Take this for example:
<a id="inner" ...
0
votes
1answer
32 views
How to print a webpage with window.print [duplicate]
I need to remove the footer and header from a webpage and show only the content.
I did this, but in the page, URL and date are displayed, how to remove them?
<input type="button" ...
-1
votes
1answer
33 views
Crossbrowser focus and blur on window object in jQuery [closed]
Quick question, does this code will work in all browsers?
$(window).focus(function() { console.log('focus'); });
$(window).blur(function() { console.log('blur'); });
I've tested in FireFox 28 and ...
2
votes
1answer
32 views
FIrefox OS: Callback before app crashes
Is there a callback function in Firefox OS before it crashes the whole app? because I want to send a crash report.
1
vote
1answer
30 views
MooTools custom drag event
Is there anyway to define a drag event in MooTools using the mousedown, mouseup and mousemove events. I would like to be able to do something like the following:
$('#knob').addEvent('drag', function ...
1
vote
1answer
27 views
Getting BackBone.JS to set up a form and fill in the data
Ok, I am very new to backbone and I am trying to get my head around it, but can not figure out what I am doing wrong. I am not using backbones router, I do not need to, I am using PHP Slim to handle ...
0
votes
1answer
9 views
'drop' event already done stopPropagation() and preventDefault() in div, why browser opens the picture after I drop it?
I am practicing writing a file drop & upload plugin.
In the 400px * 400px div, where catches the 'drop' event, I've already added this code in the handler:
DropUpload.prototype.drop = function ...
0
votes
0answers
66 views
Event not attached
I have a function which dynamically creates an element and attaches a click event to this new element.
In the current state of my app, this function is called 5 times: for the 4 first created ...
1
vote
1answer
31 views
console.log not showing js value
I am iterating through json data...but i am not able to get the value in console.log
can you guys tell me how to fix it..
i am writing the correct syntax for my console..
providing my code below...
...
0
votes
1answer
31 views
why is overriding window.onresize bad practise?
refering to JavaScript window resize event
they mentioned they solution was to add a listener to the window with the "resize" event and said overriding window.resize is bad practise...
my question ...
0
votes
1answer
33 views
How to spawn objects randomly on a line using javascript/HTML5?
I am creating a game in javascript/HTML5 (in a canvas) which involves 2 types of objects (let's call them object type A and object type B) that start falling from above the canvas.
The player is ...
-1
votes
2answers
32 views
How to read values of Hidden & Textboxes in Jquery
I have this view model below, from which I am trying to read the values of of the hidden fields and textboxes however, I am having an error of:
Uncaught TypeError: Cannot call method 'value' of ...
0
votes
1answer
30 views
Setting different content for the google map does not work and content does not update
I am using the map from the following link:
http://jquery-ui-map.googlecode.com/svn/trunk/demos/jquery-google-maps-clustering.html
I changed the code like this :
$(function() {
...
0
votes
0answers
16 views
Links not working after disabling IScroll
When I initialize IScroll with click property:
var myScroll = new IScroll('#wrapper', { click: true });
And then try to disable IScroll:
myScroll.disable();
I have an issue where all the links ...
0
votes
1answer
41 views
CustomEvent() to an XUL tab - Firefox addon
For many reasons, I have to open up XUL in a tab, instead of using a standard window. I wish to send custom events to this tab, and here's how my code looks like :
myextension.js :
..
var pTab ...
-1
votes
0answers
13 views
to include third sliderMarker in 3000 lines of code
Using chart js i am trying to bring in the third range selector...
the library is of three thousand lines of code...
dont know where to include my third selector in code...
can you tell me to include ...
3
votes
1answer
33 views
What version of IE doesn't pass the event as argument to listeners?
As some old versions of IE didn't provide the event as argument to event listeners, we got used to (event||window.event).
In order to decide whether it can still make some sense to have this in a ...
0
votes
1answer
21 views
How to bind a click listener not on an element in javascript
I want to pop out a menu, and when the user click positions other than the menu, the menu will hide.
Also, if the click is on some nodes who have click listeners, those handling functions will not be ...
0
votes
0answers
29 views
IE11 alert after navigation begins cancels the navigation
We have some javascript that is used for navigation when you click a tab in which the window.location is set to another URL with query string parameters. This URL basically:
checks if the user is ...
0
votes
1answer
15 views
Is there a way of capturing element state before MutationObserver mechanism fires?
I am trying to get the information on change in element state using javascript MutationObserver
To get what was the state of the element before the change then check what is current state and based on ...
0
votes
0answers
11 views
Javascript/Android/Jasmine Replicate Galaxy Android Input with Javascript. Keyboard event problems
I am trying to write Jasmine tests for a Galaxy tablet 2 GT-P3113 that is on Version 4.2.2 and Chrome version 33.0.1750.166. There is a library that I am using that has issues with input when using ...
0
votes
0answers
7 views
Salesforce close case tab event catch
Is there a way to listen when user closed tab event ?
I want to add a listener in a canvas app and execute some code when casetab was closed.
0
votes
2answers
23 views
Should I use IIFE or window onload to initialize?
Both of the following code snippets worked:
Using IIFE in js file:
(function initialize() {
txtInput = document.getElementById('txtInput');
txtResult = document.getElementById('txtResult');
...
0
votes
1answer
48 views
Why is binding hammer.js to document body not working?
I want to use hammer.js to capture mobile touch inputs. As some elements (e.g., some 'li') are dynamically generated, I want to bind the hammer object to document itself, and use a selector to capture ...
0
votes
0answers
18 views
jQuery Countdown Plugin attach event
I am using this plugin: http://keith-wood.name/countdown.html
The problem I'm having is that the countdown doesn't reset. I have three sections, each section is timed and upon reaching 0, it submits ...
0
votes
1answer
28 views
Maintain associations between objects and HTML elements in JavaScript?
I am trying to build a page that will allow users to upload multiple files simultaneously, with separate progress bars for each file. (Similar to what Gmail does when you drag and drop multiple files ...
1
vote
1answer
39 views
addEventListener will not attach a listener to the element
/***************************************************** *
* Function: renderTodos
* Builds a list of todo items from an array
* rebuilds list each time new item is added ...
0
votes
2answers
45 views
Dispatch CustomEvent() to prefwindow - Firefox addon
Working with a firefox addon, I wish to send a CustomEvent() to a preference window.
I open the preference window using an openDialog(), and keep a reference to the opened window. After that, I try ...
1
vote
4answers
136 views
Remove beforeClose event handler - jQuery UI Dialog
I have a jQuery UI dialog box with a form inside it. I'm trying to implement a feature where if a field in the form has been modified, we'll be showing a confirmation message using noty
Now, unlike ...
0
votes
1answer
32 views
How can I customize the look of the h1,h2,h3, tag format of the CKEditor editor?
How can I customize the look of the h1,h2,h3, tag fprmat of the CKEditor so that I can make them match my local CSS style of h1,h2,h3,etc .. The CSS file I use is boostrap.css Below is the config.js ...