Creating and handling JavaScript events inline in HTML or through a script.
1
vote
1answer
29 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
3answers
32 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
vote
3answers
27 views
OnSubmit Javascript not overriding submit action
I am trying to build a website with a webform. I am using godaddy's default webform php and I am not sure how to validate the form for required fields.
I want the user to not be able to submit the ...
1
vote
0answers
18 views
Does Safari handle the paste event correctly?
I'm trying to write some code for Safari for handling the 'paste' event, but it doesn't seem to work right. According to the WebKit DOM reference, oncut, onpaste, and oncopy are all handled ...
0
votes
2answers
22 views
`onReady` not firing
function onYouTubeIframeAPIReady() {
alert("onYouTubeIframeAPIReady Fired"); //This works
player = new YT.Player('player', {
//height: '390',
//width: '640',
...
0
votes
0answers
15 views
Node.JS Ensure Config File Ready
I have a config.js file for Node that I have set user data, database connection data, and IP address for the server. As I am working in multiple environments I have configured the config.js file to ...
0
votes
0answers
20 views
Element focus in Firefox (and maybe other browsers too)
I'm working on an HTML5/JavaScript in-browser game and I'm getting some strange behavior in Firefox that I'm hoping someone can help me out with. The game resides in the following tag:
<div ...
0
votes
2answers
76 views
Very simple javascript doesn't work at all [duplicate]
my javascript in .php (static website) file doesn't work. I use there 3 another and they work, but not this one.
The situation is simple
The javascript is...
var myFile = ...
0
votes
2answers
21 views
Why <HTMLAudioElement> has no method 'set'
My code is below, when i run it, it shows error - has no method 'set'.
Why it''s happening? I've binded my functions to model, but it seems to work wrong(
var Player = Backbone.Model.extend({
...
0
votes
0answers
16 views
SharePoint add javascript event to a editForm.aspx page
I have a Sharepoint list where I want to customize the editForm.aspx page with javascript.
The problem is that I can't manage to add any events to the controls in that page. I am able to get a ...
-1
votes
0answers
26 views
CSS Float is working fine in IE (in print) but not in FF and Chrome [closed]
I have one div with float=left. It is looking fine in all browsers at page level view. But as I click on print (using Javascript's windows.print() to print the page) the page is coming properly ...
0
votes
0answers
33 views
How run Javascript and jQuery in Firefox on an external webpage?
I want to run my own JavaScript (written using jQuery) in Firefox in an external webpage. How to do that?
I know it can be done by jQuerify and ScratchPad. But I have a loop running and new page ...
0
votes
2answers
29 views
function working except when you click it first time, chrome
I have created a JavaScript onclick function. it works fine in Firfox. but in chrome/IE, function working except when you click it first time. My code is below
<!DOCTYPE html PUBLIC "-//W3C//DTD ...
2
votes
3answers
32 views
Radio button to Prevent to be checked after on click
I am trying to prevent a radio button not to be checked if a false is returned from the onclick.
Following is the jsbin link for the code I am using.
http://jsbin.com/oruliz/2/
Is there anything I am ...
2
votes
1answer
27 views
Is onpropertychange equivalent to oninput?
Is it reasonably fine to bind an event handler to an element both on the 'input' and 'propertychange' events to target support for IE8 and other browsers?
$('.element').on('input propertychange', ...