Discussions

XML & Web services: Layers using DIV tag with javascript

  1. Layers using DIV tag with javascript (3 messages)

    Hi, I had a problem like this. i put an anchor element in a web page like ADD. when i click on this link, a layer of something should cover this link and some sorrounding area. i came to know that this can be done using javascript and DIV tag. Can anyone help me how this can be done ie any one can send me code of that. i know that its possible in AJAX also. But i dont want ajax bcz i know nothing about. please help me.
  2. With you question, I understood that you want to disable that be covering it with a div. If that is the case, you can write the div block surrounding that part of html and by default set the display as none. but when u click on the link, call a java script function to change the style of the div element to make its display attribute block.
  3. Hi Teja, Can you send me javascript code how to do it. I know how to use DIV tag. Please send me the javascript code. Thank you.
  4. Hope this could help you.... <script language=javascript type='text/javascript'> function hideDiv() { if (document.getElementById) { // DOM3 = IE5, NS6 document.getElementById('hideShow').style.visibility = 'hidden'; } else { if (document.layers) { // Netscape 4 document.hideShow.visibility = 'hidden'; } else { // IE 4 document.all.hideShow.style.visibility = 'hidden'; } } } function showDiv() { if (document.getElementById) { // DOM3 = IE5, NS6 document.getElementById('hideShow').style.visibility = 'visible'; } else { if (document.layers) { // Netscape 4 document.hideShow.visibility = 'visible'; } else { // IE 4 document.all.hideShow.style.visibility = 'visible'; } } } </script> --Teja