I am trying to initially hide MyDiv. Then it is revealed on the click with toggle functions. However, I cannot initially hide it. <button onclick="myFunction()">Click Me</button> This is my DIV element. <script>function myFunct
I'm really struggling to find documentation on how to read a text file into an array using OS X Automation with Javascript. Here's what I have so far: var app = Application.currentApplication(); app.includeStandardAdditions = true; var myFile = "/Use
I'm having this issue and I can't really figure out how to solve this. I have this component: (function () { 'use strict'; // Usage: // // Creates: // myApp .component('navbar', { //template:'htmlTemplate', templateUrl: 'app/components/navbar/navbar.
I've been reading a few articles, and haven't found the example that solves my issue. My understanding is that: ng-if and ng-repeat create isolate scopes. Using $parent.someProperty is bad. Using $parent.$parent.someProperty would be an abomination.
This question already has an answer here: Chained promises not passing on rejection 3 answers How would you make a call to the next error function with promise chaining? I thought a return inside the error function would automatically call the next e
This code works well for a gallery where all images are indexed as thumbnails, but when just one index picture is shown on the site, and all other pictures are hidden, photoswipe hangs itself upon trying to return from a picture which is hidden. When
I am using a combination of the AngularJS Utils pagination directive and the filamentgroup tablesaw responsive table library to try and get a responsive (by swiping right), paginated table. Once I have populated the table I call the tablesaw "refresh
Hi i am used brightcove video my html page light box pop up. click image successfully popup brightcove video. my query is click thumbnail image image popup and auto play brightcove video.thanks for your feature help. Script: $(".thumb3").on('cli
I'm having trouble with a JavaScript form validation script. Essentially if an answer hasn't been given, it should mark the question as red and not submit the form. (It adds the red by giving the class error to the question) My form is set up to POST
When using http in Angular the url must be specified in the JavaScript. I don't want to hard code the full url (e.g. http://www.example.com/Controller/GetDetails/) because this would mean code changes between live and test environments. I've read exa
I am making a small app in sails.js and I need to store images in database. For that, I need to convert an image to a base64-encoded data URL so that I can save it as a string in my sails models. However, I don't know how to convert it in this form.
I'm sure there is an easy way to do what I want, I just cant wrap my head around it. How can I get the http interceptor in angular to retry a request if it fails? I imagine I would have to build some sort of promise in the request right? Then in the
I built a touch/mouse friendly jQuery plugin. It works on phones(ios, android...) and desktops browsers. But i have some issues with Windows 8 Chrome installed on laptop with touch screen. Unfortunately i dont have such a device and cant do any tests
For testing purposes I copied the full example found on the phonegap camera API and I put an alert on onPhotoDataSuccess to test when the function is fired. On the first photo taken the alert will not show. However after the first attempt the alert w
I'm trying to dynamically create an array from another one in JavaScript. I have a string which is a mathematical literal expression like this '2a + 3b + 4a + 5c': I just want to split it into an array with only the literal part of the number (Ex. 'a
Hi I'm having trouble comparing two strings that should really be the same but when I evaluate it in alert(f==g) it evaluates to false. var oTrackCarriers = { "9045": [ ["A"], ["B"], ["C"] ], "9046": [ [&q
I'm trying to work out how I can do my JavaScript callbacks in a different style. My current style of callback, passes the callback into the function, and the function calls the callback. For example: Function call doSomething(function(data){ console
Here's an example of an alert I'm using: <div class="alert alert-error" id="passwordsNoMatchRegister"> <span> <p>Looks like the passwords you entered don't match!</p> </span> </div> I know that $(&qu
I need to build a web based (html/js) game where the user earns/scores points. At the end of the game, the user enters their details on a form and it, along with their score, are submitted to the server (via ajax post) to be stored in a database. The
I'm working on a site which has some big images etc to show. On my screen, at 1024 x 768 resolution, it fits the screen completely, going from left to right. However on my client's screen, who has a bigger resolution, he sees the right part of the sc
Hey i still need a little bit of help with the rating system but i have a problem checking if the cookie exist this is <?php $rating = new ratings($_POST['widget_id']); isset($_POST['fetch']) ? $rating->get_ratings() : $rating->vote(); class rati
When I made a chrome extension I made a JavaScript file (.js) & html file, and in the html file I called the .js file through this line : <script src='history.js'></script> But I want to make a button in the JavaScript file not in the html
I'm wondering why web analytics softwares use a 1x1 gif element to send a beacon, rather than simply including a <script src='http://my.analytics.com/script.js?my=params'></script> element to send the beacon and thus avoid having to actually r
Is there a way to execute some code (in a file or from a string, doesn't really matter) before dropping into interactive mode in node.js? For example, if I create a script __preamble__.js which contains: console.log("preamble executed! poor guy!"
I am trying to change HTML code within an IFrame (it's on the same domain), but for some reason, this line, wont change the html: $('iframe').contents().find('#weergave_afstand').innerHTML = afstand the text it should modify is the following: Afstand
I am creating a dynamic table like below on page load after fetching data from database <table border="1" id="tableView"> <thead> <th></th><th>ID</th><th>Name</th><th>Description<
I have this code: for(var i=0; i < localStorage.length; i++) { var subjects = []; var key, value; key = localStorage.key(i); value = localStorage.getItem(key); var keysplit = key.split("."); if(keysplit[keysplit.length] == "subj") {
Need a Regex to get all characters after , (not including it) from a variable. This variable can contain for example 'SELECT___100E___7',24 'SELECT___100E___7',1 'SELECT___100E___7',286 'SELECT___100E___7',5147 Note: There can be any length of charac
I'm adding some <script> tags dynamically to the head element after page load. I understand the scripts are loaded asynchronously, but can I expect them to be parsed in the order they are added? I'm seeing the expected behaviour in Firefox, but not
My application is J2EE (JSP/Servlet) based. I encounter an issue when i try to open a new window (pop-up) from JSP and call a Servlet action (e.g. Streamer.do) which streams a PDF file inside that pop-up. Problem: While IE 7 -> Tools -> Internet Opt