Jump to content
Fórum Script Brasil
  • 0

Problema ao recuperar controle com JavaScript no IE7


Deise Vicentin

Question

Pessoal,

Tenho uma aplicação onde utilizo o Ajax Control Toolkit, e por eu usar o Update Panel, em determinado momento eu crio uma Progress Bar.

No IE8, IE9 e Firefox funciona corretamente, porém, no IE7 não consigo recuperar o componente criado.

Segue o código:

function InitializeRequest(sender, args) {

if (document.getElementById('ProgressDiv') != null)

$get('ProgressDiv').style.display = 'block';

else {

if(!ie)

createContorl();

}

}

function createContorl() {

var parentDiv = document.createElement("div");

parentDiv.setAttribute("class", "ModalProgressContainer");

parentDiv.setAttribute("Id", "ProgressDiv");

var innerContent = document.createElement("div");

innerContent.setAttribute("class", "ModalProgressContent");

var img = document.createElement("img");

img.setAttribute("src", "../Images/ajax_loader_circle02.gif");

var textDiv = document.createElement("div");

textDiv.innerHTML = '';

innerContent.appendChild(img);

innerContent.appendChild(textDiv);

parentDiv.appendChild(innerContent);

document.body.appendChild(parentDiv);

}

Mesmo já tendo a div criada com o id correto, quando faço essa verificação "if (document.getElementById('ProgressDiv') != null)" sempre é retornado um valor nulo. Alguém sabe porque isso acontece??

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Forum Statistics

    • Total Topics
      152.2k
    • Total Posts
      652k
×
×
  • Create New...