Click here to Skip to main content
15,884,298 members
Home / Discussions / JavaScript
   

JavaScript

 
GeneralRe: HTML5 Javascript Issue Pin
BrainiacV18-Dec-12 3:46
BrainiacV18-Dec-12 3:46 
GeneralRe: HTML5 Javascript Issue Pin
#realJSOP3-Dec-12 5:29
mve#realJSOP3-Dec-12 5:29 
GeneralRe: HTML5 Javascript Issue Pin
#realJSOP4-Dec-12 1:06
mve#realJSOP4-Dec-12 1:06 
GeneralRe: HTML5 Javascript Issue Pin
#realJSOP4-Dec-12 7:31
mve#realJSOP4-Dec-12 7:31 
GeneralRe: HTML5 Javascript Issue Pin
Zaf Khan19-Dec-12 20:36
Zaf Khan19-Dec-12 20:36 
AnswerRe: HTML5 Javascript Issue Pin
Zaf Khan19-Dec-12 20:42
Zaf Khan19-Dec-12 20:42 
QuestionCatching Exceptions in Javascript Pin
Ved Yo29-Nov-12 14:43
Ved Yo29-Nov-12 14:43 
QuestionPartial Overlay to cover ajax request Pin
Sentenryu29-Nov-12 1:51
Sentenryu29-Nov-12 1: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:

JavaScript
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:

CSS
.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 Pin
Chitttapa26-Nov-12 10:03
Chitttapa26-Nov-12 10:03 
Questionhelp me please Pin
nth9224-Nov-12 4:16
nth9224-Nov-12 4:16 
AnswerRe: help me please Pin
Leon Munir25-Nov-12 13:46
Leon Munir25-Nov-12 13:46 
GeneralRe: help me please Pin
J4amieC25-Nov-12 21:13
J4amieC25-Nov-12 21:13 
GeneralRe: help me please Pin
Leon Munir26-Nov-12 2:06
Leon Munir26-Nov-12 2:06 
GeneralRe: help me please Pin
J4amieC26-Nov-12 5:30
J4amieC26-Nov-12 5:30 
GeneralRe: help me please Pin
fjdiewornncalwe26-Nov-12 5:37
professionalfjdiewornncalwe26-Nov-12 5:37 
GeneralRe: help me please Pin
nth9226-Nov-12 9:28
nth9226-Nov-12 9:28 
Questiononmouseover and document.getElementById Pin
SRJ9223-Nov-12 4:18
SRJ9223-Nov-12 4:18 
AnswerRe: onmouseover and document.getElementById Pin
J4amieC23-Nov-12 4:48
J4amieC23-Nov-12 4:48 
GeneralRe: onmouseover and document.getElementById Pin
SRJ9223-Nov-12 5:49
SRJ9223-Nov-12 5:49 
AnswerRe: onmouseover and document.getElementById Pin
sachin_jain30-Nov-12 9:17
sachin_jain30-Nov-12 9:17 
Questiondisplaying different contentunder single layout Pin
radha123 from Hyderabad23-Nov-12 3:32
radha123 from Hyderabad23-Nov-12 3:32 
AnswerRe: displaying different contentunder single layout Pin
manojwadnere28-Dec-12 0:07
manojwadnere28-Dec-12 0:07 
QuestionRegular expression Pin
Member 962181822-Nov-12 2:25
Member 962181822-Nov-12 2:25 
AnswerRe: Regular expression Pin
n.podbielski22-Nov-12 20:00
n.podbielski22-Nov-12 20:00 
GeneralRe: Regular expression Pin
Manfred Rudolf Bihy22-Nov-12 21:20
professionalManfred Rudolf Bihy22-Nov-12 21:20 

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

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