Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Coding Forum


You are currently viewing our Coding Forum as a guest. Please register to participate.
Login



Reply
DHTML Box (need help with size)
Old 12-05-2004, 05:24 AM DHTML Box (need help with size)
JulieXP's Avatar
Average Talker

Posts: 15
Trades: 0
I am trying to get this box to be 100% (full screen)
I tryed to change the tables, but it ran off the page.. .
So, then I went to the header to change the position of the box's location, but when someone has a different screen size, it also runs off the page.

what can i do to fix this problem?


Working DEMO:
http://www.dynamicdrive.com/dynamicindex11/dhtmlad.htm
JulieXP is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 12-05-2004, 08:00 AM
theshiznit's Avatar
Registered User

Posts: 214
Trades: 0
It looks like you can't change it.....But, in any way you would probalby have to change the table.
theshiznit is offline
Reply With Quote
View Public Profile
 
Old 12-05-2004, 06:04 PM
faze1's Avatar
Ultra Talker

Posts: 389
Trades: 0
Hello,

I didn't try to edit it myself but it looks like you can change height and width in the following line;

Code:
	if (ie){documentWidth  =truebody().offsetWidth/2+truebody().scrollLeft-20;
	documentHeight =truebody().offsetHeight/2+truebody().scrollTop-20;}	
	else if (ns){documentWidth=window.innerWidth/2+window.pageXOffset-20;
	documentHeight=window.innerHeight/2+window.pageYOffset-20;} 
	else if (w3){documentWidth=self.innerWidth/2+window.pageXOffset-20;
	documentHeight=self.innerHeight/2+window.pageYOffset-20;} 
	adDiv.left=documentWidth-200+calunit;adDiv.top =documentHeight-200+calunit;
	setTimeout("showAd()",100);}else closeAd();
Have you tried this yet?

Good luck,
__________________
[size=2]
Please login or register to view this content. Registration is FREE
- Webhosting - Focusing on quality service
faze1 is offline
Reply With Quote
View Public Profile Visit faze1's homepage!
 
Old 12-05-2004, 06:15 PM
JulieXP's Avatar
Average Talker

Posts: 15
Trades: 0
Yes, I had tried that but failed. That line only changes the position of where the box is located, but the problem is if a user has a different screen size, it it will move in different locations. Thanks for taking the time to look at it tho.
JulieXP is offline
Reply With Quote
View Public Profile
 
Old 12-06-2004, 02:11 AM
faze1's Avatar
Ultra Talker

Posts: 389
Trades: 0
Wow, I'm a little surprised that the line in red does not control the width and height of the document. If I get a chance tomorrow I'll play with it to see if I can figure out something else.

Good luck,
__________________
[size=2]
Please login or register to view this content. Registration is FREE
- Webhosting - Focusing on quality service
faze1 is offline
Reply With Quote
View Public Profile Visit faze1's homepage!
 
Old 12-07-2004, 01:38 AM
NateDogg's Avatar
Extreme Talker

Posts: 163
Trades: 0
I think this will work, I haven't tested it though. Remove all the /2, I hiLited them for you. This I believe to be setting the Width and the Height.
Code:
if(adCount<adTime*10){adCount+=1;
	if (ie){documentWidth  =truebody().offsetWidth/2+truebody().scrollLeft-20;
	documentHeight =truebody().offsetHeight/2+truebody().scrollTop-20;}	
	else if (ns){documentWidth=window.innerWidth/2+window.pageXOffset-20;
	documentHeight=window.innerHeight/2+window.pageYOffset-20;} 
	else if (w3){documentWidth=self.innerWidth/2+window.pageXOffset-20;
	documentHeight=self.innerHeight/2+window.pageYOffset-20;} 
	adDiv.left=documentWidth-200+calunit;adDiv.top =documentHeight-200+calunit;
	setTimeout("showAd()",100);}else closeAd();
}
__________________
Nathan


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE
NateDogg is offline
Reply With Quote
View Public Profile
 
Old 12-08-2004, 06:13 PM
JulieXP's Avatar
Average Talker

Posts: 15
Trades: 0
Thank you NateDogg, Ill give it a try as soon as I get home.
JulieXP is offline
Reply With Quote
View Public Profile
 
Old 12-10-2004, 01:42 AM
JulieXP's Avatar
Average Talker

Posts: 15
Trades: 0
your right natedogg, it has to do with that and the rest of the numbers followed by it.

(the off set 20)

im not sure how to read these codes i been trying to 2 days to get it where i want it
can you lend me a hand. im here pulling out my hair playing with these codes
im trying to get this to cover up the whole screen in the middle for screen size (1152x864)



HTML Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<style type="text/css">
<!--
#sponsorAdDiv {position:absolute; height:1096px; width:1504px; top:-16px; left:-292px;}
body {
	background-color: #00FFFF;
}
-->
</style>

<script type="text/javascript">

/******************************************
* DHTML Ad Box (By Matt Gabbert at http://www.nolag.com)
* Visit http://www.dynamicdrive.com/ for full script
* This notice must stay intact for use
******************************************/

adTime=10;  // seconds ad reminder is shown
chanceAd=1; // ad will be shown 1 in X times (put 1 for everytime)

var ns=(document.layers);
var ie=(document.all);
var w3=(document.getElementById && !ie);
var calunit=ns? "" : "px"
adCount=0;
function initAd(){
	if(!ns && !ie && !w3) return;
	if(ie)		adDiv=eval('document.all.sponsorAdDiv.style');
	else if(ns)	adDiv=eval('document.layers["sponsorAdDiv"]');
	else if(w3)	adDiv=eval('document.getElementById("sponsorAdDiv").style');
	randAd=Math.ceil(Math.random()*chanceAd);
        if (ie||w3)
        adDiv.visibility="visible";
        else
        adDiv.visibility ="show";
	if(randAd==1) showAd();
}
function showAd(){
if(adCount<adTime*10){adCount+=1;
	if (ie){documentWidth  =truebody().offsetWidth/2+truebody().scrollLeft-305;
	documentHeight =truebody().offsetHeight/2+truebody().scrollTop-100;}	
	else if (ns){documentWidth=window.innerWidth/2+window.pageXOffset-20;
	documentHeight=window.innerHeight/2+window.pageYOffset-20;} 
	else if (w3){documentWidth=self.innerWidth/2+window.pageXOffset-20;
	documentHeight=self.innerHeight/2+window.pageYOffset-20;} 
	adDiv.left=documentWidth-200+calunit;adDiv.top =documentHeight-200+calunit;
	setTimeout("showAd()",100);}else closeAd();
}
function closeAd(){
if (ie||w3)
adDiv.display="none";
else
adDiv.visibility ="hide";
}

function truebody(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

onload=initAd;
//End-->
</script>
</head>

<body>
<div id="sponsorAdDiv" style="visibility:hidden">
<table width="100%" height="100%" bgcolor="#000000">
  <tr><td width="1534" height="600">
<table width="100%" height="100%" bgcolor="#F0FFF0">
  <tr><td align="center" valign="middle">

<!--*****EDIT THIS MESSAGE*****-->
<A HREF="http://www.amazon.com/exec/obidos/redirect-home/wa0c?tag-id=wa0c&placement=home-btn-100x70.gif&site=amazon">
<IMG SRC="http://www.associmg.com/assoc/us/home-btn-100x70.gif?tag-id=wa0c"></A><p><b>Please take time to show your support<br>
for this site by visiting one<br>
of our sponsors during this<br> brief intermission.</b>
</p>
<p><A HREF="http://www.amazon.com/exec/obidos/redirect-home/wa0c?tag-id=wa0c&placement=home-logo-130x60b.gif&site=amazon">
<IMG SRC="http://www.associmg.com/assoc/us/home-logo-130x60b.gif?tag-id=wa0c"></A></p>
<p>(This announcement will close shortly)
<br>

<!--*****EDIT THE ABOVE MESSAGE*****-->
</td></tr></table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p></td>
  </tr></table>
</div></body>
</html>
JulieXP is offline
Reply With Quote
View Public Profile
 
Old 12-10-2004, 04:28 PM
NateDogg's Avatar
Extreme Talker

Posts: 163
Trades: 0
Try changing the script portion to this.

Code:
<script type="text/javascript">
/****************************************** 
* DHTML Ad Box (By Matt Gabbert at http://www.nolag.com) 
* Visit http://www.dynamicdrive.com/ for full script 
* This notice must stay intact for use 
*******************************************
* edited by Nathan Koop
******************************************/ 

	adTime=5; // seconds ad reminder is shown 
	chanceAd=1; 
	// ad will be shown 1 in X times (put 1 for everytime) 

	var ns=(document.layers); 
	var ie=(document.all); 
	var w3=(document.getElementById && !ie); 
	var calunit=ns? "" : "px";
	adCount=0;

	function initAd()
	{
	 if(!ns && !ie && !w3) return; 
	 if(ie) adDiv=eval('document.all.sponsorAdDiv.style'); 
	 else if(ns) adDiv=eval('document.layers["sponsorAdDiv"]'); 
	 else if(w3) adDiv=eval('document.getElementById("sponsorAdDiv").style');
	 randAd=Math.ceil(Math.random()*chanceAd); 
	 if (ie||w3) adDiv.visibility="visible"; 
	 else adDiv.visibility ="show"; 
	 if(randAd==1) showAd(); 
	} 

	function showAd()
	{
	 if(adCount<adTime*10)
	 {
		adCount+=1; 
		if (ie)
		{ 
		 documentWidth = truebody().offsetWidth;
		 documentHeight = truebody().offsetHeight;
		} 
		else if (ns)
		{

		 documentWidth=window.innerWidth+window.pageXOffset-20; 
		 documentHeight=window.innerHeight+window.pageYOffset-20;
		} 
		else if (w3)
		{
		 documentWidth=self.innerWidth;
		 documentHeight=self.innerHeight;
		}
		adDiv.left=0;
		adDiv.width=documentWidth;
		adDiv.top =0;
		adDiv.height=documentHeight;
		setTimeout("showAd()",100);
		}
	 else closeAd();
	} 

	function closeAd()
	{
	 if (ie||w3) adDiv.display="none"; 
	 else adDiv.visibility ="hide"; 
	} 

	function truebody()
	{
	 return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body 
	} 

</script>
I don't have NS so I couldn't test it but IE and the W3C both look fine.

Anything else PM me.
__________________
Nathan


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE
NateDogg is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to DHTML Box (need help with size)
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.49170 seconds with 12 queries