#1 (permalink)  
Old 01-14-2005, 11:42 PM
Registered User
 
Join Date: Dec 2004
Posts: 22
domain vs script

ok, this problem probably has a simple solution, but I don't know javascript at all, so I'm not sure how to fix this on my own. This script I just installed doesn't work if you go to my site via my domain name, but works fine if you go to it via my real URL. The errors I get are:
Code:
Line: 31
Char: 1
Error: Object expected
Code: 0
URL: http://ptplus.x-host.uni.cc/

and (when trying to click on a link that is part of the script)

Line: 17
Char: 14
Error: 'parent.contentFRM' is null or not an object
Code: 0
URL: http://ptplus.x-host.uni.cc/
here's the script:
Code:
var nn4= (document.layers);
var nn6= (document.getElementById && !document.all);
var ie4= (document.all && !document.getElementById);
var ie5= (document.all && document.getElementById);

function loadPage(id,nestref,url) {
// change the 550 value to make the layer wider or smaller
content_width           = 535;
if (nn4) {
var lyr = (nestref)? eval('document.'+nestref+'.document.'+id) : document.layers[id]
lyr.load(url,content_width)
}



else if(ie4) parent.contentFRM.location = url;

else if(ie5 || nn6) document.getElementById('contentFRM').src = url;
}

function showPage(id) {
if (ie4) {
document.all[id].innerHTML = parent.contentFRM.document.body.innerHTML;
}

else if(nn6 || ie5) { 
document.getElementById(id).innerHTML = window.frames['contentFRM'].document.getElementById('theBody').innerHTML;
}
}
my guess is that the script is getting confused by the domain masking, I just don't know how to tell it to ignore the mask and look at the real URL, or whatever. This is a fairly crucial script as it generates the dynamic content on my site. I've put in a framebreak script to get rid of the problem for now, but I would like to get this fixed asap. Any help will be greatly appreciated!

Last edited by bg4m3r; 01-14-2005 at 11:51 PM.
Reply With Quote

  #2 (permalink)  
Old 01-16-2005, 07:37 PM
Till's Avatar
Administrator
 
Join Date: Jan 2002
Location: Berlin, Germany
Posts: 1,453
Debug with Firefox or Mozilla. There's a tool called, "JavaScript console".
Those IE error messages are meaningless.

Let me know if you need further assistance.

Till
Reply With Quote
  #3 (permalink)  
Old 01-18-2005, 06:58 PM
Registered User
 
Join Date: Jan 2005
Posts: 16
The "parent..." part is unknown to the browser. Make sure it exists. Usually this happens when you use something unknown to the browser. But in anyway it's more useful to debug with Firefox. Those IE errors are really annoying.

The Terminator
Reply With Quote
  #4 (permalink)  
Old 01-18-2005, 11:25 PM
Registered User
 
Join Date: Dec 2004
Posts: 22
it does exist, but when it loads inside the domain frame, I get the errors. If you go directly to the actual URL then everything is fine (I'm currently bypassing the problem with a frame breakout script, never thought I'd have to use one of those again!). And yes, the IE error messages are mostly useless, although they at least point to where the problem is, if not what the problem is. Haven't had a chance to download Firefox yet...

Last edited by bg4m3r; 01-18-2005 at 11:28 PM.
Reply With Quote
  #5 (permalink)  
Old 01-19-2005, 05:48 PM
Registered User
 
Join Date: Dec 2004
Posts: 22
ok, so, for some reason this issue has resolved itself, not going to look a gift server in the mouth though! Now there is just one small problem remaining. When the page loads, it is supposed to load my main intro page into the content area (this is via a script/body onload event). But, now that I've got a new script for screenshot viewing, it doesn't load. You can click the link and it will load, and everything else works perfectly. Don't quite get it...I think it has something to do with the fact that the screenshot script preloads the images or something like that, but it's located in the body of the page, where as the loader script is in the head....anyway, if you need more info, let me know, or go check out the site ( http://ptplus.us.tt or http://ptplus.x-host.uni.cc )

and thanks again for all your help!

Last edited by bg4m3r; 01-19-2005 at 09:17 PM.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT -5. The time now is 10:25 AM.

 
Bitrix
Clicky Web Analytics
CloudContacts
Maxtango


Subscribe to our feed | add to myYahoo!

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0
© 1997-2007 HTMLCenter