Click here to Skip to main content
15,915,093 members
Home / Discussions / Web Development
   

Web Development

 
QuestionAbout Microsoft ReportViewer Control in MSVS 2008 Pin
Hemant Thaker21-Aug-08 0:32
Hemant Thaker21-Aug-08 0:32 
GeneralFirebug and "evilness" Pin
Brady Kelly20-Aug-08 23:01
Brady Kelly20-Aug-08 23:01 
GeneralRe: Firebug and "evilness" Pin
Shog921-Aug-08 4:35
sitebuilderShog921-Aug-08 4:35 
GeneralRe: Firebug and "evilness" Pin
Brady Kelly21-Aug-08 5:00
Brady Kelly21-Aug-08 5:00 
Questionjavascript: Copy the selected text to notepad automatically Pin
jmohan20-Aug-08 22:23
jmohan20-Aug-08 22:23 
GeneralRe: javascript: Copy the selected text to notepad automatically Pin
Perspx20-Aug-08 23:53
Perspx20-Aug-08 23:53 
AnswerRe: javascript: Copy the selected text to notepad automatically Pin
Shog921-Aug-08 4:38
sitebuilderShog921-Aug-08 4:38 
Questioncss/java popup help. (scrolling) Pin
wizard 20220-Aug-08 17:32
wizard 20220-Aug-08 17:32 
i am trying to make a Random css/java popup.
i got the popup working but, i want to make it scroll with the page, and make it so it is center (so when you don't scroll it isn't in the center of the page, but in the center of the browser)

here is the code i am working with, what makes the popup random is in asp

css:
#blanket {
   background-color:#111;
   opacity: 0.65;
   position:absolute;
   z-index: 9001; /*ooveeerrrr nine thoussaaaannnd*/
   top:0px;
   left:0px;
   width:100%;
}
#popUpDiv {
	position:absolute;
	background-color:#eeeeee;
	width:300px;
	height:300px;
	z-index: 9002; /*ooveeerrrr nine thoussaaaannnd*/
}

here is the java

java:
function toggle(div_id) {
	var el = document.getElementById(div_id);
	if ( el.style.display == 'none' ) {	el.style.display = 'block';}
	else {el.style.display = 'none';}
}
function blanket_size(popUpDivVar) {
	if (typeof window.innerWidth != 'undefined') {
		viewportheight = window.innerHeight;
	} else {
		viewportheight = document.documentElement.clientHeight;
	}
	if ((viewportheight > document.body.parentNode.scrollHeight) && (viewportheight > document.body.parentNode.clientHeight)) {
		blanket_height = viewportheight;
	} else {
		if (document.body.parentNode.clientHeight > document.body.parentNode.scrollHeight) {
			blanket_height = document.body.parentNode.clientHeight;
		} else {
			blanket_height = document.body.parentNode.scrollHeight;
		}
	}
	var blanket = document.getElementById('blanket');
	blanket.style.height = blanket_height + 'px';
	var popUpDiv = document.getElementById(popUpDivVar);
	popUpDiv_height=blanket_height/2-150;//150 is half popup's height
	popUpDiv.style.top = popUpDiv_height + 'px';
}
function window_pos(popUpDivVar) {
	if (typeof window.innerWidth != 'undefined') {
		viewportwidth = window.innerHeight;
	} else {
		viewportwidth = document.documentElement.clientHeight;
	}
	if ((viewportwidth > document.body.parentNode.scrollWidth) && (viewportwidth > document.body.parentNode.clientWidth)) {
		window_width = viewportwidth;
	} else {
		if (document.body.parentNode.clientWidth > document.body.parentNode.scrollWidth) {
			window_width = document.body.parentNode.clientWidth;
		} else {
			window_width = document.body.parentNode.scrollWidth;
		}
	}
	var popUpDiv = document.getElementById(popUpDivVar);
	window_width=window_width/2-150;//150 is half popup's width
	popUpDiv.style.left = window_width + 'px';
}
function popup(windowname) {
	blanket_size(windowname);
	window_pos(windowname);
	toggle('blanket');
	toggle(windowname);		
}


finaly, the html

html:
<body onload="popup('popUpDiv')">
	<div id="blanket" style="display:none;"></div>
	<div id="popUpDiv" style="display:none;">
		<a href="#" onclick="popup('popUpDiv')">Click Me To Close</a>
		<font color="#FF0000"> Random event! o: </font>
	</div>	


i hope some one can help me with this o:
QuestionWebsite File Dependencies Tracker? Pin
hifiger200420-Aug-08 1:57
hifiger200420-Aug-08 1:57 
AnswerRe: Website File Dependencies Tracker? Pin
Johnny ²20-Aug-08 8:54
Johnny ²20-Aug-08 8:54 
QuestionAJAX Tool kit is not working Pin
ganeshMohan19-Aug-08 18:13
ganeshMohan19-Aug-08 18:13 
AnswerRe: AJAX Tool kit is not working Pin
Shog920-Aug-08 7:09
sitebuilderShog920-Aug-08 7:09 
QuestionWhy code can compiled successfully without mysql-connector-java-#-bin.jar installed Pin
cy163@hotmail.com19-Aug-08 17:00
cy163@hotmail.com19-Aug-08 17:00 
QuestionWhat's this hidden input tag in .Net? Pin
Mohammad Dayyan19-Aug-08 14:52
Mohammad Dayyan19-Aug-08 14:52 
AnswerRe: What's this hidden input tag in .Net? Pin
Bassam Saoud19-Aug-08 17:21
Bassam Saoud19-Aug-08 17:21 
QuestionCrystal Report in Web Form Pin
Hemant Thaker19-Aug-08 0:57
Hemant Thaker19-Aug-08 0:57 
Questioncopy file from one server to another Pin
Member 410217119-Aug-08 0:51
Member 410217119-Aug-08 0:51 
AnswerRe: copy file from one server to another Pin
dgreat121-Aug-08 4:52
dgreat121-Aug-08 4:52 
QuestionDays in a Month in Javascript Pin
.NET- India 19-Aug-08 0:50
.NET- India 19-Aug-08 0:50 
GeneralRe: Days in a Month in Javascript Pin
Perspx19-Aug-08 0:55
Perspx19-Aug-08 0:55 
AnswerRe: Days in a Month in Javascript Pin
Guffa19-Aug-08 11:53
Guffa19-Aug-08 11:53 
Questionhtml file control on Mac Firefox Pin
Saetan18-Aug-08 22:03
Saetan18-Aug-08 22:03 
AnswerRe: html file control on Mac Firefox Pin
Johnny ²18-Aug-08 22:58
Johnny ²18-Aug-08 22:58 
QuestionWhat are the different ways of sending a form to an email Pin
Christopher Clarke18-Aug-08 11:52
Christopher Clarke18-Aug-08 11:52 
AnswerRe: What are the different ways of sending a form to an email Pin
Perspx18-Aug-08 12:02
Perspx18-Aug-08 12:02 

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.