javascript

Disable Text Selection in Chrome

I am building a touchscreen kiosk that will use Google Chrome to display the content. There is no keyboard except for a virtual keyboard that will pop up for entering name info on certain screens. Nowhere on the kiosk will a user need to select anything. When I place my finger anywhere on the screen and drag it around, the blue selecti...

The State of contenteditable

The State of contenteditable The markup produced by wysiwyg editors is atrocious. Its littered with style attributes and often is not even valid HTML (missing closing tags, overlapping styling, etc). Are there any established solutions to the problems introduced by contenteditable? If not, how can I go about creating one? Invalid HT...

Is there a JQuery plugin for the iPhone that will notify the user to "Bookmark" their app?

Because it is not possible to force the iPhone to bookmark a webpage, I want a little arrow/bow to drop down to notify people to bookmark my mobile web page. ...

Refresh ads after a jquery action?

*FYI: I'm not using Adsense and this is not against my TOS... I have pages that display jquery slideshows. I used to create the slideshows in html and so every slide change would be a pageview. Now that I'm using javascript for the slideshow I am only registering one ad impression for every slide viewed. I'd like to find a way to hav...

avoid loading images using javascript

Say I have the following code in my html: <html> <....> <img src="the-image.gif" /> <....> </html> Is it possible to avoid loading the image using javascript? I want to load it later, using javascript. But I don't want it to be loaded automatically. I am trying to delay the request of the image. Thanks ...

Javascript inheritance idea??

EDIT: I posted before I thought everything out. Here is a better implementation of what was in my mind: http://stackoverflow.com/questions/3376188/javascript-inheritance-idea-part-2 Okay, so I've seen that the following is bad function A() { this.variable = 7; this.method = function() { alert(this.variable); }; } alpha = new ...

pass a whole html table back to server and replace the database table?

Hi all: I met a problem like this. Here is the scenario: if I have a database table A, which contains several columns, for example. Once the sever (php script) pass the database to web client, it's rendered into a HTML table. Now, here is some requirements for the client side. The user will be able to add/delete several rows from the ...

Fire next event up, but not after that.

For a page, I've been given a link wrapped inside a label, like this: <label for='checkbox_elem'> Links to <a href='somepage.php' target='anotherwindow'>another page.</a> </label> When the user clicks on the link in all browser, the page is spawned in a new tab as envisioned, but in Firefox the checkbox linked to the label is also...

Loading content on a webpage only when a part of the webpage is displayed on the browser

Hello, in some pages i see when you arrive at the end of the page the page automatic loads new data. For example, some blogs when you get to the end of the page (that only loads 10 articles when you get there), the page load 10 articles more without pressing anything, so the questions will be, How do i execute/triger a php/javascript com...

Stripping some characters out of a string

I try to remove some non-safe characters from a string but i believe i have a problem on my RegExp object. What i try to do below is if there are chars whose encoded length is greater than 3 chars they should be replaced with a space. So if encoded value is %3D which is = sign, it is ok to have in my string. But if it is an ’ apostroph...

how to get part of html in javascript?

Hi I have next <a href="#"> <ins class="jstree-checkbox">&nbsp;</ins> <ins class="jstree-icon">&nbsp;</ins> All </a> I want to get only "All" without <ins> When I use $j(this).parent().html() I get <ins class="jstree-checkbox">&nbsp;</ins> <ins class="jstree-icon">&nbsp;</ins> All but I need only "All" How can I get it ? ...

How to use jQuery's delay() as a sleep()?

Can jQuery be used as a sleep() or wait() function? Suspending the execution of the statements after the wait. I tried $().delay(5000) but there was no 5 second wait. Is delay() only used in effects? I am not looking for solutions which involve setTimeout delayed execution of another function or a CPU hogging solution. I want a sleep() ...

Fullcalendar not display return data

Hi everyone, I have a coldfusion cfc that i call to query events between the start and end date. Here is my script: $(document).ready(function() { var calendar = $('#calendar').fullCalendar({ events: function(start, end, callback) { $.ajax({ type: "GET", url: 'cfc/forecast.cfc?method=GetForecast&returnformat=plain', data...

How do I capture mouseover events on dynamically-added input HTML elements using jQuery?

I am dynamically adding input elements to a table with the id of inputDataElements. These input elements have the name deleteAction: function renderInputDataRows(inputData) { ...

Javascript inheritance idea (part 2)

Okay, my first attempt at trying to explain what I was doing failed miserably. I'm basically copying Crockford's Object.create(), except with private variables. If you look at the accepted answer here http://stackoverflow.com/questions/2107556/how-to-inherit-from-a-class-in-javascript, you will see Object.create as the last pattern, wh...

Accessing elements created on-the-fly jQuery?

i am using this gallery plugin but i can't access the elements created on-the-fly by the plugin. what can i do?? Thanks folks!! ...

What is the name of this technique?

I just finished writing a date parser for my ECMAScript implementation. Previously I had written a regular expressions compiler and I was really impressed with the way the spec described the process. Essentially the input is passed through a series of continuations that test each portion of the string. My date parser is loosely based aro...

Can i make Prettify work on any code block? without the class prettyprint?

i am using prettify, i am wondering if i can make it work with any code block, not requiring the prettyprint class. else, how can i attach the class prettyprint dynamically, maybe using jquery. what i want to acheive is similar to stack overflow where code typed in the editor will be "pretty printed" in the preview and output. i trie...

How can I use a different CSS using jQuery?

I was designing a mobile version of my website but then realized I need to support at least three (iPhone, iPad and Android). In that case, I was thinking of using jQuery for the task where I would first detect what device it is and then load the appropriate CSS. How would I go about doing this? Is it something like this? And is this eve...

Storing binary data as a string in a Web Sql Database

Ok, so I am downloading chunks of data via xhr and I want to store it locally for a chrome extension. At first I was able to store it in localStorage, but then I needed to move on to larger chunks that localStorage can't handle.So I decided to store it in a Web Sql Database. However I was able to store the data in localStorage exactly a...