Help - Search - Members - Calendar
Full Version: Can you check my code?
HTMLHelp Forums > Web Authoring > Markup (HTML, XHTML, XML)
Guided
I have a website that has been working fine but when I edited my code recentally I get an error on the page and it would load. When I revert back to a VERY old version of my code it works fine but the current and only other copy I have it won't. I was hoping somebody here could spot what is making my code malfuntion! Thanks a bunch!

CODE


<HTML>
<HEAD>
<META NAME="Author" CONTENT="Shauna">
<META NAME="Generator" CONTENT="Macromedia Dreamweaver 8">
<META NAME="Description" CONTENT="A Dax Shepard Fan Site!">
<meta http-equiv="imagetoolbar" content="no">
<title>Dax Web</title>
<link rel="stylesheet" href="http://xdaxwebx.atspace.com/daxweb.css" type="text/css">
<script type="text/javascript">
/****************************************************
* DOM Image rollover:
* by Chris Poole
* http://chrispoole.com
* Script featured on http://www.dynamicdrive.com
* Keep this notice intact to use it :-)
****************************************************/

function init() {
if (!document.getElementById) return
var imgOriginSrc;
var imgTemp = new Array();
var imgarr = document.getElementsByTagName('img');
for (var i = 0; i < imgarr.length; i++) {
if (imgarr[i].getAttribute('hsrc')) {
imgTemp[i] = new Image();
imgTemp[i].src = imgarr[i].getAttribute('hsrc');
imgarr[i].onmouseover = function() {
imgOriginSrc = this.getAttribute('src');
this.setAttribute('src',this.getAttribute('hsrc'))
}
imgarr[i].onmouseout = function() {
this.setAttribute('src',imgOriginSrc)
}
}
}
}
onload=init;
</script>
<script>

/*
Gradual-Highlight Image Script II-
By J. Mark Birenbaum (birenbau@ugrad.cs.ualberta.ca)
Permission granted to Dynamicdrive.com to feature script in archive
For full source to script, visit http://dynamicdrive.com
*/

nereidFadeObjects = new Object();
nereidFadeTimers = new Object();

/* object - image to be faded (actual object, not name);
* destop - destination transparency level (ie 80, for mostly solid)
* rate - time in milliseconds between trasparency changes (best under 100)
* delta - amount of change each time (ie 5, for 5% change in transparency)
*/

function nereidFade(object, destOp, rate, delta){
if (!document.all)
return
if (object != "[object]"){ //do this so I can take a string too
setTimeout("nereidFade("+object+","+destOp+","+rate+","+delta+")",0);
return;
}

clearTimeout(nereidFadeTimers[object.sourceIndex]);

diff = destOp-object.filters.alpha.opacity;
direction = 1;
if (object.filters.alpha.opacity > destOp){
direction = -1;
}
delta=Math.min(direction*diff,delta);
object.filters.alpha.opacity+=direction*delta;

if (object.filters.alpha.opacity != destOp){
nereidFadeObjects[object.sourceIndex]=object;
nereidFadeTimers[object.sourceIndex]=setTimeout("nereidFade(nereidFadeObjects["+object.sourceIndex+"],"+destOp+","+rate+","+delta+")",rate);
}
}

</script>
<script>

//Hide status bar msg II script- by javascriptkit.com
//Visit JavaScript Kit (http://javascriptkit.com) for script
//Credit must stay intact for use

function hidestatus(){
window.status='Officially the coolest unofficial Dax fan site.'
return true
}

if (document.layers)
document.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT)

document.onmouseover=hidestatus
document.onmouseout=hidestatus
</script>
<link rel="shortcut icon" href="/favicon.ico" >
<style type="text/css">
<!--
.style1 {
color: #336699;
font-family: Verdana, Arial, Helvetica, sans-serif;
}
.style3 {color: #C9D4E8}
.style4 {
color: #95A4C1;
font-weight: bold;
}
.shauna {color: #95A4C1}
.style5 {color: #FBA165}
.style7 {color: #FABF93}
.style8 {color: #fabf93}
.style9 {font-size: 14pt}
.style10 {color: #FABF93; font-family: verdana; }
.style14 {color: #FABF93; font-weight: bold; }
-->
</style>
</HEAD>



<body>
<script language="javascript">
//<!--

-->
</script>
<span style="position: absolute; top: 0; left:0; width: 700;"><img src="http://i35.photobucket.com/albums/d187/xdaxwebx/daxweb2bgb.jpg" width="796" height="597" border="0" usemap="#map1"></span>
<map name="map1">
<area shape="RECT" coords="4,339,45,357" href="http://xdaxwebx.atspace.com" title="">
<area shape="RECT" coords="63,336,142,362" href="http://xdaxwebx.atspace.com/bio2.html" title="">
<area shape="RECT" coords="156,335,242,365" href="http://xdaxwebx.atspace.com/film2.html" title="">
<area shape="RECT" coords="256,338,322,359" href="http://xdaxwebx.atspace.com/pics2.html" title="">
<area shape="RECT" coords="336,335,402,363" href="http://xdaxwebx.atspace.com/graphics.html" title="">
<area shape="RECT" coords="417,337,466,359" href="http://xdaxwebx.atspace.com/links2.html" title="">
<area shape="RECT" coords="477,338,508,360" href="http://xdaxwebx.atspace.com/me.html" title="">
</map>
<div style="position: absolute; top: 0; left:0; width: 700;"></div>

<div class="style10" style="position: absolute; top:30px; left:517px; width: 215px; height: 330px;">
<p> </p>
<p><span class="style9">Updates</span>.</p>
<p>-12-17-06: Check out: </p>
<DIV align="left">  http://www.myspace.com/xdaxwebx  </DIV>
<p>The new Dax Web myspace~ </p>
<p>~ 12-7-06: I added 2 new icons under "Graphics". Check them out! Also added two movies to the Filmography section.</p>
<p><BR>
~
12-1-06: I'm liking this a lot better. P.S. if you notice something not working right or if it looks off, please email me. I won't have a chance to go through everything tonight.</p>
<p>~ 11-22-06: Testing.</p>
<p> </p>
<p> </p>
<p> </p>
</div>

<div style="position: absolute; top:364px; left:12px; width: 461;">



<div class="blogheader01 style1 style5">Dax Web </div>
<div class="style14"> December 17, 2006 </div>
<div align="center"><BR>
<p class="style7">I created an unofficial Dax Shepard fan MySpace! Check it out and friend it!
</p>
<DIV align="left" class="style7">
<div align="center"></div>
</DIV>
<p class="style7"> <BR>
<BR>
</p>
</div>
<div class="style14"></div>
<div align="center" class="style7"><div align="center" class="style7">
<div class="style14">
<div align="left">December 7, 2006 </div>
</div>
<div align="center"><BR>
<p class="style7">Check out this promotional video for Let's Go To Prison starring Dax Shepard . <a href="http://www.collegehumor.com/video:1725096">Video</a>. </p>
<p class="style7">Also, I added some information to the biography, just random bits of information I found from interviews with Dax online. Finally, I'm hoping to be able to interview Dax specifically for this site. That'll be my new years resolution. </p>
</div>
<p> </p>
</div>
<div class="style14">
<div align="left">December 1, 2006 </div>
</div>
<div align="center" class="style7">
<p><BR>
Okay. If you happened to catch a glimpse of the previous layout that I was going to use, you might notice some
similarities. I like this one much better though. The other one was missing something, in my humble opinion, and this one captures
more of what I want. The rest of the pages will be switched over to this style as soon as possible. If you have a chance, please
email me your opinion of the new layout!</p>
<p>Also, if you want to visit the old site the link is <a href="http://xdaxwebx.atspace.com/home.html">clickity</a>. Everything is the same except the picture sub sites and if you click home it'll send you back here. </p>
<div align="center" class="style7">
<div class="style14">
<div align="left">November 22, 2006</div>
</div>
<p>Hello! I'll leave this message here because I'm lazy. Just testing the new layout. <b>
<!-- no full story-->
</b></p>
</div>
</div>
<p><BR>
<BR>
</p>
</div>
<BR>
<BR>
</diV>
<div style="position: absolute; top:362px; left:518px; width:228; background-color: #F87F2E; layer-background-color: #F87F2E; border: 1px none #000000;">



<div class="navi style3"><span class="style7">Hello!</span></div>
<center>
<span class="style8">Thanks for visiting! This site is for all the Dax fans out there who are tired of googling him to no avail. To only find generic sites with the same ol' biography. This is for the true fans. Welcome and enjoy your stay. </span><span class="style4"><BR>
</span><BR>
<BR>
</center>
<div class="navi"><span class="style7">Affiliates:</span></div>
<span class="shauna"><BR>
</span>
<center>
<span class="style8">
None at the moment. Email me to become one. </span><span class="style8"><BR>
</span><BR>
</center>

<div class="style7">Link To Me: </div>
<div align="center">
<p><BR>
<img src="http://i35.photobucket.com/albums/d187/xdaxwebx/linkme1.jpg" alt="Direct Linkable" width="88" height="31">....<img src="http://i35.photobucket.com/albums/d187/xdaxwebx/100x35a.jpg" alt="Direct Linkable" width="100" height="35"></p>
<p><img src="http://i35.photobucket.com/albums/d187/xdaxwebx/linkme2.jpg" alt="Direct Linkable" width="100" height="35"><BR>
<BR>
</p>
</div>
</div>
<!-- Start of StatCounter Code -->
<script type="text/javascript" language="javascript">
var sc_project=1735464;
var sc_invisible=1;
var sc_partition=16;
var sc_security="78eeb42a";
</script>

<script type="text/javascript" language="javascript" src="http://www.statcounter.com/counter/frames.js"></script><noscript><a href="http://www.statcounter.com/" target="_blank"><img src="http://c17.statcounter.com/counter.php?sc_project=1735464&java=0&security=78eeb42a&invisible=1" alt="counter easy hit" border="0"></a> </noscript>
<!-- End of StatCounter Code -->
</body>
</html>




pandy
QUOTE(Guided @ Dec 19 2006, 09:29 AM) *

I have a website that has been working fine but when I edited my code recentally I get an error on the page and it would load. When I revert back to a VERY old version of my code it works fine but the current and only other copy I have it won't. I was hoping somebody here could spot what is making my code malfuntion! Thanks a bunch!


Exactly what is it that doesn't work? In what browser? Is the error you talk about a JS error? What does it say?
Guided
http://xdaxwebx.atspace.com/bio2.html

Is one of the pages. I know it's not my host though because I whipped up something real quick to let people know the site is down and it shows this

http://xdaxwebx.atspace.com/
Darin McGrew
So, what is it about this page that isn't working?
Christian J
The code posted in the first post lacked line breaks and caused a JS error. When I added line breaks inside every "><" and after every "; " the error went away.
pandy
QUOTE(Christian J @ Dec 20 2006, 02:28 PM) *

The code posted in the first post lacked line breaks and caused a JS error. When I added line breaks inside every "><" and after every "; " the error went away.

I'm confused again. Why would there need to be linebreaks between tags and after end of line delimiters? I didn't an error (IE). blink.gif
Christian J
QUOTE(pandy @ Dec 20 2006, 03:33 PM) *

I'm confused again. Why would there need to be linebreaks between tags and after end of line delimiters? I didn't an error (IE). blink.gif

Just added the line breaks so I could easier spot a JS error that I got first time. But now I can't reproduce it, maybe I made some mistake. rolleyes.gif

pandy
QUOTE(Christian J @ Dec 20 2006, 08:45 PM) *

QUOTE(pandy @ Dec 20 2006, 03:33 PM) *

I'm confused again. Why would there need to be linebreaks between tags and after end of line delimiters? I didn't an error (IE). blink.gif

Just added the line breaks so I could easier spot a JS error that I got first time. But now I can't reproduce it, maybe I made some mistake. rolleyes.gif


No! ohmy.gif
factor
I tried the code from the first post, everything seems fine, i get no errors. So what is the problem with it exactly? http://xdaxwebx.atspace.com/ also seems fine.
Guided
Thank you everybody but I realized the error was I tryed to link to myspace and myspace is blocked on my host so it came up with the error but I deleted out the myspace link and it works fine again.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.