Click to See Complete Forum and Search --> : Newbie needs some advice, please.
Hi everyone,
I'm very new to .asp and need some advice. (For you experienced members, please be kind to this novice. :) )
I'm constructing a page for our newly formed non profit organization. I have been using Macromedia Dreamweaver MX. I decided to go with .asp to better serve the variety of visitors who will view the site, as our host is Stargate.com and we're able to take advantage of server side pages. I first did them in .html prior to this decision, but then saved them as .asp pages and added the opening <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> line before the <html>.
I am using layers, if that makes a difference. I did this because of our background and menu items.
My problems are several. First, the index is showing three errors in IE6.x as:
Line: 41, 91, 90
Char: 1
Error: Object expected
Code: 0
URL: (mine)
I've checked the lines, but they all begin with <div>. It's probably something easily seen by the experts, but for me it's not so clear.
Also, none of my onMouseOver/Out/MM commands are working since I put in the <%....> line. Of course, I could live w/out the menu text changing, but still it's frustrating.
The page looks ok in Netscape 6.2 and Opera 6.1, but the Mouse commands never did work there.
Thank you in advance. I really appreciate the help.
khaki
03-14-2003, 12:10 AM
Hi bb...
Some actual code is probably necessary in order to understand the problems that you are having.
If you can give the entire page of code, that would be great. But if not, be sure to give the lines that are throwing the errors (plus those directly above and below).
Since it worked as a regular HMTL page, it sounds like you may have placed ASP delimeters over areas of straight HTML, or not properly closed the delimiters (obviously I'm speculating, since I can't actually see your code).
Give it a post. We'll see.
k
Hi Khaki,
Thanks for the reply. In order to save space, I've included only sections of the page:
(error in 41)
40 </head>
41 <body bgcolor="#FFFFFF" text="#330066" link="#660066" vlink="#CC0033" alink="#009966" onLoad="MM_preloadImages('/images/homeshadow.gif','/images/checklistshadow.gif','/images/internationalshadow.gif','/images/uscanadashadow.gif','/images/foreignlawshadow.gif','/images/linksshadow.gif','/images/guestbookshadow.gif','/images/surveyshadow.gif','/images/faqshadow.gif','/images/contactshadow.gif')">
42 <div id="Layer1" style="position:absolute; width:861px; height:115px; z-index:1; left: 12px; visibility: visible"><img src="/images/backgroundslice1.gif" alt="our name" width="671" height="140"></div>
I don't know what's going on because today the IE gave me additional lines as errors, but they are all in the same format as lines 90 and 91. I haven't changed a thing since I posted here, and as of that time only those two lines were showing as culprits. :/ In any case, here are those as well:
89 </div> (there was an opening <div> some lines above that this was closing)
90 <div id="Layer5" style="position:absolute; width:154px; height:21px; z-index:5; left: 17px; top: 185px; visibility: visible"> <a href="/checklist.asp" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('checklist','','/images/checklistshadow.gif',1)"><img src="/images/checklist.gif" alt="checklist" name="checklist" width="140" height="20" vspace="2" border="0" align="absmiddle"></a></div>
91 <div id="Layer6" style="position:absolute; width:154px; height:21px; z-index:6; left: 17px; top: 215px; visibility: visible"><a href="/international.asp" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('international','','/images/internationalshadow.gif',1)"><img src="/images/international.gif" alt="international contacts" name="international" width="130" height="20" vspace="2" border="0"></a></div>
92 <div id="Layer7" style="position:absolute; width:154px; height:21px; z-index:7; left: 17px; top: 245px; visibility: visible"><a href="/uscanada.asp" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('unitedstates','','/images/uscanadashadow.gif',1)"><img src="/images/uscanada.gif" alt="U.S & Canada Contacts" name="unitedstates" width="140" height="20" vspace="2" border="0"></a></div>
What have I done wrong? :/
Btw, I also have this in my header:
Also, in the header I have this code:
<server>
<!--
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);
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_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_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];}
}
//-->
</server>
Thanks again!
khaki
03-14-2003, 09:38 AM
Hi bb...
It's a bit early in the morning to ambush me with a Javascript problem
in the ASP forum (lol), but maybe we can just try some basic stuff and work
our way towards the tougher stuff if we have to.
First...
Replace this:
<server>
with this:
<SCRIPT LANGUAGE="JavaScript">
and this:
</server>
with this:
</script>
And to be on the safe side, put this at the very top of the page
(above the <HTML> tag) and remove anything that you have there now:
<%@ Language= "VBScript" %>
Try that and see if you have less (or more) errors.
then again... NO errors would be even better (but maybe I'm a dreamer. lol)...
k
THANK YOU, KHAKI!
It worked. I have confused myself, though. Will these pages still be controlled at the server level or at the user level? I hoped to build something that I wouldn't have to worry about the dilemma caused with different browsers.
*sigh* So much to learn!
I appreciate the help!
khaki
03-15-2003, 12:50 AM
:) well... that settles it...
I am a dreamer! (lol)
I'm happy it's working for you now!
:) :) :) k