javascript

this.select() and javascript events on forms

I have a form box that I want to be always selected. I was able to get it to select everything in the box when it is clicked (using onFocus="this.select()") but I want it to be selected 100% of the time. The text in the box will be always changing, so I tried using onChange="this.select()" but that didn't work. Here's what I have: <...

javascript: Which should I use, Microsoft.XMLHTTP or Msxml2.XMLHTTP?

There are two progid's. I've seen both used. Anyone have any insight as to when I should use one, versus the other? ...

How to hypen words at end of line using javascript

This is my coding. The result of using css as class Hyphenate, the result is shows in result1. However, what I want is the result shows in result2. Also, in result1, when there are just few words, it gives wide gap between words, it's really ugly. Is anyone now how to solve this problem? --edit question-- What I am asking here is: I ha...

Alternative methods for creating dynamic JavaScript?

Background I am working on a project that runs in an embedded web browser in a small device with limited resources. The browser itself is a bit dated and has limits to its capabilities (HTML 4.01†, W3C DOM Level 2†, JavaScript 1.4). I have no documentation on the browser, so what I do know comes from trial and error. The point is t...

how to parse a page that doesnot show any data in its source code??

I have to parse a page that is using javascript functions for its display and so we cant see any data in its source code.But if i save that page to my system than it shows everything in its source. Please suggest me some way out so that i can parse that page. ...

ASP.NET MVC Form Validation using JavaScript

<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage>" %> Index <script src="/Scripts/jquery-1.3.2.min.js" type="text/javascript"></script> <script type="text/javascript" src="/Scripts/jquery.validate.js"></script> <script type="text/javascript"> input[type=text] ...

problem with JS and Firefox - Image Replacement

Hello I have a simple JS function changing the background image of my website for each "page" - there are actually no separate pages, just JS changing the content area and background. Here is the code I have: var selector = 'home'; function changeBG() { if( selector == 'portfolio' ) { document.b...

orkut application

orkut applicaion , i am applicaion succefully i deployed also my app name ishqiya, i am create first page invite friend but is not crated my second page and how i write back to home button if i link one page to another page how to write back button ...

Change Submit button image with hover

Hi all. I have the following in an html form using method Post. <input type="submit" title="" class="myclass" value="" /> and: .myclass { background: url(../images/image1.png) no-repeat; border: none; width: 165px; height: 59px; } Basically, I need my form information to be posted using an image1.png button, and when hovered, i...

how do I access XHR responseBody from Javascript?

I've got a web page that uses XMLHttpRequest to download a binary resource. Because it's binary I'm trying to use xhr.responseBody to access the bytes. I've seen a few posts suggesting that it's impossible to access the bytes directly from Javascript. This sounds crazy to me. Weirdly, xhr.responseBody is accessible from VBScript, so...

Saving complete Webpage into local disk using IHTMLDocument ATL interface.

Hello Experts, In our win32 ATL project requirement we need to save the browsed web page into local disk in order to view it offline. Using IHTMLDocument2 interface we have retrieved html content using get_all() method and retrieved images from the get_images() method. now how do we extract other external files such as stylesheet (.c...

(Override || Extend) Javascript Method

Hi, I want to change the method DomElement.appendChild() to work differently when applied on an Object that I have created: // using MooTools; var domElement = new Class({...}); var MyObject = new domElement(...); $(document).appendChild(MyObject); // Error // I want to add to (extend) appendChild, to do something specific, when: al...

Invoking a function Object in Javascript

Hi, I have a small question in javascript. Here is a declaration: function answerToLifeUniverseAndEverything() { return 42; } var myLife = answerToLifeUniverseAndEverything(); If I do console.log(myLife) It'll print 42, as I am just invoking the same instance of function resulting in 42 as the answer. (Basic r...

How do I set a backwards selection?

I'm working on a custom tokenfield based on textarea. The idea is to have a textarea with div elements absolutely positioned above, so it looks like they are in text area. It was pain so far, but I managed to do pretty much everything, except one thing. Is it even possible in javascript to set reverse-selection? When you put a cursor s...

Kill JQuery AJAX overlapping requests

Hi All, Is it possible to kill a previous ajax request? We have tabular data very adjacent to each other. On mouseover event of each data we are making a request to our server using JQuery Ajax object and showing in popup. But as frequently we move mouse to other tabular contents previous Ajax responses are being displayed inside popu...

How to open javascript search engines in new window (using "function jump() {" )?

see this http://javascript.internet.com/forms/multiple-search-engine.html . i wonder how to open the search result in new window. help me! ...

Div mouse hover

Work on Asp.net 2.0 C# in web.In my site i have three div .Each div contain several element ,When i mouse hover a div then it expand on vertically ,initially all div are in Collapsible.How to write this mouse hover event. How to set all div content in collapsible . I want Accordion but the Accordion header takes place vertically not hori...

How to conduct stack/memory overflow with javascript?

Like the following: #include <stdio.h> #include <string.h> void bad() { printf("Oh shit really bad~!\r\n"); } void foo() { char overme[4] = "WOW"; *(int*)(overme+8) = (int)bad; } int main() { foo(); } ...

How to determine the event came from the main document of the tab

I'm developing an extension for FireFox. The extension adds event listener to "appcontent" element on "load" event. How to determine the event came from the main document of the tab? At the moment all events from different elements of the page come (for example image and even the extension document if it fires one). I would like to excl...

Advanced javascript guidance

I'm looking to improve the standard of my javascript as I'm moving beyond simple AJAX forms towards much richer interactions and it's quickly getting out of hand. There's lots of resources about how to write proper javascript, many of the best are from Douglas Crockford, but very little about relevant design patterns and how to implemen...