javascript

Fancybox Inline content Modal Window Not Displaying

I'm very experienced with Fancybox, great plugin, but I can't get it to display my inline content. According to the documentation you are supposed to use a div with style="display:none"... I've got that and I know the plugin is working, verified that all scripts are loaded and also the Fancybox overlay works when clicking the link, but ...

Javascript IMAP and SMTP client?

Is it possible to build a SMTP/IMAP client that can run in the browser that uses only Javascript? ...

What's a good technique for displaying a "loading..." image?

I am working with a div that has any number of img elements inside it. Right now, each img has the following CSS: #content > img { display: none; position: absolute; top: 0px; left: 0px; } And the images can be cycled-through with a function that shows and hides them in turn. While each image is loading, however, I'd like to display a...

How can this JavaScript snippet be improved?

Hi, This code (below) comes from an Open-source project (SemanticScuttle) I slightly modified the original code, attempting to convert a bookmarklet, into "web usable" Javascript. Current Status: Google Chrome = Works perfectly! Fiefox = Functional, but opens in a full sized tab, instead of the pre-defined size. IE = DOA = Not functi...

Is there a method to clone an array in jQuery?

This is my code : var a=[1,2,3] b=$.clone(a) alert(b) Doesn't jQuery have a 'clone' method? How can I clone an array using jQuery? ...

Problem in entering multiple E-Mail ID in A Single Field

Hi I had A field In Than i am enter the multiple e mail id using the automated dropdown . I refer this link "http://wick.sourceforge.net/wick_sample/" U get the Full view about my program in this link. In This all e-mail id's are stored in the variable collection. My problem is if i declare the E-mail id directly in the variable like ...

JavaScript question: Onbeforeunload or Onunload?

So I want to store some information in localstorage of a browser when the page is refreshed or the user exits the page for future use. I figured that I'd use some Javascript to detect the event and store the state of the page visit. Now my predicament is: shall i use Onbeforeunload or Onunload method to accomplish this objective? Tha...

How to animate or slide when replacing image src

I'm creating a gallery where user can browse next previous and reading image name from array like imgNumber1++ if (imgNumber1 == NumberOfImages) imgNumber1 = 0 document.images[refimg].src = img[imgNumber1] It is working fine but I want to animate or slide when replacing image src. How can I do t...

Logic for checking in-between two numbers

I would like to determine where the zone is given an arbitrary number. zones = [0, 150, 300, 400, 600, 800] function checkZone(mouseX) { // if mouseX is 321, it should be index 2 of zones array } ...

Why does SWFObject work in chrome yet not IE/FF? (example included)

Am I using the code improperly or is there a flaw in SWFObject? If you go to the URL below you can see that it the flash file (an MP3 player) shows up perfectly fine in Chrome. However, in both Firefox and IE8 it loads a blank white box. If you mouse over the box the pointer changes to a hand as if its registering the buttons, just not a...

How Did Dropbox Create Their Javascript Rollover Effect?

https://www.dropbox.com/ - their play button, how do they create that effect? From what I can see they are using: <script type="text/javascript" charset="utf-8"> document.observe("dom:loaded", function () { var play_link = $("playvideo"); play_link.observe("mouseover", function () { new Effect.Opacity...

Is there a way to make a semi-transparent div with dynamically placed "holes"

Hi there, I'm creating a page with 2 layers: an image layer and a "mask" layer on top of it which is semi transparent. I want to dynamically place a small rectangle "hole" in that mask so that the original image below it could be seen in that area. Is this possible? The final purpose a is to create an effect of a grayed out image that...

How does server-side Javascript 'render' a flash video embed code in a client browser?

So I'm a bit lost here... I'm dealing with a video hosting service that, rather then provide the traditional object/embed code, gives you a javascript/html code snippet that somehow renders an embed code within the client's browser. How does this work? Any insight/info would be appreciated as I need to reproduce this functionality for...

How does server tags work in javascript?

I have written a code function validate() { if(document.getElementById("<%=txtSearch.ClientID %>").value=="") { message="Enter the User Id To Search"; document.getElementById("<%=lblMessage.ClientID %>").innerHTML=message; return false; } Here I am using <%= %> tags. I want to know how do they work without making a trip to t...

Radio button and having a text box validation ruby on rail

Hi, This is currently the setup I have: <input id="demographics_questionary_gender_male" name="demographics_questionary[gender]" type="radio" value="Male"> Male <input id="demographics_questionary_gender_gender" name="demographics_questionary[gender]" type="radio" value="Female"> Female <input id="demographics_questionary_gender_male" ...

jquery bind submit event - find caller

Hi, How would I be able to find out the caller/sender of an event on binding. $(this).bind("submit", function(caller) { ... }); I found out that I could use "caller.originalEvent.explicitOriginalTarget", but this only works in firefox. EDIT: I'm using the jquery validation library from position-relative.net I want to make it so tha...

javascript not working with HTML5

I started to implement some new html5 features (standards, nothing fancy) in my project. Just the standard header, footer, aside, ect. For some reason a javascript code that I used on a past project doesn't work now and I can't figure out what the problem is. I compared the code (html/javascript) with my new project and the past project...

how to trigger onclick function in Html Check box when its status changed to checked.

Hi, I have a page which lists the Employee. In the left side of the list i have checkboxes to select. So, i have Select all checkbox also in header.When i click on select all check box it will selects all check boxes below. But i have javascript in onclick event for checkboxes in down not for select all checkbox. when i select all the ch...

Cannot programmatically load custom controls from parent master page to child master page

I am trying to apply a set of custom controls to a master page via code-behind during Page_Load, initializing the class and using Page.Header.Controls.Add(). I have another child master page between the parent and the content and this child master references directly in its own code a javascript file which calls a jQuery function (.ready...

Where is memory leak in JavaScript / jquery ?

Hello! I have two singletons: Search - performs the search functionality Topic - presentation of topics (search results) var Search = new function () { this.GetTopics = function () { var query = $("#globalSearch").val(); $.ajax({ url: 'Search/GetTopics', dataType: 'json', dat...