How to get Javascript Select box's selected text

This things works perfectly <select name=”selectbox” onchange=”alert(this.value)”> But I want to select the text. I tried in this way <select name=”selectbox” onchange=”alert(this.text)”> It shows undefined. I found how to use DOM to get text. But I want to do this in this way, I means like using just this.value.

Javascript console.log() in an iOS UIWebView

When writing a iPhone / iPad app with a UIWebView, the console isn’t visible. this excellent answer shows how to trap errors, but I would like to use the console.log() as well.

How to get “GET” request parameters in JavaScript?

How to get “GET” variables from request in JavaScript? Does jQuery or YUI! have this feature built-in?

Does HTML5/Canvas Support Double Buffering?

What I’d like to do is draw my graphics on a buffer and then be able to copy it as is to the canvas so I can do animation and avoid flickering. But I couldn’t find this option. Anyone know how I can go about this?

Inserting HTML into a div

I am trying to insert a chunk of HTML into a div. I want to see if plain JavaScript way is faster than using jQuery. Unfortunately, I forgot how to do it the ‘old’ way. 😛 var test2 = function(){ var cb = function(html){ var t1 = document.getElementById(“test2”); var d = document.createElement(“div”); d.id =”oiio”; d.innerHtml […]

How can I create an empty HTML anchor so the page doesn't “jump up” when I click it?

I’m working on some JQuery to hide/show some content when I click a link. I can create something like: <a href=”#” onclick=”jquery_stuff” /> But if I click that link while I’m scrolled down on a page, it will jump back up to the top of the page. If I do something like: <a href=”” onclick=”jquery_stuff” […]

Tagging with AJAX in select2

I am doing tagging with select2 I have these requirements with select2: I need to search some tags using select2 ajax Also I need to use “tags” in select2 which Allows values that are not in the list(Ajax result). Both the scenarios work independently. But joined together aJax values are only populated. If we type […]

Create table with jQuery – append

I have on page div: <div id=”here_table”></div> and in jquery: for(i=0;i<3;i++){ $(‘#here_table’).append( ‘result’ + i ); } this generating for me: <div id=”here_table”> result1 result2 result3 etc </div> I would like receive this in table: <div id=”here_table”> <table> <tr><td>result1</td></tr> <tr><td>result2</td></tr> <tr><td>result3</td></tr> </table> </div> I doing: $(‘#here_table’).append( ‘<table>’ ); for(i=0;i<3;i++){ $(‘#here_table’).append( ‘<tr><td>’ + ‘result’ + i […]

Modify file in place (same dest) using Gulp.js and a globbing pattern

I have a gulp task that is attempting to convert .scss files into .css files (using gulp-ruby-sass) and then place the resulting .css file into the same place it found the original file. The problem is, since I’m using a globbing pattern, I don’t necessarily know where the original file is stored. In the code […]

bootstrap “tooltip” and “popover” add extra size in table

Note: Depending on you Bootstrap version (prior to 3.3 or not), you may need a different answer. Pay attention to the notes. When I activate tooltips (hover over the cell) or popovers in this code, size of table is increasing. How can I avoid this? Here emptyRow – function to generate tr with 100 <html> […]