 |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Dreamweaver (all versions) section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

February 19th, 2006, 03:33 PM
|
|
Authorized User
|
|
Join Date: Jan 2006
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Terry
Forgot to mention i did send you an email
Mike
|
|

February 27th, 2006, 02:35 PM
|
|
Authorized User
|
|
Join Date: Jan 2006
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi Imar
Nearly ready to publish to web but have one query that is really bugging me...in the bootom left corner of the open page when site is running I get a little triangle with exclamation mark when I pass over one of the rollover graphics any of the five I get a message saying Line: 42 Char: 1 error: Object expected Code: 0 url HTTP//Localsite/Sitename/buildingBlock.asp?sectionID=9 Or 19,29,39,49 depending which is pasased over... the site itself works fine and these links work fine but the message remains any clues or can I leave as is..
Regards
Mike
|
|

February 27th, 2006, 04:51 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Hi Mike,
This is caused by a client side JavaScript error.
The reasons for this error are quite diverse. It can be that you have forgotten to include a link to an external file with JavaScript code, or a mismatch in case when calling a fUncTIOn in JavaScript, or an incorrect reference to an object and so on and so on.
If you double-click the triangle, you're supposed to get more info. What do you get? Does the error message give you more information?
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|
|

February 27th, 2006, 05:18 PM
|
|
Authorized User
|
|
Join Date: Jan 2006
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi Imar
Good weekend I Hope.
No thats all it gives out, I have checked all links and the data base, the 9 19,29,39,49 are all the blocks that we discussed earlier, there is no where for them to link to as such the head to the block content which i have also checked the character it is looking for on line 42 there isnt one as it starts its line 'for'
if you understand?
everything works but these daft warnings..
Mike
|
|

February 28th, 2006, 03:04 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
No, I am afraid I don't understand. But I think you agree that this:
Quote:
|
quote:there is no where for them to link to as such the head to the block content which i have also checked the character it is looking for on line 42 there isnt one as it starts its line 'for'
|
*is* difficult to understand... ;)
If you see the triangle, you should be able to double-click it for more information.
Normally, with that information, you should be able to see where the error occurred.
To get more info, try this: Open Tools | Internet Options in Internet Explorer. Then on the Advanced tab, make sure that "Display a notification about every script error" is checked. You may also want to deselect the script debugger options when you have them installed. That should give you more information about the error.
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|
|

February 28th, 2006, 06:12 AM
|
|
Authorized User
|
|
Join Date: Jan 2006
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Yes I understand. This is in the blockContent.asp 'Line 42' is the line where "for" is on the script below, I have display notification switch to enable and all I am getting is that in my message earlier, there is no more Info. Las message should have read "they head to the blockContent.asp which I have also checked"
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;
}
Sorry fot typo's but it had been along day yesterday..
Mike
|
|

February 28th, 2006, 05:27 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
That looks like the default (and way too verbose BTW) Dreamweaver function to get a reference to an object.
I don't think the problem is with that function, but rather with the code that calls it (wild guess, as I haven't seen any of the other code).
Maybe the function is called for an object that doesn't exist? And then later the object reference is used?
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Help Me Lift You Up by This Mortal Coil (Track 15 from the album: Blood) What's This?
|
|

March 1st, 2006, 06:11 AM
|
|
Authorized User
|
|
Join Date: Jan 2006
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Thanks for the reply, as I do not understand this part of building this site I have included all the code on the page with the fault, I'm not happy having an error occuring on the page but as everything seems to work I am prepared to publish the site with it on. and see how it works. It obviously would be better if there were no faults on the site. but if you have any suggestions they would be welcomed.
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];}
{
Mike
}
|
|

March 1st, 2006, 06:30 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Same problem again; these functions are created by Dreamweaver, so I doubt they are the problem.
It's the code that *calls these functions* that you should look into. E.g. look at onload or onclick handlers that try to call one of these functions...
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|
|

March 1st, 2006, 07:05 AM
|
|
Authorized User
|
|
Join Date: Jan 2006
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
This is the onload , not sure what the handlers are,
<body bgcolor="#cccccc" leftmargin="0" rightmargin="0" topmargin="0" bottommargin="0" onLoad=
"MM_preloadImages('<%=(Section.Fields.Item("Top_Ro llOver").Value)%>')">
<table border="0" cellspacing="0" cellpadding="0">
I think I'm realy thick where this is concerned.
mike
|
|
 |