javascript,jquery,css,modal,twitter-bootstrapRelated issues-Collection of common programming errors


  • Philipp Claßen
    javascript coffeescript read-eval-print-loop
    I have been experimenting with the Javascript haskell-js library, but I stumbled upon a strange behavior of the coffeescript REPL.With node, the following example works as expected:$ node require(‘haskell’); > [1,2,3].map(‘+1’); [ 2, 3, 4 ]But with coffeescript, it fails:$ coffee -v CoffeeScript version 1.6.1 $ coffee require ‘haskell’ [1,2,3].map(‘+1’) TypeError: +1 is not a function at Array.map (native) at repl:3:15 at REPLServer.replDefaults.eval (/usr/local/lib/node_modules/coffee-script

  • Andrew Thompson
    java javascript swing security applet
    First of all I’m aware that my question is same as in here. But that question did not helped me.I have self signed applet.jarsigner -verify sJSApplet.jar jar verified.Warning: This jar contains entries whose signer certificate will expire within six months.Applet’s purpose is to open MS Word document from LAN machine. So far I’ve tried opening using Desktop.open() and Runtime.exec(). With AccessController.doPrivileged and without. I always get java.security.AccessControlException: access denied.

  • Gohar
    javascript asp.net-mvc validation datetime validator
    I have a Custom Attribute for DateTime validation with given dateformat and also javascript validator which are provide me both client side and server side validation. But now I should change my datetime validation so that it would be performed according clients local DateTime format and I do not know how.I couldn’t find anything that help me.So please advise me how can I implement at least client side DateTime validation or how can I get client’s date format by javascript.

  • tonberry
    javascript visual-c++ visual-studio-2012 windows-8 windows-runtime
    I face a problem to compile windows 8 application which is create using visual studio 2012 windows runtime component project. I’m using html 5 , javascript and c++ to develop this application. But when I compile the project I’m getting error which is JavaScript runtime error: Error in the DLL.I don’t know how to fixed this problem and when i build this project I’m getting error like below:-Error 40 Loading assembly “D:\workspace\Test\apps\Test\windows8\native\Debug\WindowsRuntimeComponent1\Wi

  • Akke
    javascript jquery jquery-ui dialog callback
    I’m writing some form validation functions, and I’ve decided to go with jQueryUI for prompting the user because of flexibility.There is a slight problem tho. I want my functions to return an array which consists of a boolean and a string for my error reporting system. JQueryUI dialogs are asynchronous which means the browser won’t hang and wait for a return value as the native prompt() would.Here is some sample code:Validator function:function verifyTOS_PVM_v2() {verifyTOS_PVM_v2_callback = ”;i

  • raheel shan
    javascript jquery knockout.js
    I am trying to call a function on attr src but failing. Here is what i have tried.function FavoriteViewModel() {var self = thisself.FavoriteProfiles = ko.observableArray([])self.getRating = function(Rating){//here i want conditions and concat image pathreturn does nothing here}self.LoadData = function(){//run ajax and put its result in self.FavoriteProfilesself.FavoriteProfiles(Result)} self.LoadData() }When i run ajax this brings this result. Results are multiple i am only posting

  • Josh Unger
    javascript internet-explorer canvas internet-explorer-8 easeljs
    I am using EaselJS and want to allow for backwards compatibility with ExplorerCanvas.This should be possible using the following code (see here): createjs.createCanvas = function () { … return canvas implementation here … }However, If I put an alert in this function and run the code, the function is never run.How do I go about getting this to work?Edit:Here is a simplified example of the code I am using:<!DOCTYPE html> <html lang=’en’> <head><meta charset=’utf-8′ />&l

  • JoMo Apps
    javascript android ios eclipse phonegap
    I am developing an app for my work (social housing) and I want it to be able to allow the user to take a photo and attach it to an email so they can send it to us (pictures of repairs etc)I’m using Phonegap and Eclipse as I want the app to be cross platform but am testing in Android primarily at the moment. Is there a way to do this? I am currently using the code below with no avail. <script typr=”text/javascript” charset=”utf-8″>function camera(){navigator.camera.getPicture(onSuccess, onF

  • Dan
    javascript ios uiwebview monotouch onerror
    Here’s an answer for a similar question in Objective C but I’m not sure what’s the right way to translate it to MonoTouch.Basically, I want to be able to catch JavaScript errors and know at least filename and line number-unfortunately, window.onerror doesn’t give this crucial information.In particular, I’m not sure if I should expose a native library or if I can write this in pure MonoTouch.

  • The Dark Knight
    java javascript security jsp jstl
    I am in a bit of a pickle :I have a lot of values which i am setting in a bean in java and then i am getting them in javascript and jsp using scriplets like this :In My Bean.java :public void setListValue(String s) { listValue = s; } public String getListValue() { return listValue; } Now in my jsp(inside a javascript function) :input = $input({type:’hidden’,id:’ListVal’,name:’ListVal’, value: ‘<%= results.getListValue() %>’});Sometimes i am using the scriplet code to ret

  • LazyTarget
    jquery jquery-ajax
    I’m trying to serialize my form data including file image field using jquery.form.js jQuery API. The API is helping me to serailze data fields including image and return image object as [object file] Here is my code for serializationvar data = $js(“form[name=ajx_imgupload]”).formSerialize();var img = $js(“#upload_image”).fieldSerialize();$js.ajax({url: “index.php?option=com_obituary&task=upload”,type: “POST”,dataType:”json”,data: data,beforeSend: function() {$js(“.loadingblock”).show(

  • Akke
    javascript jquery jquery-ui dialog callback
    I’m writing some form validation functions, and I’ve decided to go with jQueryUI for prompting the user because of flexibility.There is a slight problem tho. I want my functions to return an array which consists of a boolean and a string for my error reporting system. JQueryUI dialogs are asynchronous which means the browser won’t hang and wait for a return value as the native prompt() would.Here is some sample code:Validator function:function verifyTOS_PVM_v2() {verifyTOS_PVM_v2_callback = ”;i

  • raheel shan
    javascript jquery knockout.js
    I am trying to call a function on attr src but failing. Here is what i have tried.function FavoriteViewModel() {var self = thisself.FavoriteProfiles = ko.observableArray([])self.getRating = function(Rating){//here i want conditions and concat image pathreturn does nothing here}self.LoadData = function(){//run ajax and put its result in self.FavoriteProfilesself.FavoriteProfiles(Result)} self.LoadData() }When i run ajax this brings this result. Results are multiple i am only posting

  • Aaron Russell
    jquery css jquery-mobile scroll appframework
    i have a panel that contains a div that needs to not scroll when someone is scrolling down the listview, as is stands right now when i scroll it scrolls the whole entire panel. Im using Intel XDK NEW with App Framework 2.0, jQuery and JQM. Here is what i have please see comments<div id=”home” class=”panel” data-nav=”home-nav” data-load=”loadDashData”><header><h1>test</h1></header><div id=”dashUserInfo” class=”user-info”> //THIS IS THE DIV I DONT WANT SCROLLING

  • Boaz
    jquery ajax data document-body jquery-object
    I’m making an ajax call to fetch content and append this content like this:$(function(){var site = $(‘input’).val();$.get(‘file.php’, { site:site }, function(data){mas = $(data).find(‘a’);mas.map(function(elem, index) {divs = $(this).html();$(‘#result’).append(” + divs + ”);})}, ‘html’); });The problem is that when I change a in body I get nothing (no error, just no html). Im assuming body is a tag just like ‘a’ is? What am I doing wrong?So this works for me:mas = $(data).find(‘a’);But this do

  • jackJoe
    jquery zurb-foundation reveal.js
    I’ve been using Zurb’s Foundation for a while and recently came across an instance where I needed to:1) load content for the modal via AJAX (np there, easy enough)2) Add an element to the modal to contain a dynamic titleWhat happens, when I code a reveal to have, say, an H3 for a title.. the AJAX call overwrites everything except the reveal-close link within the modal HTML.What I am aiming to do is set the url, title and other options for the modal within the links data attributes, like this:<

  • bobo
    javascript jquery html dom innerhtml
    I would like to get the updated DOM html string for the form elements (e.g. <input type=”text”>, <input type=”radio”>, <input type=”radio”>, <textarea>).I found this question and I am trying to use the formhtml plugin written by gnarf:jQuery html() in Firefox (uses .innerHTML) ignores DOM changesThe problem is that it works in Firefox and Chrome but only works partially in IE8 (I have not tested other versions).If you open the following page in IE8, you can see there is a

  • robx
    jquery jquery-plugins jquery-ajax jquery-validate
    I am getting very frustrated with this jquery form validation ajaxSubmit();In chrome, it seems to fail silently without even hitting the submitHandler, firefox does, but still goes on to the action=”contact.php” page. I was expecting it to just post in the background and possibly return results, but can’t get it to work that way.Edit: Found a fix for this if anyone else is interested, put this line of code somewhere in your dom ready. // disable HTML5 native validation and let jquery handle it.$

  • Thomas Shields
    c# jquery websocket
    I’m having some trobule with Web Sockets and Microsoft’s Draft implementation. I’m using the API provided by them for the server back and as well as the Silverlight fix for browsers that don’t natively support Web Sockets. The information i’m working off of comes from http://channel9.msdn.com/Events/MIX/MIX11/HTM10 and http://html5labs.interoperabilitybridges.com/prototypes/websockets/websockets/info My code compiles okay, it starts to open the connection, then fails. Here’s my backend server co

  • Nick Craver
    javascript jquery
    I have a page that selects all the elements in a form and serializes them like this:var filter = ‘form :not([name^=ww],[id$=IDF] *,.tools *)’; var serialized = $(filter).serialize();This works, unless the form gets around 600+ elements. Then the user gets s javascript error saying that the script is running slow and may make their browsers unresponsive. It then gives them the option to stop running the script.I have tried running the filters separately, I have tried using .not on the selectors

  • Cody Gray
    html css design layout single-page-application
    There’s a general consensus that using tables for layout in HTML should be avoided. But there are exceptions to every rule. I am designing an SPA (single page application)-with pages that resemble the layout used by a desktop application.Obviously HTML isn’t well equipped for these types of pages, but I have little other choice. Implementing these layouts with DIVs is pure hell, requiring a mix of CSS tricks, hard-coded values and even JS calculations on resize events. I’ve recently asked this q

  • Aaron Russell
    jquery css jquery-mobile scroll appframework
    i have a panel that contains a div that needs to not scroll when someone is scrolling down the listview, as is stands right now when i scroll it scrolls the whole entire panel. Im using Intel XDK NEW with App Framework 2.0, jQuery and JQM. Here is what i have please see comments<div id=”home” class=”panel” data-nav=”home-nav” data-load=”loadDashData”><header><h1>test</h1></header><div id=”dashUserInfo” class=”user-info”> //THIS IS THE DIV I DONT WANT SCROLLING

  • Ed Cottrell
    android css html5 website
    I’m struggling with this for a while now.I did a responsive website for a client, but then it turns out that his tablet (Panasonic FZ-A1) has 0.75 devicePixelRatio, which means, that it sais it has 1024×768 pixels, but actually displays less.While I find it difficult to understand, what is the point in creating devices which say they can display a webpage properly, when they obviously will fail at doing that, I’m trying hard to find the proper way to handle this.Here is the problem: 1px borders

  • BPI
    css wordpress mobile header logo
    I am building an ecommerce site using this theme http://goo.gl/3BwG7RI have changed the header to black and and have a light logo. When viewed on mobile and tablet I need the header to be white (native) and the logo to be dark.I have failed to utilize the media queries to make this happen.The theme has 2 header files, the main file calls the other files to display stuff.*** MAIN HEADER ——————<div id=”logo” class=”positionleft”><?php if_logo(); // print the logo html ?>&l

  • Kevin
    html css forms responsive-design mobile-safari
    I’m working with a search box in the header of a responsive website.On desktop/tablet widths, there’s a search input field and a styled ‘search’ button to the right. You can type in a search term and either click ‘SEARCH’ button or just hit enter on the keyboard with the same result.When you scale down to mobile widths, the search input field fills the width of the screen. The submit button falls below it. On a desktop, clicking the button or hitting enter activate the search. On an actual ip

  • BoltClock
    jquery css css3 jquery-selectors css-selectors
    According to http://api.jquery.com/category/selectors/ we can use a large amount of CSS selectors in jQuery, but e.g. :nth-last-child() is not mentioned there. However, when I test the following (with jQuery 1.7.1 as from Google), it actually works on Firefox, Chrome, and IE 9, but not on IE 9 in IE 8 emulation mode:$(‘li:nth-last-child(2)’).css(‘color’, ‘red’);So what’s happening? It looks as if jQuery generated CSS code, like li:nth-last-child(2) { color: red } and somehow injected it, which t

  • OldTroll
    ruby-on-rails css haml sass compass-css
    I’ve got some experience using haml (+sass) on rails projects. I recently started using them with blueprintcss – the only thing I did was transform blueprint.css into a sass file, and started coding from there. I even have a rails generator that includes all this by default.It seems that Compass does what I do, and other things. I’m trying to understand what those other things are – but the documentation/tutorials weren’t very clear.These are my conclusions:Compass comes with built-in sass mixin

  • John Gardeniers
    javascript css
    First up, JavaScript is definitely not my native tongue. Nevertheless, I’ve been tasked with creating a web page where the user can use a colour picker to change CSS elements. These then need to be sent back to the server to be stored in a database. It’s all working so far except the last part, because I’m stuck reading the required elements.Using the code below works fine for any single word elements, such as color, but fails for any hyphenated ones, such as background-color, which return undef

  • Willing
    javascript jquery html css
    I am using google piechart, Here it is visible on all browser except IE in document mode ie8. If I changed to other document mode like IE7 or IE9, its appeared, but if I set document mode ie8 its not visible. How may I fix this bug.Thanks for you advice.

  • jt0dd
    javascript css
    background-image:url(‘images/bg1.png’), url(‘images/speed/bg1.jpg’);I’m trying to take advantage of the option for multiple background images for an element to load, first, a fast, low-res version of each background image to be replaced by the higher quality version once it has loaded. Any efficient solutions?Note: The below is more wishful thinking than an actual question; I thought this might be a good topic to pin the inquiry to.As a side question, does anyone know of a method of using this s

  • Leroy Meijer
    javascript knockout.js modal breeze durandal
    I’m struggling with this problem for a long time and thought why not ask it here on Stackoverflow! My question is as follows:I’m creating a Single-Page-Application (SPA) with Durandal and BreezeJS. Whenever a user creates something new the createEntity function from the Breeze Lib is called and I get returned my object. I push this into a Ko.observablearray and voila it is working just fine ;)Till this everything is working fine.But now comes the tricky part, I use the ko.observablearray to crea

  • Akash K
    ajax django authentication modal
    I am trying to have an authentication set-up similar to that of StackOverflow, where the normal browsing is never affected unless there are some privileged actions which requires authentication (Do not bother users until then).It should be as “Log In” if not logged in or “UserName” if logged in. The relevant part of base.html (from fallr.net) (extended by index.html) looks like :<script type=”text/javascript”>//<![CDATA[$(document).ready(function(){var methods = {forms : function(){var

  • Mike Flynn
    twitter-bootstrap knockout.js modal
    I just can’t seem to get this modal to populate dynamic data after an update is made with knockout.js and a boostrap modal. I can set an initial array of error items and they will show, but if I try to update it, it wont. I know theres a reference problem going on I believe. The modal opens and everything, just the error array never binds to the modal template.Modal Bindingko.bindingHandlers.modal = {init: function (element, valueAccessor, allBindingsAccessor, viewModel, bindingContext) {var

  • Sergio
    php jquery popup modal
    I want to display contact info with the link to contact us page on mouse over hyperlink just like stackoverflow (mouse over user name) and gmail (click over user name). The below is what the latest updated code looks like.<script src=”http://code.jquery.com/jquery-1.10.1.min.js”></script><script src=”http://code.jquery.com/ui/1.10.3/jquery-ui.js”></script><link rel=”stylesheet” href=”http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/themes/start/jquery-ui.css” />

  • David Graf
    modal angularjs-directive angular-ui jquery-ui-timepicker
    With an angular directive, I create a custom timepicker in my angularjs project. Unfortunately, the timepicker doesn’t work properly when using it in a modal, see: http://plnkr.co/edit/QvBHJyoA4O32y9cnsNzEWhen opening the modal the first time, everything works fine. But when closing it (by clicking somewhere outside the modal) and opening it again, I see this in the error console:TypeError: Cannot read property ‘timeFormat’ of undefinedat methods.setTime (https://dl.dropboxusercontent.com/u/1004

  • madth3
    user-interface twitter-bootstrap angularjs modal
    I have a weird problem with a modal. It should be a absolutely normal modal that I can open and close many times, but I can open just one and also just close one time! http://plnkr.co/ksTy0HdifAJDhDf4jcNrMy index.html file looks this:<body ng-controller=”MainCtrl”><div ng-include src=”‘widget.html'” ng-controller=”WidgetCtrl”></div><!– other widgets and content –> </body>As you can see I have devided my application in different parts (called widgets), that I am in

  • owlyfool
    caching angularjs service modal
    i need a little bit of help structuring my angular app.I have two controllers, ‘OfferListCntrl’ (displays a list of offers) and ‘OfferDetailsCntrl’ (displays a single offer via id) as well as a service/model called ‘Offers’. They connect to two web services respectively via the Offers service, GetOffers (returns array of offers) and GetOffer (returns single offer) and i am trying to Avoid calling GetOffer(id) if GetOffers has already been called (saves a service call)MyApp.factory(‘Offers’, func

  • Elad Benda
    javascript jquery css modal twitter-bootstrap
    This is my situation,how can I fix this?broswer.css tried to remove- but changed nothingI have two versions of modal.js new one where typeahead is below the modal/* =========================================================* bootstrap-modal.js v2.0.1* http://twitter.github.com/bootstrap/javascript.html#modals* =========================================================* Copyright 2012 Twitter, Inc.** Licensed under the Apache License, Version 2.0 (the “License”);* you may not use this file except i

  • Pigueiras
    ruby-on-rails modal partial-views
    I am using a Modal to pop up the show page inside the index page…..Everything works just fine until I start using @product.name in my show page partial.I get this error: undefined method `name’ for nil:NilClassI know it’s an easy fix, please help….new to rails This is my code:Views_show.html.erb<div id=”myModal” class=”modal hide fade” role=”dialog” aria-labelledby=”myModalLabel” aria-hidden=”true”><div class=”content-inner hero-unit”><h1 class=”pump-up center”><br>&

  • eytanfb
    ruby-on-rails twitter-bootstrap controller modal
    I am trying to create a data using a bootstrap modal. Here is what I have.I have a UsersController which has a show action. On the show page there is a button to show a modal that I want to create a new UserResult. The UserResultsController has a new and a create method, however because I create the modal on the show page, I can’t pass data to the modal from the UserResultsController.def new@some_data = params[:some_data] # coming from users#show@user_result = current_user.user_results.new endSi

  • user3159229
    ruby-on-rails ruby twitter-bootstrap therubyracer
    Hi i am having problems installing TheRubyRacer gem and was wondering if there were any fixes to the problem, below is the error messages i am receiving when i run bundle install. Note: i need therubyracer to work to use the twitter-bootstrap gem.Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension .C:/RailsInstaller/Ruby1.9.3/bin/ruby.exe extconf.rb checking for main() in -lpthread… no checking for v8.h… no *** extconf.rb failed *** Could not create Makefile due

  • Ismoh
    ruby-on-rails ruby twitter-bootstrap
    Iam trying to get this working:twitter-bootstrap-rails, but if i type bundle install, i get the following error:Fetching gem metadata from https://rubygems.org/………. Fetching additional metadata from https://rubygems.org/.. Resolving dependencies… […] Using sqlite3 1.3.9Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension .C:/_Festplatte_D/RubyOnRails/Ruby1.9.3/bin/ruby.exe extconf.rb checking for main() in -lpthread… no checking for v8.h… no *** extconf.

  • phoffer
    ruby rubygems gem twitter-bootstrap
    When trying to bundle install get error. I get the same error with empty project.Installing libv8 (3.3.10.4) with native extensionsGem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.C:/Ruby192/bin/ruby.exe extconf.rb*** extconf.rb failed ***Could not create Makefile due to some reason, probably lack ofnecessary libraries and/or headers. Check the mkmf.log file for moredetails. You may need configuration options.Provided configuration options:–with-opt-dir–withou

  • harryg
    javascript jquery twitter-bootstrap
    I have some delete forms in my app that I want to confirm with javascript/jQuery before submission.The easy way is to do this:$(‘form.confirm-form’).submit(function(){return confirm(‘Are you sure?’); });Which brings up a borwser-native confirmation box and only submits the form if the user clicks OK.For something prettier I thought I use a Bootstrap modal for the confirm and checked out the Bootbox.js library for this.I can’t seem to get it working properly as it requires a callback and does not

  • Jches
    ruby-on-rails heroku twitter-bootstrap
    Installing therubyracer (0.11.0beta8) with native extensionsGem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension./tmp/build_2c9eqd3g9wxzt/vendor/ruby-1.9.3/bin/ruby extconf.rbchecking for main() in -lpthread… yescreating Makefilemakecompiling locker.cccompiling context.cccompiling primitive.cccompiling v8.cccompiling handles.cccompiling string.cccompiling date.cccompiling exception.cccompiling heap.cccompiling backref.cccompiling script.cccompiling function.cccompil

  • Massa
    jquery css3 twitter-bootstrap user-interface navbar
    I´m doing a big project based on Boostrap 3 template, that uses a lot of jQuery plugins to cover the project needs. Everything is going well!You can see 3 project sample pages here:www.frontsite.com.br/saam2/index.php?_action=mapawww.frontsite.com.br/saam2/index.php?_action=painelwww.frontsite.com.br/saam2/index.php?_action=arquivoBoth pages has a “left content menu/bar”. Its a scrollable containter div with a collapsible list of nested items ul and li, as you can see.<div class=”sidebar-oper

  • jdartland
    ruby-on-rails ruby ruby-on-rails-3 twitter-bootstrap coding-style
    I’ve been stuck for a time now with my commenting system on my blog. I now need you help to solv the problem and push me in the right direction. I’m using Ruby on rails and the twitter open source framework bootstrap.show.html.erb:<h2>Comments</h2><div id=”comments”><%= render :partial => @post.comments %></div><%= form_for {@post, Comment.new} do |f| %><p><%= f.label :body, “New comment” %><br/><%= f.text_area :body %></p><

  • Aborted
    javascript php twitter-bootstrap external
    As weird as this may sound, my website is stored on my localhost and it’s taking forever to load. Actually, it never finishes. My website is using Bootstrap 3 for the front-end and the back-end is written in PHP.This never happened before and I’m unable to find the roots of this problem, but the way my website starting behaving this morning really caught me in surprise. I use some external libraries to power up my website, such as the Javascript libraries to have HTML5 run on IE, Facebook/Twitte

  • Layla
    ruby-on-rails twitter-bootstrap views partial-views
    I am using twitter Boostraps tabbable feature found here: http://twitter.github.com/bootstrap/components.html#navsAnd within this navigation content window, I am trying to render a view that displays a “course”. This view found in views/courses/_show.html.erb looks like this:<div class=”center hero-unit”> <h1><%= @course.course_name %></h1><%= link_to ‘New Question Set’,new_answer_path(:course_ID => @course.id), :class => “btn btn-large btn-primary” %> <%=

  • tig
    node.js express twitter-bootstrap connect minification
    Using connect-assetmanager in a node.js/Express app. This works:js: {dataType: ‘javascript’,path: __dirname + ‘/../public/javascript/’,files: [//’jquery-1.7.1.js”bootstrap.min.js’],route: /\/static\/javascript\/script\.js/}(Note using the already minimized version of boostrap.js, and commented out the jquery file for testing).This fails:js: {dataType: ‘javascript’,path: __dirname + ‘/../public/javascript/’,files: [//’jquery-1.7.1.js”bootstrap.js’],route: /\/static\/javascript\/script\.js/}Note

Web site is in building