473,385 Members | 1,375 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Object doesn't support this property or method

1
I have had a frames based website running for a quite a while in which every page has the following call:

<body onload="top.SetPageTitle()">
...
</body>

This is used to force the browser title to be set to the page title for a page loaded into a frame.

The index.html page is setup as follows:

<head>
<script language=JavaScript>
function SetPageTitle() {
document.title = Main.document.title;
}
</script>
</head>
<frameset cols="150,*">
<frame name="TOC" target="main" src="TOC.htm" scrolling="auto">
<frame name="Main" src="Home.htm" scrolling="auto" target="_self">
...
</frameset>

This is pretty straight forward and has worked fine (no comments about using frames please!!!!).

Very recently I signed up for my own domain name and setup web forwarding (frame forwarding) to cloak the target hosting site

So www.mydomain.com ==> www.isp.com/~me
The cloaking forces the browser to only show www.mydomain.com.

But now every page generates an error "Object doesn't support this property or method" for the call to SetPageTitle.

I'm really not sure why the forwarding causes this. If you bypass the domain and go to the target hosting site (i.e. www.isp.com/~me) the error does not occur. Similarly if I turn off frame forwarding and just use standard forwarding it id fone but the browser will show the real target URL. It also appears that firefox does not seem to have a problem whereas IE does but then again firefox does not seem to show a lot of scripting errors anyway.

I'm not totally sure what the frame forwarding does that could cause this, Can someone explain what is going on?
Mar 14 '07 #1
1 1417
Masked forwards are essentially loading your page inside a frameset on another server to make it appear that it's on that server. If you go to your domain and view source, you should see what I mean. In IE, you have to go to view at the top and then "view source" because right-click and view source will show the frame's source instead. Taking that into consideration:

top.SetPageTitle() doesn't exist, and furthermore, your script is now violating the same origin restriction. IE just gives a generic error, but Firefox and Opera will give you a permission denied error due to this.

parent.SetPageTitle() exists, but it is not going to change the title in the browser window because it's not in the top frameset anymore.

You have the same choice I had. Mask the forward and lose control of the page title, or control the page title and lose the mask. Personally, I got rid of the mask since it's easy enough for someone to tell that it's a forward anyway.

I have had a frames based website running for a quite a while in which every page has the following call:

<body onload="top.SetPageTitle()">
...
</body>

This is used to force the browser title to be set to the page title for a page loaded into a frame.

The index.html page is setup as follows:

<head>
<script language=JavaScript>
function SetPageTitle() {
document.title = Main.document.title;
}
</script>
</head>
<frameset cols="150,*">
<frame name="TOC" target="main" src="TOC.htm" scrolling="auto">
<frame name="Main" src="Home.htm" scrolling="auto" target="_self">
...
</frameset>

This is pretty straight forward and has worked fine (no comments about using frames please!!!!).

Very recently I signed up for my own domain name and setup web forwarding (frame forwarding) to cloak the target hosting site

So www.mydomain.com ==> www.isp.com/~me
The cloaking forces the browser to only show www.mydomain.com.

But now every page generates an error "Object doesn't support this property or method" for the call to SetPageTitle.

I'm really not sure why the forwarding causes this. If you bypass the domain and go to the target hosting site (i.e. www.isp.com/~me) the error does not occur. Similarly if I turn off frame forwarding and just use standard forwarding it id fone but the browser will show the real target URL. It also appears that firefox does not seem to have a problem whereas IE does but then again firefox does not seem to show a lot of scripting errors anyway.

I'm not totally sure what the frame forwarding does that could cause this, Can someone explain what is going on?
Mar 17 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

54
by: tshad | last post by:
I have a function: function SalaryDisplay(me) { var salaryMinLabel = document.getElementById("SalaryMin"); salaryMinLabel.value = 200; alert("after setting salaryMinLabel = " +...
5
by: John Olbert | last post by:
Subject: Error is Object doesn't support this property or method I am trying to pass a C# string under Vs2005 (Net2) to an Vb6 ActiveX Control. I get the following runtime error-- "Object...
0
by: John Olbert | last post by:
Subject: Error is Object doesn't support this property or method I am trying to pass a C# string under Vs2005 (Net2) to an Vb6 ActiveX Control. I get the following runtime error-- "Object...
8
by: Kevin Blount | last post by:
I'm tyring to access an object created by using a method from a third party API. The documentation tells me what object should be return, and the properties of that object, but when I try and...
0
ADezii
by: ADezii | last post by:
When you create an ADO Recordset, you should have some idea as to what functionality the Recordset does/does not provide. Some critical questions may, and should, be: Can I add New Records to the...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.