javascript

How does the embedded Google Analytics Javascript works?

I was just wondering the general idea how the embedded Google Analytics Javascript works? Example, how do they calculate how long you been visiting the site? Does the embedded Javascript calls home every time someone visit a site?... I just need to know the big picture Thanks. Edit: how does the following work? <script type="text/java...

JSON. How many elements are acceptable?

I am running a Facebook application that asks users questions. When they complete one question they move onto another. What I thought about is when they first hit the application the script pulls 300 questions from the database and loads them into either and array or JSON in Javascript. In either case (Array or JSON), how many elements...

asp.Net: UserControl and Javascript Objects

Hi, how can I access my UserControl as a JavaScript Object for calling some function declared into my control. I have create a UserControl, and I want in the page I'm using this control access it through javascript code. var myControl = $get('<%= myContro.ClientID %>'); myControl.someMethod(); ...

Do not let end-user save password

Possible Duplicate: Disable browser Save Password functionality Is there a standard way to prevent the end-user's web browser from saving a password using HTML or maybe JavaScript? ...

How do I figure out why the contenteditable attribute doesn't work?

Hey All, I seem to be having an issue with some of my css/javascript. I can't seem to be able to get contentEditable to work in my webapp. I was inspired by the answer to this post to try this method. I've tested my browser here and it works fine. Are there any css rules I should be aware of that may be causing it to not work? I can s...

How do i make it so that a checkbox is not affected by a jquery bind function?

I have a jquery function that binds all tr's with the class item to a click function that will redirect to another page. inside this tr though is a checkbox. How can i allow this checkbox to function correctly instead of acting on the tr's click function? ...

jquery/javascript concat question

I want to create a jQuery statement that looks like this: $('.total_999').html("something"); However, 999 comes from variable called storeNo. How can I construct this statement dynamically? ...

IECPort javascript class

So I've never used javascript before. I was sent this code that interfaces with a tty device. I need to port this code to python but there's not a single comment in the entire thing. Is this an internal javascript class or whatever javascript uses? var IEC = new IECPort('/dev/ttyS2'); ...

show image while page is loading

My webpage is using some api's together and the total process time for the page to load is around 8 seconds. I want to show a page loading image while the page is loading. Could be like the whole page is dimmed out and an image is shown which represents the page loading and once the page loads i want to go back to my page. How can i show...

Selecting the same item with jQuery multiple times vs using a variable.

Which of the following would theoretically be better with performance and / or memory? In other words, does jQuery have to do work to select the same item multiple times or does it know what items it has selected in the past? I've intentionally left animate with no arguments, this is a purely theoretical question. $("#someelement").ani...

Load HTML File Contents to Div [without the use of iframes]

I'm quite sure this a common question, but I'm pretty new to JS and am having some trouble with this. I would like to load x.html into a div with id "y" without using iframes. I've tried a few things, searched around, but I can't find a decent solution to my issue. I would prefer something in JavaScript if possible. Thanks in advance...

Mixing a textfield input with a select input in html

My employer has asked me how to mix the functionality of a textfield input with a select input, "kinda like gmail does when you start typing the address of someone you've already written to, it allows you to choose the person and also to keep writing if it isn't in the database". How is this done? I imagine there's a javascript/jquery...

Calling one method from another in JS

I have the following snippet of JS var Customer : function() { this.ShipProduct : function() { //Logic for shipping product. If shipping successful, notify user //Here I am trying to call Notify //this.Notify(); // does not work } this.Notify = function() { //Logic for notify } } How...

return title of web page i'm visiting in a UIWebView

Hi, I created programmatically a view that contains a navigation bar like Safari, a web view and a toolbar... In the navigation bar I put a label and two text field, one for type URL and one for type search. But how can I use the label to show the web view page title? I tried this code but don't work! :( nomeSito.text = [webView strin...

Loading animation doesn't show up until after ajax call completes in Safari/Chrome

Hello Everyone, I've run into a problem that I haven't been able to find a solution to yet. I'm creating a resource booking application which uses AJAX to process information given by the user into a back-end database. Whenever the user wants to create a booking they fill out a form with relavent information which gets sent via AJAX to...

Eclipse 3.6 lag when copy and pasting

Hi everyone, I'm having a strange problem with Eclipse 3.6 where copy and pasting causes a lot of lag (total eclipse lockup for 5-10 seconds). I'm using the Helios 3.6 PHP build but have also tried Galileo to no avail. On .php files editing PHP code, it is fine and there is no delay. Same with .html and .js, but it only happens when ...

A full-page wysiwyg editor for xhtml?

My client has a website which is currently semi-static html pages: it contains dynamic elements such as navigation and a media gallery, but the editable content is still stored straight into several static (x)html pages, that the client edits using Expression Web. The site in itself is ready for content/style/layout separation, but the ...

Dashcode List Selection

I am working with the Dashcode List element from the library and am trying to make a selection from within the program. I have 2 lists binded to a datasource that gets requeried, which removes my selection from the lists. I am trying to keep the selection on the lists, so my current attempt to workaround the problem is to save the index...

ASP.NET MVC: Javascript executing correctly on create view, but not edit view.

I have two views: create and edit. Both share a strongly typed editor template user control. I have a jQuery wysiwyg editor on the shared editor template, and it works fine without errors on the create view, but when I load up the edit view, firefox reports that "$ is not defined" "jquery is not defined" etc. Also, the images from th...

JavaScript expanding div doesn't work in IE

I have a script that lets you put a link at the bottom of some text so you can reveal more text. It works great in Firefox. When you click the link, the div appears and the other parent divs expand with the growing child div. But the parent divs don't expand in IE. The text actually disappears behind the row (this is in a table create...