PDA

View Full Version : Help, Help, Help!


dizzyd
5-1-06, 05:39 PM
My website isn't working in IE anymore! I can view the source and it's all there, nothing truncated, but the page just simply won't display. Just a plain white page... I NEED HELP ASAP!

http://www.thepawn.com

Thanks,
David

dizzyd
5-1-06, 08:07 PM
come to find out it was this script which works just fine on this site: http://codelifter.com/main/javascript/dragablelayer.html
but not mine which was exactly copied over. I can get the div to show up but I cant move it around. Is it possibly because my page is php and the example page is html? here is the code:

<html>

<head>
<script language="JavaScript1.2">

// Script Source: CodeLifter.com
// Copyright 2003
// Do not remove this header

isIE=document.all;
isNN=!document.all&&document.getElementById;
isN4=document.layers;
isHot=false;

function ddInit(e){
topDog=isIE ? "BODY" : "HTML";
whichDog=isIE ? document.all.theLayer : document.getElementById("theLayer");
hotDog=isIE ? event.srcElement : e.target;
while (hotDog.id!="titleBar"&&hotDog.tagName!=topDog){
hotDog=isIE ? hotDog.parentElement : hotDog.parentNode;
}
if (hotDog.id=="titleBar"){
offsetx=isIE ? event.clientX : e.clientX;
offsety=isIE ? event.clientY : e.clientY;
nowX=parseInt(whichDog.style.left);
nowY=parseInt(whichDog.style.top);
ddEnabled=true;
document.onmousemove=dd;
}
}

function dd(e){
if (!ddEnabled) return;
whichDog.style.left=isIE ? nowX+event.clientX-offsetx : nowX+e.clientX-offsetx;
whichDog.style.top=isIE ? nowY+event.clientY-offsety : nowY+e.clientY-offsety;
return false;
}

function ddN4(whatDog){
if (!isN4) return;
N4=eval(whatDog);
N4.captureEvents(Event.MOUSEDOWN|Event.MOUSEUP);
N4.onmousedown=function(e){
N4.captureEvents(Event.MOUSEMOVE);
N4x=e.x;
N4y=e.y;
}
N4.onmousemove=function(e){
if (isHot){
N4.moveBy(e.x-N4x,e.y-N4y);
return false;
}
}
N4.onmouseup=function(){
N4.releaseEvents(Event.MOUSEMOVE);
}
}

function hideMe(){
if (isIE||isNN) whichDog.style.visibility="hidden";
else if (isN4) document.theLayer.visibility="hide";
}

function showMe(){
if (isIE||isNN) whichDog.style.visibility="visible";
else if (isN4) document.theLayer.visibility="show";
}

document.onmousedown=ddInit;
document.onmouseup=Function("ddEnabled=false");

</script>
</head>

<body>
<!-- BEGIN FLOATING LAYER CODE //-->
<div id="theLayer" style="position:absolute;width:250px;left:100;top:100;vis ibility:visible">
<table border="0" width="250" bgcolor="#424242" cellspacing="0" cellpadding="5">
<tr>
<td width="100%">
<table border="0" width="100%" cellspacing="0" cellpadding="0" height="36">
<tr>
<td id="titleBar" style="cursor:move" width="100%">
<ilayer width="100%" onSelectStart="return false">
<layer width="100%" onMouseover="isHot=true;if (isN4) ddN4(theLayer)" onMouseout="isHot=false">
<font face="Arial" color="#FFFFFF">Layer Title</font>
</layer>
</ilayer>
</td>
<td style="cursor:hand" valign="top">
<a href="#" onClick="hideMe();return false"><font color=#ffffff size=2 face=arial style="text-decoration:none">X</font></a>
</td>
</tr>
<tr>
<td width="100%" bgcolor="#FFFFFF" style="padding:4px" colspan="2">
<!-- PLACE YOUR CONTENT HERE //-->
This is where your content goes.<br>
It can be any html code or text.<br>
Remember to feed the reindeer.<br>
Avoid chewable giblet curtains.
<!-- END OF CONTENT AREA //-->
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<!-- END FLOATING LAYER CODE //-->
</body>

</html>

YvetteKuhns
5-1-06, 08:46 PM
Is it possibly because my page is php and the example page is html?

Can you post a link to your web page with and/or without the Javascript added?

topDog=isIE ? "BODY" : "HTML";
This line mentions HTML and your php page should still have the HTML tag in it. If you have more Javascript and CSS, the code may be working against each other.

dizzyd
5-1-06, 08:55 PM
sure. Here is with- http://www.thepawn.com
here is without- http://www.thepawn.com/jtest

YvetteKuhns
5-1-06, 09:19 PM
Yes, you have internal CSS - style tags in the HEAD of your source code that compete with your Javascript code that also uses style attributes in the code. And you have other Javascript code, but that doesn't appear to be a problem.

I never saw so many style tags in one page of source code! They can all appear in one opening and closing style tag. Or to save load time, you can use an external style sheet and use one line of code to call the file style.css. If you need to make changes, you only need to edit that one file!

You should specify your table attributes in your CSS. Also change the opening center tag to div align="center" and the closing center tag to the closing div tag. Your code is not up to date and may not render properly in all browsers - as you have already noticed.

stevel
5-1-06, 09:19 PM
Well, Firefox complains of numerous syntax errors in your stylesheet. (For starters, a stylesheet does NOT begin with a <style> tag!)

IE loads the page but shows broken images such as http://www.thepawn.com/auctions/uploadedimages/776115JVC_520_Watt_Amplifier.jpg in the list of auction items. Other than that, it looks pretty much the same as in Firefox.

dizzyd
5-2-06, 03:05 AM
Yvette- I know about the hundreds of style tags. In the first link which is the root to the domain you will notice that the style was changed and linked to a css file. and the second link had not had that change. It was the home page in the beta/testing phase. The error i'm currently trying to fix is that div-popup script that isn't working quite correctly. All i wanted was a popup like powweb had on the homepage and this was the closest I can get.

Steve- I see what you mean about the style sheet. All i basicly did was cut most of the styles from the head and put them in a css file to see if that would make my popup script work. So i didn't even take to time to format it correctly. But I will do. As far as the broken images go, I'm currently migrating to a different auction site. So those links are from the old site. the images are looking for the old auctions folder which isn't there anymore but the links are pulled from the DB. SO Its' a half/half situation. I just havent figured out how to show the featured auctions from the new site on my homepage. Anyway. Do you guys have any other ideas as to why that div script isn't working correctly. Thanks for the help thus far.

here is my header.php file where the problem would be:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<HEAD>
<TITLE>ThePawn.com | Welcome</TITLE>
<META NAME="description" CONTENT="thePAWN.com is the best world wide Auction, Shopping, and Adverstising site on the web. Our goal is to make one central auction/shopping center for everyone around the globe to find the item or product they need or want to sell.">
<META NAME="keywords" CONTENT="pawn, shop, auction, sell, buy, bid, trade, merchandise, auctions, ads, advertise, affiliate, international, pawnshop, shopping, plaza, online.">
<META HTTP-EQUIV="Content-Language" CONTENT="EN-US">
<META NAME="author" CONTENT="DizzyDProductions.com">
<META NAME="copyright" CONTENT="thePawn.com">
<META NAME="distribution" CONTENT="Global">
<META NAME="rating" CONTENT="General">
<META NAME="revisit" CONTENT="5 days">
<META NAME="expires" CONTENT="never">
<link rel="Shortcut Icon" href="/favicon.ico">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
@import url("/css/pawn.css");
-->
</style>
<script language="JavaScript 1.2">

// Script Source: CodeLifter.com
// Copyright 2003
// Do not remove this header

isIE=document.all;
isNN=!document.all&&document.getElementById;
isN4=document.layers;
isHot=false;

function ddInit(e){
topDog=isIE ? "BODY" : "HTML";
whichDog=isIE ? document.all.theLayer : document.getElementById("theLayer");
hotDog=isIE ? event.srcElement : e.target;
while (hotDog.id!="titleBar"&&hotDog.tagName!=topDog){
hotDog=isIE ? hotDog.parentElement : hotDog.parentNode;
}
if (hotDog.id=="titleBar"){
offsetx=isIE ? event.clientX : e.clientX;
offsety=isIE ? event.clientY : e.clientY;
nowX=parseInt(whichDog.style.left);
nowY=parseInt(whichDog.style.top);
ddEnabled=true;
document.onmousemove=dd;
}
}

function dd(e){
if (!ddEnabled) return;
whichDog.style.left=isIE ? nowX+event.clientX-offsetx : nowX+e.clientX-offsetx;
whichDog.style.top=isIE ? nowY+event.clientY-offsety : nowY+e.clientY-offsety;
return false;
}

function ddN4(whatDog){
if (!isN4) return;
N4=eval(whatDog);
N4.captureEvents(Event.MOUSEDOWN|Event.MOUSEUP);
N4.onmousedown=function(e){
N4.captureEvents(Event.MOUSEMOVE);
N4x=e.x;
N4y=e.y;
}
N4.onmousemove=function(e){
if (isHot){
N4.moveBy(e.x-N4x,e.y-N4y);
return false;
}
}
N4.onmouseup=function(){
N4.releaseEvents(Event.MOUSEMOVE);
}
}

function hideMe(){
if (isIE||isNN) whichDog.style.visibility="hidden";
else if (isN4) document.theLayer.visibility="hide";
}

function showMe(){
if (isIE||isNN) whichDog.style.visibility="visible";
else if (isN4) document.theLayer.visibility="show";
}

document.onmousedown=ddInit;
document.onmouseup=Function("ddEnabled=false");

</script>

</head>

<body topmargin="0" leftmargin="0" rightmargin="0" background="images/tile.gif">

<div id="theLayer" style="position:absolute;width:250px;left:100;top:100;vis ibility:visible">
<table border="0" width="250" bgcolor="#424242" cellspacing="0" cellpadding="5">
<tr>
<td width="100%">
<table border="0" width="100%" cellspacing="0" cellpadding="0" height="36">
<tr>
<td id="titleBar" style="cursor:move" width="100%">
<ilayer width="100%" onSelectStart="return false">
<layer width="100%" onMouseover="isHot=true;if (isN4) ddN4(theLayer)" onMouseout="isHot=false">
<font face="Arial" color="#FFFFFF">TESTING IN PROGRESS</font>
</layer>
</ilayer>
</td>
<td style="cursor:hand" valign="top">
<a href="#" onClick="hideMe();return false"><font color=#ffffff size=2 face=arial style="text-decoration:none">X</font></a>
</td>
</tr>
<tr>
<td width="100%" bgcolor="#FFFFFF" style="padding:4px" colspan="2">
<!-- PLACE YOUR CONTENT HERE //-->
to close this window, please <br>
click on the "X" located at the.<br>
top right corner of this window.<br>
thank you.
<!-- END OF CONTENT AREA //-->
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<div align="center">
<Table cellpadding="0" cellspacing="0" width="974" border="0" background="images/navibk.gif" class="headerborder">
<TR>
<TD align="right" valign="bottom">

<right>
<embed src="flash/navi.swf" height="72" width="974" scale="exactfit" wmode="transparent">
</div>

</td>
</tr></table></right>

<BR><BR>

</td></tr></table>


David

stevel
5-2-06, 11:10 AM
I don't understand what the problem is. What is not working for you? As I noted, the page looks the same in IE and Firefox to me. It is definitely not blank.

YvetteKuhns
5-2-06, 12:56 PM
All i basicly did was cut most of the styles from the head and put them in a css file to see if that would make my popup script work. So i didn't even take to time to format it correctly. But I will do....Do you guys have any other ideas as to why that div script isn't working correctly?

As I said before, I think that you must organize your CSS, because you are probably causing a conflict between your code and the style code in the Javascript.

I don't understand what the problem is. What is not working for you? As I noted, the page looks the same in IE and Firefox to me. It is definitely not blank.

I am currently comparing the pages in Firefox. The popup does not appear in jtest. The logo and links do not appear at the top. The free iPod banner ad does not appear. That is the problem.

dizzyd
5-2-06, 01:35 PM
This is the problem. It is no longer a problem comparing firefix and IE. The reason in the very begining that IE was showing a blank page was because the head of my file was loaded with style tags and then i put in javascr and it was too much for ie. Therefore i put all style in a .css. Fixed the blank page problem. Now all I am trying to fix at the moment is the first link that is posted near the top. Ignore the www.thepawn.com/jtest that link was for yvette she wanted to compare with the JS and without. So, why can't I move my div popup and center it on my page located here- http://www.thepawn.com ?

stevel
5-2-06, 02:29 PM
I see the free iPod Flash ad, though in MSIE, for some reason, I am not seeing the "Free iPod" text itself. Don't understand that one - might be an effect of the change in the way MSIE handles "interactive" external objects.

I suggest you take your "popup" question to the HTML section of the forum.

YvetteKuhns
5-2-06, 04:37 PM
The reason in the very begining that IE was showing a blank page was because the head of my file was loaded with style tags and then i put in javascr and it was too much for ie. Therefore i put all style in a .css. Fixed the blank page problem.

I saw the problem in both IE and Firefox. I was comparing the pages, not the browsers. The blank page problem is resolved. Good!

Now all I am trying to fix at the moment is the first link that is posted near the top...So, why can't I move my div popup and center it on my page?

Try to align your table or td to the center where the popup Javascript function is called. You have so many places where you are using positioning such as the DIV just after the opening BODY tag that there may still be code overriding other code.