Click here to Skip to main content
15,868,164 members
Home / Discussions / JavaScript
   

JavaScript

 
QuestionWhat's the difference between "prototype" and "__proto__"? Pin
yumeng.liu27-Jun-12 22:09
yumeng.liu27-Jun-12 22:09 
AnswerRe: What's the difference between "prototype" and "__proto__"? Pin
Richard MacCutchan27-Jun-12 22:39
mveRichard MacCutchan27-Jun-12 22:39 
GeneralRe: What's the difference between "prototype" and "__proto__"? Pin
Richard MacCutchan2-Mar-20 21:06
mveRichard MacCutchan2-Mar-20 21:06 
QuestionMoving an object vertically Pin
crzybug27-Jun-12 17:34
crzybug27-Jun-12 17:34 
AnswerRe: Moving an object vertically Pin
Peter_in_278027-Jun-12 18:18
professionalPeter_in_278027-Jun-12 18:18 
GeneralRe: Moving an object vertically Pin
crzybug30-Jun-12 12:51
crzybug30-Jun-12 12:51 
QuestionHow to Show a Div in JavaScript or JQuery Pin
Vimalsoft(Pty) Ltd18-Jun-12 12:15
professionalVimalsoft(Pty) Ltd18-Jun-12 12:15 
AnswerRe: How to Show a Div in JavaScript or JQuery Pin
enhzflep18-Jun-12 14:36
enhzflep18-Jun-12 14:36 
Hmmmm. It does seem a bit strange.

Are you able to see other content in the table? I'm wondering if there's something else keeping it hidden. I.e if the table was display:none then the div will never show.

This code works for me in Chrome 19 and IE7

HTML
<html>
<head>
<script>
function byId(e) {return document.getElementById(e);}

function unhide(elementId)
{
	var tgt = byId(elementId);
	tgt.style.display = 'block';
}

function hide(elementId)
{
	var tgt = byId(elementId);
	tgt.style.display = 'none';
}

function onShowBtn()
{
	unhide("myHidden");
	hide("showBtnDiv");
	unhide("hideBtnDiv");
}

function onHideBtn()
{
	hide("myHidden");
	unhide("showBtnDiv");
	hide("hideBtnDiv");
}
</script>
</head>

<body>
	<table>
		<tr>
			<td> Hidden -> </td>
			<td>
				<div id="myHidden" style="display:none">
					random random random<br/>
				</div>
			</td>
		</tr>
		<tr>
			<td> 
				<div id="showBtnDiv">
					<input type="button" onclick="onShowBtn();" value="Show"/>
				</div>
			</td>
			<td>
				<div id="hideBtnDiv" style="display:none;">
					<input type="button" onclick="onHideBtn();" value="Hide"/>
				</div>
			</td>
		</tr>
</body>
</html>

GeneralRe: How to Show a Div in JavaScript or JQuery Pin
Vimalsoft(Pty) Ltd18-Jun-12 20:18
professionalVimalsoft(Pty) Ltd18-Jun-12 20:18 
GeneralRe: How to Show a Div in JavaScript or JQuery Pin
enhzflep18-Jun-12 20:24
enhzflep18-Jun-12 20:24 
Questionjava script can't receive an event from MFC activex? Pin
creative2617-Jun-12 22:04
creative2617-Jun-12 22:04 
QuestionPython Bulk-Renamer for Date-Modified Pin
johtnkucz10-Jun-12 0:41
johtnkucz10-Jun-12 0:41 
AnswerRe: Python Bulk-Renamer for Date-Modified Pin
Diana Weiss13-Jun-12 1:49
Diana Weiss13-Jun-12 1:49 
QuestionPlotting libraries - spider plots Pin
Wjousts6-Jun-12 4:12
Wjousts6-Jun-12 4:12 
GeneralChange the wallpaper Pin
Weli055-Jun-12 17:18
Weli055-Jun-12 17:18 
GeneralRe: Change the wallpaper Pin
enhzflep5-Jun-12 18:25
enhzflep5-Jun-12 18:25 
GeneralRe: Change the wallpaper Pin
Weli055-Jun-12 21:53
Weli055-Jun-12 21:53 
GeneralRe: Change the wallpaper Pin
enhzflep6-Jun-12 0:19
enhzflep6-Jun-12 0:19 
AnswerRe: Change the wallpaper Pin
Weli056-Jun-12 6:31
Weli056-Jun-12 6:31 
QuestionHTML 5 Tutorial Pin
pix_programmer1-Jun-12 20:56
pix_programmer1-Jun-12 20:56 
AnswerRe: HTML 5 Tutorial Pin
Ali Al Omairi(Abu AlHassan)3-Jun-12 20:08
professionalAli Al Omairi(Abu AlHassan)3-Jun-12 20:08 
AnswerRe: HTML 5 Tutorial Pin
berba4-Jun-12 21:43
berba4-Jun-12 21:43 
Questionpassing argument from javascript Pin
dineshbabub1-Jun-12 0:55
dineshbabub1-Jun-12 0:55 
AnswerRe: passing argument from javascript Pin
Manfred Rudolf Bihy1-Jun-12 3:11
professionalManfred Rudolf Bihy1-Jun-12 3:11 
GeneralRe: passing argument from javascript Pin
dineshbabub3-Jun-12 18:13
dineshbabub3-Jun-12 18:13 

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.