Click here to Skip to main content
15,914,452 members
Home / Discussions / JavaScript
   

JavaScript

 
GeneralRe: get input text value on text change Pin
Shantanu Gupta 13378-Aug-10 6:11
Shantanu Gupta 13378-Aug-10 6:11 
GeneralRe: get input text value on text change Pin
Sandeep Mewara8-Aug-10 6:29
mveSandeep Mewara8-Aug-10 6:29 
GeneralRe: get input text value on text change [modified] Pin
Shantanu Gupta 13378-Aug-10 7:03
Shantanu Gupta 13378-Aug-10 7:03 
GeneralRe: get input text value on text change Pin
Not Active8-Aug-10 7:35
mentorNot Active8-Aug-10 7:35 
QuestionAdobe plug-in IE browser Pin
nlarson116-Aug-10 8:45
nlarson116-Aug-10 8:45 
QuestionShow and hide DIV tag Pin
Dave McCool5-Aug-10 13:15
Dave McCool5-Aug-10 13:15 
AnswerRe: Show and hide DIV tag Pin
Not Active5-Aug-10 15:18
mentorNot Active5-Aug-10 15:18 
AnswerRe: Show and hide DIV tag Pin
NeverHeardOfMe5-Aug-10 21:56
NeverHeardOfMe5-Aug-10 21:56 
Personally, I would forget about Netscape users. Anypme that still uses Netscape 4 gets what they deserve.... And while JQuery is good, it won't help you understand anything, and IMHO is a bit like using a sledgehammer to crack a nut, in this scenario anyway.

The following will work in most browsers - you won't get too many complaints. NB, you don't, of course, need to pass the element ID's as variables to the toggle function, but could hard-code them within - but doing so makes it more generic for use elsewhere, or with more than one such show/hide link on the same page.

<html>
<head>
    <title></title> 
<script language="javascript">
  function toggleDiv(d, h) {
     var div = document.getElementById(d);
     var lnk = document.getElementById(h);
	 if (div.style.display == 'none') {
	   div.style.display = 'inline';
	   lnk.innerHTML = 'Hide';
	 } else {
	   div.style.display = 'none';
	   lnk.innerHTML = 'Show';
	 }
  }
</script>
</head>
<body>
<form id="form1" >
    <div><p><a href="#" id="lnk" onclick="toggleDiv('fred','lnk')">Show</a></p></div>
    <div id="fred" style="display:none;">Now you see me</div>
</form>
</body>
</html>

AnswerRe: Show and hide DIV tag Pin
koolprasad20039-Aug-10 21:18
professionalkoolprasad20039-Aug-10 21:18 
Questionsend email with no further parameters Pin
Hemant Thaker5-Aug-10 0:49
Hemant Thaker5-Aug-10 0:49 
AnswerRe: send email with no further parameters Pin
Sandeep Mewara8-Aug-10 3:21
mveSandeep Mewara8-Aug-10 3:21 
QuestionHow to close all pop-up on click on logout Pin
InderK4-Aug-10 8:01
InderK4-Aug-10 8:01 
AnswerRe: How to close all pop-up on click on logout Pin
Not Active4-Aug-10 8:45
mentorNot Active4-Aug-10 8:45 
GeneralRe: How to close all pop-up on click on logout Pin
InderK4-Aug-10 18:07
InderK4-Aug-10 18:07 
GeneralRe: How to close all pop-up on click on logout Pin
Not Active5-Aug-10 2:21
mentorNot Active5-Aug-10 2:21 
GeneralRe: How to close all pop-up on click on logout Pin
InderK5-Aug-10 2:37
InderK5-Aug-10 2:37 
AnswerRe: How to close all pop-up on click on logout Pin
Prosanta Kundu online4-Aug-10 19:58
Prosanta Kundu online4-Aug-10 19:58 
QuestionHelp : Dynamically maintaining left position Pin
Chakouri3-Aug-10 20:11
Chakouri3-Aug-10 20:11 
AnswerRe: Help : Dynamically maintaining left position Pin
Prosanta Kundu online4-Aug-10 19:55
Prosanta Kundu online4-Aug-10 19:55 
QuestionCheck file in JavaScript Pin
ShafiqA2-Aug-10 22:54
ShafiqA2-Aug-10 22:54 
AnswerRe: Check file in JavaScript Pin
koolprasad20033-Aug-10 4:05
professionalkoolprasad20033-Aug-10 4:05 
GeneralRe: Check file in JavaScript Pin
ShafiqA3-Aug-10 18:10
ShafiqA3-Aug-10 18:10 
AnswerRe: Check file in JavaScript Pin
Yusuf4-Aug-10 5:35
Yusuf4-Aug-10 5:35 
QuestionHow to detect .msi file ? Pin
002comp2-Aug-10 0:54
002comp2-Aug-10 0:54 
AnswerRe: How to detect .msi file ? Pin
daveyerwin2-Aug-10 7:28
daveyerwin2-Aug-10 7:28 

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.