Link to home
Create AccountLog in
Avatar of gopalv
gopalvFlag for India

asked on

Div tag is not working mozilla

Hi ,


I am developed a silver light application in  c# with 3.5 Silver light version. I am using a master page which contains one div tag
 to display messages.

i am using one java script function  for display messages

      function ShowMessage(type, Message) {
          msgDiv.style.visibility = "visible";
          msgDiv.innerHTML = Message;

          if (type == 'red') {
              msgDiv.style.color = 'red';
              return;
          }
          if (type == 'blue') {
              msgDiv.style.color = 'blue';
              return;
          }
          if (type == 'green') {
              msgDiv.style.color = 'green';
              return;
          }
      }


I am using  following statement for calling this java script function

HtmlPage.Window.CreateInstance("ShowMessage", new string[] { "green", Message });

It is working in IE but not working in Mozilla
Avatar of BuggyCoder
BuggyCoder
Flag of India image

Is it calling the Javascript function or not???
If it wont work means try display property..
Eg.
msgDiv.style.display= "block";
ASKER CERTIFIED SOLUTION
Avatar of tlayton
tlayton
Flag of South Africa image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
What other code is in the code-behind file?  What is the value of Message when this line is called:

HtmlPage.Window.CreateInstance("ShowMessage", new string[] { "green", Message });

Open in new window


Have you used Firebug with Mozilla Firefox?  Opening the console on Firebug can help you track javascript errors.