Click here to Skip to main content
       

JavaScript

 
GeneralRe: HTML5 Javascript Issue PinmvpJohn Simmons / outlaw programmer3-Dec-12 7:40 
GeneralRe: HTML5 Javascript Issue PinmemberGraham Breach3-Dec-12 7:48 
GeneralRe: HTML5 Javascript Issue PinmvpJohn Simmons / outlaw programmer3-Dec-12 10:09 
GeneralRe: HTML5 Javascript Issue PinmemberGraham Breach3-Dec-12 12:02 
GeneralRe: HTML5 Javascript Issue PinmvpJohn Simmons / outlaw programmer3-Dec-12 16:20 
GeneralRe: HTML5 Javascript Issue PinmemberMedia2r18-Dec-12 1:51 
GeneralRe: HTML5 Javascript Issue PinmemberBrainiacV18-Dec-12 4:46 
GeneralRe: HTML5 Javascript Issue PinmvpJohn Simmons / outlaw programmer3-Dec-12 6:29 
GeneralRe: HTML5 Javascript Issue PinmvpJohn Simmons / outlaw programmer4-Dec-12 2:06 
GeneralRe: HTML5 Javascript Issue PinmvpJohn Simmons / outlaw programmer4-Dec-12 8:31 
GeneralRe: HTML5 Javascript Issue PinmemberZaf Khan19-Dec-12 21:36 
AnswerRe: HTML5 Javascript Issue PinmemberZaf Khan19-Dec-12 21:42 
QuestionCatching Exceptions in Javascript PinmemberVed Yo29-Nov-12 15:43 
QuestionPartial Overlay to cover ajax request PinmemberSentenryu29-Nov-12 2:51 
Hello everyone,
 
I'm searching for a way to do a overlay with a loading indicator cover only 1 div on the page.
 
the reason i want to do this is that i'll have multiple sections in my pages that will do ajax calls to the server to get data and display in fields, most will be calculation results, so i don't want to replace the div's content, just the field value.
 
in my searchs, i only found solutions for overlays that cover the entire screen, that's good, but i want the rest of the page to be accessible while the ajax request goes on the background.
 
right now, i've the following code to create a overlay:
 
 
var lockOverlayHtml = '<div class="overlayDiv"></div>';
 
var lockElement = (function (container) {
                      var element = $(container);
                      var overlay = $(lockOverlayHtml);
 
                      overlay.offset(element.offset());
                      overlay.height(element.outerHeight(false));
                      overlay.width(element.outerWidth(false));
                      overlay.appendTo(document.body);
                   });
 
problem is, i can't think in a way to remove only this overlay when the ajax request ends, as it can be used to cover any element on the screen and i can have multiple ones at a time.
 
what can i use to identify this overlay and remove it?
 
i thought in something like generating a id using the coordinates, is it a good idea?
 
also, don't know if i can ask this here, but the overlayDiv class looks like this:
 
.overlayDiv
{
    position: absolute;
    opacity: 0.5;
    z-index: 1000;
    background-color: #606060;
}
 
this will work even when the browser scrolls? or i need to do something else in that case?
I'm brazilian and english (well, human languages in general) aren't my best skill, so, sorry by my english. (if you want we can speak in C# or VB.Net =p)

QuestionHow to get value from TD PinmemberChitttapa26-Nov-12 11:03 
Questionhelp me please Pinmemberdoa'a_9224-Nov-12 5:16 
AnswerRe: help me please [modified] PinmemberLeon Munir25-Nov-12 14:46 
GeneralRe: help me please PinmemberJ4amieC25-Nov-12 22:13 
GeneralRe: help me please PinmemberLeon Munir26-Nov-12 3:06 
GeneralRe: help me please PinmemberJ4amieC26-Nov-12 6:30 
GeneralRe: help me please PinmemberMarcus Kramer26-Nov-12 6:37 
GeneralRe: help me please Pinmemberdoa'a_9226-Nov-12 10:28 
Questiononmouseover and document.getElementById PinmemberSRJ9223-Nov-12 5:18 
AnswerRe: onmouseover and document.getElementById PinmemberJ4amieC23-Nov-12 5:48 
GeneralRe: onmouseover and document.getElementById PinmemberSRJ9223-Nov-12 6:49 
AnswerRe: onmouseover and document.getElementById Pinmemberjainsachin30-Nov-12 10:17 
Questiondisplaying different contentunder single layout Pinmemberradha123 from Hyderabad23-Nov-12 4:32 
AnswerRe: displaying different contentunder single layout Pinmembermanojwadnere28-Dec-12 1:07 
QuestionRegular expression PinmemberMember 962181822-Nov-12 3:25 
AnswerRe: Regular expression [modified] Pinmembern.podbielski22-Nov-12 21:00 
GeneralRe: Regular expression PinmvpManfred R. Bihy22-Nov-12 22:20 
GeneralRe: Regular expression Pinmembern.podbielski23-Nov-12 22:15 
Questionform validation Pinmembertherainking7821-Nov-12 23:07 
AnswerRe: form validation PinmvpRichard MacCutchan21-Nov-12 23:17 
GeneralRe: form validation Pinmembertherainking7828-Nov-12 14:14 
AnswerRe: form validation PinmemberbVagadishnu28-Nov-12 12:14 
GeneralRe: form validation Pinmembertherainking7828-Nov-12 14:17 
Questionopeing a new window in JS after time interval PinmemberWaqasCheema21-Nov-12 0:36 
AnswerRe: opeing a new window in JS after time interval PinmemberAndrew Stoute30-Nov-12 5:51 
QuestionDraw circuit diagram using javascript Pinmemberanishkannan18-Nov-12 23:31 
AnswerRe: Draw circuit diagram using javascript Pinmembern.podbielski19-Nov-12 22:07 
Answerto transfer items in select list to another select list without duplicates Pinmemberraviteja999200014-Nov-12 21:09 
QuestionHow does Yandex do its trick? PinmemberXarzu14-Nov-12 20:42 
AnswerRe: How does Yandex do its trick? [modified] PinmvpManfred R. Bihy14-Nov-12 21:44 
Questiondisplay record from two different time Pinmemberuti123fil8-Nov-12 18:15 
AnswerRe: display record from two different time PinmvpRichard MacCutchan9-Nov-12 0:47 
QuestionAdding a month to the current date PinmemberSadiqMohammed7-Nov-12 0:48 
AnswerRe: Adding a month to the current date PinmemberRichard Deeming7-Nov-12 3:00 
GeneralRe: Adding a month to the current date PinmemberSadiqMohammed7-Nov-12 19:31 
GeneralRe: Adding a month to the current date PinmemberRichard Deeming8-Nov-12 3:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web04 | 2.8.141216.1 | Last Updated 18 Dec 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid