PDA

View Full Version : how to preview


sinfall
06-19-2005, 03:18 AM
okay so i've done the homepage of my first site, and it looks quite good. the only problem is that i can't seem to preview. i'm not hosting it yet, and don't really have a server on which to host it right now. I press F12 and pretty much get raped by errors. Any help would be appreciated.( a tutorial u could point me towards etc.)

gmcrone
06-19-2005, 12:23 PM
Is it a static HTML page or are there asp/php, etc in it ?

Static should display fine, but anything with different code cannot be previewed without coming from a server.

It is basically impossible to know what is going wrong without seeing the code underlying the page.

Mike...

sinfall
06-19-2005, 04:04 PM
okay, all of the pages are saved as .cfm

here's a portion of the code

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_nbGroup(event, grpName) { //v6.0
var i,img,nbArr,args=MM_nbGroup.arguments;
if (event == "init" && args.length > 2) {
if ((img = MM_findObj(args[2])) != null && !img.MM_init) {
img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src;
if ((nbArr = document[grpName]) == null) nbArr = document[grpName] = new Array();
nbArr[nbArr.length] = img;
for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
if (!img.MM_up) img.MM_up = img.src;
img.src = img.MM_dn = args[i+1];
nbArr[nbArr.length] = img;
} }
} else if (event == "over") {
document.MM_nbOver = nbArr = new Array();
for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args[i])) != null) {
if (!img.MM_up) img.MM_up = img.src;
img.src = (img.MM_dn && args[i+2]) ? args[i+2] : ((args[i+1])? args[i+1] : img.MM_up);
nbArr[nbArr.length] = img;
}
} else if (event == "out" ) {
for (i=0; i < document.MM_nbOver.length; i++) {
img = document.MM_nbOver[i]; img.src = (img.MM_dn) ? img.MM_dn : img.MM_up; }
} else if (event == "down") {
nbArr = document[grpName];
if (nbArr)
for (i=0; i < nbArr.length; i++) { img=nbArr[i]; img.src = img.MM_up; img.MM_dn = 0; }
document[grpName] = nbArr = new Array();
for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
if (!img.MM_up) img.MM_up = img.src;
img.src = img.MM_dn = (args[i+1])? args[i+1] : img.MM_up;
nbArr[nbArr.length] = img;
} }
}
//-->
</script>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
<body bgcolor="#424141" onLoad="MM_preloadImages('buttons/Home2.gif','buttons/News1.gif','buttons/Gamez2.gif','buttons/Appz2.gif','buttons/Movies2.gif','buttons/Support2.gif','buttons/Request2.gif','buttons/Staff2.gif','buttons/Guide2.gif','buttons/Servers2.gif')">
<div id="Layer1" style="position:absolute; left:202px; top:280px; width:546px; height:507px; z-index:1; background-color: #666666; layer-background-color: #666666; border: 1px none #000000;">
<blockquote>
<p><strong><font color="#000000">Latest News (view the "News" section
for previous).</font></strong> </p>
<p><font color="#000000"><strong>posted: June 17, 2005</strong></font></p>
<p><font color="#000000">Well here it is; Proof that we're not 100% lazy.
The site is completely redone (a much needed improvement), and the Download
links have all been checked and rechecked. The polls have been moved to
the homepage, and i've cleaned up the site map a little. Feel free to drop
me a line and tell me what you think, hope ya like what we've done with
the place. SCHOOLS OUT!!! so look forward to some more updates.</font></p>
<p><font color="#000000">p.s. We are depsperately in need of cash to pay for
the servers and other maintenence. So please (Please!!) support the cause
and make some donations. The only other option after that is to start adding
some Google ads, and i don't think you want that. Till later.</font></p>
<p><font color="#000000">~sinfall</font></p>
</blockquote>
<p align="center"><img src="Misc/cloud%20border.jpg" width="400" height="150" border="2"></p>
</div>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td></td>
</tr>
</table>
<div align="center">
<p align="center"><img src="banner/Banner2moving.gif" width="600" height="150">
</p>
<hr align="center" width="900" color="#666666">
<p align="left"><a href="javascript:;" target="_top" onClick="MM_nbGroup('down','group1','Home','',1)" onMouseOver="MM_nbGroup('over','Home','buttons/Home2.gif','',1)" onMouseOut="MM_nbGroup('out')"><img src="buttons/Home1.gif" alt="" name="Home" width="143" height="42" border="0" align="baseline" onload=""></a></p>
<p align="left"><a href="News.cfm" target="_top" onClick="MM_nbGroup('down','group1','News','',1)" onMouseOver="MM_nbGroup('over','News','buttons/News1.gif','',1)" onMouseOut="MM_nbGroup('out')"><img name="News" src="buttons/News2.gif" border="0" alt="" onload=""></a></p>
<p align="left"><a href="Downloads.cfm" target="_top" onClick="MM_nbGroup('down','group1','Downloads','' ,1)" onMouseOver="MM_nbGroup('over','Downloads','button s/Home2.gif','',1)" onMouseOut="MM_nbGroup('out')"><img name="Downloads" src="buttons/Downloads1.gif" border="0" alt="" onload=""></a></p>
<p align="left"><a href="Gamez.cfm" target="_top" onClick="MM_nbGroup('down','group1','Gamez','',1)" onMouseOver="MM_nbGroup('over','Gamez','buttons/Gamez2.gif','',1)" onMouseOut="MM_nbGroup('out')"><img name="Gamez" src="buttons/Gamez1.gif" border="0" alt="" onload=""></a></p>
<p align="left"><a href="Movies.cfm" target="_top" onClick="MM_nbGroup('down','group1','Movies','',1) " onMouseOver="MM_nbGroup('over','Movies','buttons/Movies2.gif','',1)" onMouseOut="MM_nbGroup('out')"><img name="Movies" src="buttons/Movies1.gif" border="0" alt="" onload=""></a></p>
<p align="left"><a href="Appz.cfm" target="_top" onClick="MM_nbGroup('down','group1','Appz','',1)" onMouseOver="MM_nbGroup('over','Appz','buttons/Appz2.gif','',1)" onMouseOut="MM_nbGroup('out')"><img name="Appz" src="buttons/Appz1gif.gif" border="0" alt="" onload=""></a></p>
<p align="left"><a href="javascript:;" target="_top" onClick="MM_nbGroup('down','group1','Support','',1 )" onMouseOver="MM_nbGroup('over','Support','buttons/Support2.gif','',1)" onMouseOut="MM_nbGroup('out')"><img name="Support" src="buttons/Support1.gif" border="0" alt="" onload=""></a></p>
<p align="left"><a href="javascript:;" target="_top" onClick="MM_nbGroup('down','group1','Request','',1 )" onMouseOver="MM_nbGroup('over','Request','buttons/Request2.gif','',1)" onMouseOut="MM_nbGroup('out')"><img name="Request" src="buttons/request1.gif" border="0" alt="" onload=""></a></p>
<p align="left"><a href="javascript:;" target="_top" onClick="MM_nbGroup('down','group1','Staff','',1)" onMouseOver="MM_nbGroup('over','Staff','buttons/Staff2.gif','',1)" onMouseOut="MM_nbGroup('out')"><img name="Staff" src="buttons/Staff1.gif" border="0" alt="" onload=""></a></p>
<p align="left"><a href="javascript:;" target="_top" onClick="MM_nbGroup('down','group1','Guide','',1)" onMouseOver="MM_nbGroup('over','Guide','buttons/Guide2.gif','',1)" onMouseOut="MM_nbGroup('out')"><img name="Guide" src="buttons/guide1.gif" border="0" alt="" onload=""></a></p>
<p align="left"><a href="javascript:;" target="_top" onClick="MM_nbGroup('down','group1','Servers','',1 )" onMouseOver="MM_nbGroup('over','Servers','buttons/Servers2.gif','',1)" onMouseOut="MM_nbGroup('out')"><img name="Servers" src="buttons/Servers.gif" border="0" alt="" onload=""></a>
</p>

gmcrone
06-19-2005, 04:10 PM
If this page is saved as a CFM file, you cannot preview it with F12.

Since CFM is a server language it must be previewed with your server running and opened via http such as http://localhost/mypage.cfm ('http://localhost/mypage.cfm')

Mike...

sinfall
06-19-2005, 05:21 PM
okay, thanks. but i don't have a server to host this, so is there a way to quickly make it html. the only other thing is that i selected to use cold fusion when it prompted me at the beginning of the site.

domedia
06-19-2005, 05:52 PM
I would just get some inexpensive CF hosting. If you can't pay for it yourself ($5), get your parents to pay for it. I'm sure they'd like to see you develop some useful technical skills rather than hang out on the streets ;)

Look at this for example:http://www.cfm-resources.com/hosting/
$4.99 start up fee and no monthly fee. Hardly any space or bandwidth, but what can you ask for at that price?

tmilewski
06-20-2005, 06:48 AM
STOP!

Did anyone actually take the time to look at the code he presented?
There is absolutely no ColdFusion contained within it!

the only other thing is that i selected to use cold fusion when it prompted me at the beginning of the site.

According to your quote, and what I've seen, you do not use ColdFusion in you documents. So, do not go out and buy hosting. That is unless you plan on hosting it somewhere.
Your best course of action is to take all the files with an extention of .cfm and change it to .html.
I would go ahead and read some tutorials on filetypes and the implentation of server-side scripting.
If you plan on coding pages like you have shown then do not use ColdFusion.

(Refer to Image Attached)
Use #1 HTML
Do not use #2 as they are Server-Side Languages (except for JSP but don't worry about that)
#3 - You might want to look into later as CSS is a more economic and standards-compliant way to lay out your webpage ... but it is not to be used as the main filetype for your page.

Good Luck,
Tom Milewski

P.S. - Make sure you change all .cfm links to .html as they will not break once you change the filenames.

domedia
06-20-2005, 01:28 PM
Thanks for keeping things straight Tom :)
I think you saved sinfall alot of time (mental note made on reading posts better)

tmilewski
06-20-2005, 02:51 PM
Thanks for keeping things straight Tom :)
I think you saved sinfall alot of time (mental note made on reading posts better)
lol. no problem.

-Tom Milewski

sinfall
06-21-2005, 06:08 AM
OMG thank you
i got it working today. just save as-> .htm and then double click the file from the folder later. Thanks again