PDA

View Full Version : Design view showing up blank


liverfarm
03-30-2010, 04:19 AM
Hi im working on a website and have decided to try coding most of it rather than relying on the design view with tables like i usually do.

For some weird reason though, when i go to the design view within dreamweaver, all i can see is my background colour, nothing else shows unless i preview it in a browser. It used to work in the design view fine until i added some javascript, not sure if that would have any affect on it

Any ideas? Knowing my luck i have probably done something really obvious but i cant figure out what

edbr
03-30-2010, 05:09 AM
what javascript did you add?

liverfarm
03-30-2010, 11:28 AM
I added this piece of javascript:

<script>
var XHRFactory = (function () {
if (window.XMLHttpRequest) {
return function () {
return new XMLHttpRequest;
}
}
else if (window.ActiveXObject) {
return function () {
var xhr, axo, ex, objects;
objects = ['Microsoft', 'Msxml2', 'Msxml3'];
for (var i = 0; i < objects.length; i++) {
axo = objects[i] + '.XMLHTTP';
try {
xhr = new ActiveXObject(axo);
return xhr;
}
catch (ex) {};
}
throw 'Unable to create XHR object.';
}
}
else {
return function () {
throw "XMLHttp is not supported.";
}
}
})();


function fetchIt(url) {
var http = XHRFactory();
if(http) {
http.open('GET', url, true);
http.send(null);
http.onreadystatechange = function(){document.getElementById('bodytext').inn erHTML = http.responseText;}
}
}
</script>
It may not be the reason for why i cant see anything, i just think maybe that was the last thing i did since i saw the design view properly last.

This is my entire code, in case theres anything inside that that may help:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- TemplateBeginEditable name="doctitle" -->
<title>Alliance Francaise de Wagga Wagga</title>
<!-- TemplateEndEditable -->
<script 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_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
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_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


//-->
</script>
<style type="text/css">
body
{
background-color:#999999;
color:#333333;
font-size-adjust:100%;
}

h1
{font-family:"interstate cond mono","verdana"; font-size:1.0em; color:#00000; text-indent:10px; }

h2
{font-family:"verdana"; font-size:0.7em; font-style:oblique}

h3
{font-family:"verdana"; font-size:0.7em; font-style:italic}

p
{font-family:"verdana"; font-size:0.7em;}

a:link {color:#2f4cb4; text-decoration:none;}
a:visited {color:#1d3486;}
a:hover {color:#507dff;}
a:active {color:#2f4cb4;}

.bodytext {
width:690px;
min-height:380px;
padding-left:30px;
padding-right:25px;
padding-bottom:20px;
padding-top:20px;
position:relative;
align:center;
bottom: 39px;
overflow: visible;
left: 20px;
background-color: rgba(137,137,137,0.2);
/* for IE */
filter:alpha(opacity=40);
}

.bodytext p {
font-family:"verdana"; font-size:0.7em; color:rgba(137,137,137,100);
}

.buttons{
width:130px;
height:250px;
position:relative;
}

</style>

</head>
<body>
<script>
var XHRFactory = (function () {
if (window.XMLHttpRequest) {
return function () {
return new XMLHttpRequest;
}
}
else if (window.ActiveXObject) {
return function () {
var xhr, axo, ex, objects;
objects = ['Microsoft', 'Msxml2', 'Msxml3'];
for (var i = 0; i < objects.length; i++) {
axo = objects[i] + '.XMLHTTP';
try {
xhr = new ActiveXObject(axo);
return xhr;
}
catch (ex) {};
}
throw 'Unable to create XHR object.';
}
}
else {
return function () {
throw "XMLHttp is not supported.";
}
}
})();


function fetchIt(url) {
var http = XHRFactory();
if(http) {
http.open('GET', url, true);
http.send(null);
http.onreadystatechange = function(){document.getElementById('bodytext').inn erHTML = http.responseText;}
}
}
</script>
</body>
<body onload="MM_preloadImages('assets/homeBtnO.png','assets/aboutBtnO.png','assets/courseBtnO.png','assets/newsBtnO.png','assets/membershipBtnO.png','assets/linksBtnO.png','assets/contactBtnO.png')">
<table width="600" height="772" border="0" align="center" bgcolor="#FFFFFF">
<tr>
<td height="262" colspan="7"><img src="assets/banner.jpg" alt="Alliance Francaise de Wagga Wagga" width="1000" height="260" border="0" usemap="#Map" /></td>
</tr>
<tr>
<td width="70">&nbsp;</td>
<td width="123" valign="top"><div class="buttons"><table width="100" border="0">
<tr>
<td height="30" valign="top"><a href="#" onclick="fetchIt('pages/home.txt')" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('home','','assets/homeBtnO.png',1)"><img src="assets/homeBtn.png" alt="home" name="home" width="37" height="14" border="0" id="home" /></a></td>
</tr>
<tr>
<td height="30" valign="top"><a href="#" onclick="fetchIt('pages/about.txt')" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('about','','assets/aboutBtnO.png',1)"><img src="assets/aboutBtn.png" alt="about us" name="about" width="59" height="14" border="0" id="about" /></a></td>
</tr>
<tr>
<td height="30" valign="top"><a href="#" onclick="fetchIt('pages/courses.txt')" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('courses','','assets/courseBtnO.png',1)"><img src="assets/courseBtn.png" alt="language courses" name="courses" width="119" height="14" border="0" id="courses" /></a></td>
</tr>
<tr>
<td height="30" valign="top"><a href="#" onclick="fetchIt('pages/news.txt')" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('news','','assets/newsBtnO.png',1)"><img src="assets/newsBtn.png" alt="news" name="news" width="34" height="14" border="0" id="news" /></a></td>
</tr>
<tr>
<td height="30" valign="top"><a href="#" onclick="fetchIt('pages/membership00.txt')" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('member','','assets/membershipBtnO.png',1)"><img src="assets/membershipBtn.png" alt="membership" name="member" width="84" height="17" border="0" id="member" /></a></td>
</tr>
<tr>
<td height="30" valign="top"><a href="#" onclick="fetchIt('pages/links.txt')" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('links','','assets/linksBtnO.png',1)"><img src="assets/linksBtn.png" alt="links" name="links" width="31" height="14" border="0" id="links" /></a></td>
</tr>
<tr>
<td height="30" valign="top"><a href="#" onclick="fetchIt('pages/contact.txt')" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('contact','','assets/contactBtnO.png',1)"><img src="assets/contactBtn.png" name="contact" width="52" height="14" border="0" id="contact" /></a></td>
</tr>
</table>
&nbsp;</div></td>
<td height="284" colspan="5" align="left" valign="top"><div class="bodytext"><div id="bodytext">&nbsp;</div></div></td>
</tr>


<tr>
<td height="21" colspan="2">&nbsp;</td>
<td width="200" align="right" valign="top"><p><b>classes held at:</b></p></td>
<td width="172" align="left" valign="top"><p>Association of Riverina<br />
Cultural Clubs (ARCC) Hall<br />
131 Tarcutta St<br />
Wagga Wagga, 2650</p> </td>
<td width="3"><img src="assets/01.png" width="3" height="99" /></td>
<td width="60" align="right" valign="top"><p><b>contact:</b></p></td>
<td width="348" align="left" valign="top"><p>PO BOX 8008<br />
Kooringal, NSW<br />
ph: (02) 69211418 or (02) 69202294<br />
e: <a href="mailto:afdewaggawagga@hotmail.com">afdewaggawagga@hotmail.com</a></p></td>
</tr>
</table>


</body>
</html>

edbr
03-31-2010, 01:51 AM
you have body opened and closed repeatedly so your page is faulty

liverfarm
03-31-2010, 11:29 AM
wow thanks! i knew it had to be something simple haha