![]() |
|
|
| Subject:
web site html problem frames/target
Category: Computers > Programming Asked by: pittsfordnewyork-ga List Price: $10.00 |
Posted:
13 May 2002 10:32 PDT
Expires: 20 May 2002 10:32 PDT Question ID: 16005 |
i just completed making a web site for my husband. pittsfordnewyork.com. after i go to the property search section and then choose search greater rochester area, i get into the homesteadnet site. when i then want to click on on one of the other choices such as sell your home, i open a new page. i think my target source code is not correct somewhere. i would like to know how to fix the code so the user stays in the bottom frame of the site. here is the code for the main page:(view source for other pages) <html> <head> <META http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <META name="description" content="Full sevice residential real estate in Rochester, Pittsford, and the eastern suburbs of Monroe County, NY. "> <META name="keywords" content="pittsford,rochester,monroe county,new york,ny,real estate,agent,salesperson,realtor,real,estate,pittsford real estate,upstate,ny,brighton,penfield,perinton,webster,avon,lima,henrietta,george,dounce,new home,relocation,builder,construction,land,lot,lots,housing,century 21,century21,c21,red coach,realty,moving,buyer's,buyers,broker,sellers,seller's,house"> <TITLE>Pittsford Real Estate, Greater Rochester NY Realtor, George Dounce, Real Estate Agent</TITLE> </head> <frameset rows ="185,*" border = "0"> <frame scrolling = "no" src="topframe.html" marginwidth =5 marginheight = 1> <frame scrolling = "auto" src="centerframe.html" name = "changingframe" marginwidth =1 marginheight = 1> </frameset> </html> |
|
| Subject:
Re: web site html problem frames/target
Answered By: jessamyn-ga on 13 May 2002 11:48 PDT |
Hi and thanks for writing Google Answers. Hownice of you to make a
website for your husband.
I checked your pages and viewed the source file on all of them and it
seems to me that *your* code is fine. However, when you link to the
homestead site, the site itself employs javascript to make all links
from that site open in new windows. You can see this by viewing the
source code on the honestead page. Unfortunately, this also affects
the links that you try to open from the top link of your husbands page
after the homested link has been clicked. There are a few solutions to
this, depending on how skilled you feel with scripts and how much work
you want to do. You can tell this is site-specific because it does not
happen when you follow the link to the Century 21 web site.
I also tried to see if this could be fixed by changing the links on
your top frame so that they had a direct link to homestead.com's
website up there instead of linking from the bototm frame [by using
two links "property search local" "property search remote"] but no
dice, just FYI.
1. Set the homestead.net link to open in a new window instead of in
the lower frame. This will be the easiest to do [set the target link
to target="_blank"] but you lose potential branding on your husband's
site. On the other hand, since it is in a new window, your husband's
site will still be open in another browser window. This is a judgment
call you will need to make.
2. You could set up a script to disable javascript entirely, or
partially. However the homesteadnet web site employs other javascripts
besides the one that causes all links to open in a new window. You
also run into the problem of cross-browser compatibility. For a good
primer on how to work with javascript in a frames-based setting,
please see these two documents
Re-directing access within Frames
http://tech.irt.org/articles/js013/index.htm
Re-directing access within Frames #2
http://tech.irt.org/articles/js126/index.htm
I got both of these articles from reading the irt.org JavaScript Frame
FAQ Knowledge Base which is a fascinating weath of information and
available here:
http://developer.irt.org/script/frame.htm
The Google web directory also has a large archive of javascript
tutorials that you may want to investigate here
http://directory.google.com/Top/Computers/Programming/Languages/JavaScript/Tutorials/?tc=1
So, I'm sorry this isn't more definitive, but I think the blame lays
solely with homesteadnet's javascript usage and not at all with your
website coding, if that's any consolation.
sincerely,
jessamyn-ga
google searches used
javascript frames
://www.google.com/search?sourceid=navclient&q=javascript+frames
diabling javascript frames
://www.google.com/search?q=disabling+javascript+frames
disabling javascript frames "open new window"
://www.google.com/search?num=30&hl=en&safe=off&q=disabling+javascript+frames+%22open+new+window%22 |
|
| Subject:
Re: web site html problem frames/target
From: piyu-ga on 13 May 2002 12:19 PDT |
To solve the problem, what you could do is, on the click of "Sell your home"
call a javascript function say func1()
And in function func1(), say
top.window.frames[1].location.href='Sell_your_home.html'
The Code is as follows :
<script language="Javascript">
function func1()
{
top.window.frames[1].location.href='sell_your_home.html'
}
</script>
<td bgcolor = "#EEEDDD">
<a href ="javascript:func1()">
<font size = -1>Sell your home</font></a>
</td>
This will fool proof your site, as in open the links within the frame.
You can get back to me for more details.
Regards,
Piyush. |
| Subject:
Re: web site html problem frames/target
From: mplungjan-ga on 01 Jun 2002 02:37 PDT |
piyu-ga is correct. The reason your link stop working is that you target "changingframe" but the other site changes it's window name: name = 'hshome'; mplungjan-ga |
| Subject:
Re: web site html problem frames/target
From: mplungjan-ga on 01 Jun 2002 02:41 PDT |
Actually I would code it like this.
<script language="Javascript">
function fOpen(url) {
if (parent.frames.length>1) parent.frames[1].location=url
else window.open(url,'changingframe');
return false
}
</script>
<td bgcolor = "#EEEDDD">
<a href="redcoachrealty.html" onClick="return fOpen(this.href)"><font
size ="-1">Red Coach Office</font></a>
</td> |
| Subject:
Re: web site html problem frames/target
From: mplungjan-ga on 01 Jun 2002 02:44 PDT |
I'm in a comment mood today ;-) If you only feel it is a pain with the homesteadnet site, fake it and change your targets to "hshome" instead of "changingframe". That will solve your problem for that site without any code!!! |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
| Search Google Answers for |
| Google Home - Answers FAQ - Terms of Service - Privacy Policy |