Moderators: Derry, Goldie, Harpo
Go
New
Find
Notify
Tools
Reply
  
-star Rating Rate It!  Login/Join 
Working Mechanic
Posted
Hi all -

My former ad agent in insisting on maintaining a link to our site as part of his portfolio. His staff designed our old site, which I've (almost) completely redone, thanks to SiteSpinner! He's been notified that we have new content ready to post, and we requested that he remove the link as the content will no longer be his design, but he declined! Mad Needless to say, I'm not very happy that the link from his site will display my new content as his work! The site is based on a header section at top and then a lot of iFrames. How can I redirect anyone clicking the link from his portfolio to a page showing our header and then displaying some text in an iFrame below it?

I've been messing with some javascript on the original site to see if I could at least make it redirect to Google from his link, but I'm having no luck.

The URL for our original site is Chez Renee;
You can see our new content with the header and iFrames as Chez Renee New.

Thanks all.

Kim
 
Posts: 12 | Registered: October 03, 2004Reply With QuoteEdit or Delete MessageReport This Post
Guru 'Power' Mechanic
Picture of Bruceee
Posted Hide Post
The problem, as I understand it, is that the links to the old site and the new one will be identical. Perhaps you could confirm that? Can you post a link to your ad agent's page?

It might be possible to take some action based on the 'referrer'. But let's define the problem first Smile
 
Posts: 9269 | Location: Wellington, New Zealand | Registered: December 11, 2003Reply With QuoteEdit or Delete MessageReport This Post
Working Mechanic
Posted Hide Post
Yes, the link to the old site and new would be identical, as the new content will replace the old. The ad agent's site is Sutherland * Weston, formerly C M Weston; the offending link is in the right column, fifth icon down.

I found a snippet of code on the web that I've been trying to implant into the old content as a test to see if it would work. It's based on the referrer:

<SCRIPT language=javascript type=text/javascript>
var camefrom = document.referrer;

var findit = "cmweston";
if (camefrom.indexOf(findit) > -1 )
{ window.location="http://www.google.com"; }
</SCRIPT>

The original index.htm file was created using a program I don't have access to, and I can't seem to recreate the file, despite my best efforts, using SiteSpinner or any other method. It uses frameset, which I'm not familiar with. You'll notice if you view source on the chezrenee.biz home page (which is the old content), it shows the frame content source code, not the index source code. In my html editor, the index.htm file appears completely blank. I was able to open it into WordPad and see the meta tags and frameset code, but any attempts to modify or recreate it have failed. I believe the script above has to be located in the /head section, but without being able to edit or recreate the file, I can't access that code in the old content. Given these issues, I've given up on using the old index.htm page as a testing ground for what I'm trying to accomplish, although I'll have to go back and look at it later just cuz it's a puzzle. Smile At least with the new content and SiteSpinner, I know I can get the script properly located! The downside is, I'll have to publish the new content before I know if the redirect works.

The script, if it works, will need to be modified, so instead of google it returns a page in the new content with our boxed header at top and certain content triggered into the IFrame. In other words, the IFrame content needs to be triggered by the script.

Does that make sense (I hope)? :P

Thanks, Brucee.

Kim
 
Posts: 12 | Registered: October 03, 2004Reply With QuoteEdit or Delete MessageReport This Post
Guru 'Power' Mechanic
Picture of Bruceee
Posted Hide Post
To duplicate those pages with SiteSpinner, put your banner on the index page, then in an i-frame, put the bodies of the other pages. Looks like you have mostly done this already.

To examine the code for the existing pages making up your home page, start with header.htm and main.htm.

Or you could continue using the existing frameset, and just replace the underlying pages, like main.htm. If you are doing a major redesign, you may need to do a little resizing of the frameset.

To test your script, I suggest try it in the header of the frameset page. I quite like the idea of the redirection to Google. Can I suggest something more devious? -- make the redirect go to your ex ad agent's most serious competitor Wink
 
Posts: 9269 | Location: Wellington, New Zealand | Registered: December 11, 2003Reply With QuoteEdit or Delete MessageReport This Post
Working Mechanic
Posted Hide Post
I guess my last posting wasn't very clear - my fault for getting frustrated at having to redo it cuz of a glitch in posting. Razz (The first time I typed my reply and hit "post now" it went to the sign in screen and then back to the replay form without saving my content! Maybe cuz I used the reply now link from the email?)

I tried copying and pasting the exact code from the old index page into a code object in SiteSpinner, but it doesn't work. After publishing, the index page won't load at all; it just returns our title in plain font at the top of an otherwise empty page. I've looked at header.htm and main.htm, but it doesn't gain me access to the header code of the index page, which I believe is where the javascript needs to be for the redirect to work. I've tried accessing the header code of the index page through an HTML editor, but it shows no code present! Since I can't access the header code to insert the javascript, I can't test the script by inserting it into the header of the frameset page. I don't understand why I can't do anything with the existing header code, but nothing I've tried has worked. This is why I gave it up; aside from the fact that I don't understand framesets to begin with, I've got all this new content about ready to go. I already lost most of a day messing with the old content so I could run my test, and the greater need is to get the new stuff up. So while I'm curious about why the old code behaves so oddly, I've got to let that go at the moment and worry about the new stuff.

My big issue right now is how to trigger iframe contents through the referrer-based javascript. I'm guessing maybe an onload event? When someone clicks the link from his site, I want it to trigger the contents of the iFrame on the index page, so instead of filling the iFrame with our main page, it displays another page in the frame I've called "Weston." That way, they will see our disclaimer but the header links (the header that's at the top of our all our site pages, I mean) will still be active so they can still browse the rest of the site. The Google thing was how the script originated that I copied off the web; I just used it for test purposes. In the final script, it should be replaced by whatever it is that will return our home page with the Weston text in the iFrame.

I'm horrible at putting this stuff into words. I could show you in two seconds if you were standing beside me at the compter!

Thanks for your time, as always!

Kim

P.S. I would love to direct them to a competitor's site! We're a small business community, though, and we can't afford to get into it with him any more than we are. He's got enough influential clients that it could harm us for him to start bad-mouthing us, however much I'd love to tweak his nose, especially since we know first hand that he's dishonest in his practices! The text I've written just makes the point that we no longer work with him, the new content is ours, and that we've requested he remove us from his portfolio. *Biting tongue*
 
Posts: 12 | Registered: October 03, 2004Reply With QuoteEdit or Delete MessageReport This Post
Guru 'Power' Mechanic
Picture of Bruceee
Posted Hide Post
Let's first define what you want to do:

1. You want to remove the frameset page completely.

2. As your new home page, you want the page you have here: http://chezrenee.biz/new/index.html

3. If someone should click the link to your site from your "special friend's" site, they get your special "Weston" page in the i-frame.

4. You don't want to keep any of the old pages as an archive, and you don't want to salvage anything from the old pages. Am I assuming too much here?

I see the tricky bit as being step 3 (because I've never done it before!). The others should be straightforward.
 
Posts: 9269 | Location: Wellington, New Zealand | Registered: December 11, 2003Reply With QuoteEdit or Delete MessageReport This Post
Working Mechanic
Posted Hide Post
lol @ "special friend"! Smile

The first three are correct, but I am going to archive the old files just for reference if I ever have a need. I have one more page to finish on the new site (should be done today), and then I'm going to move all the old stuff into an archive file, and publish the new stuff to the main directory so that our home page at www.chezrenee.biz will show what's now in the /new directory. The /new directory will be deleted; I just used it so others could preview the new stuff.

I was wondering about combining the two scripts below and then placing them on the index page where the regular FillFrame script is now, but I'm not sure how to go about that without creating a conflict. Obviously the window.location line would be completely different.

<SCRIPT type="text/javascript">
function FillFrame(PageName,FrameName) {
var DefaultFrame='HomeFR'
var DefaultExtn='.html'
if (FrameName==undefined) {FrameName=DefaultFrame}
if (PageName.indexOf('.')>-1) {DefaultExtn=''}
frames[FrameName].location=PageName+DefaultExtn
}
</SCRIPT>

<SCRIPT language=javascript type=text/javascript>
var camefrom = document.referrer;
var findit = "cmweston";
if (camefrom.indexOf(findit) > -1 )
{ window.location="http://www.google.com"; }
</SCRIPT>

Another thought: when our home page loads, it will load the index page, which in turn contains the main Iframe called HomeIF. HomeIF by default loads the file home.htm. Maybe it would work to put the Weston text further down on the home.htm page, bookmark it, and then use the referrer script to jump down to the bookmark. The Weston text wouldn't be visible otherwise, because there are no scroll bars on the IFrame. What d'ya think?

Thanks again!

Kim
 
Posts: 12 | Registered: October 03, 2004Reply With QuoteEdit or Delete MessageReport This Post
Working Mechanic
Posted Hide Post
I've sort of blindly put together the following script (new stuff in bold); do you think this might work? Is it okay to put an if function after the frames function? Is the syntax for the location.href right?

<SCRIPT type="text/javascript">
function FillFrame(PageName,FrameName) {
var DefaultFrame='HomeFR'
var DefaultExtn='.html'
var camefrom = document.referrer;
var findit = "cmweston";

if (FrameName==undefined) {FrameName=DefaultFrame}
if (PageName.indexOf('.')>-1) {DefaultExtn=''}
frames[FrameName].location=PageName+DefaultExtn
if (camefrom.indexOf(findit) > -1 )
{location.href="IframeBookmarks.html#weston" target="HomeFR" }

}
</SCRIPT>

Still working on it,

Kim
 
Posts: 12 | Registered: October 03, 2004Reply With QuoteEdit or Delete MessageReport This Post
Guru 'Power' Mechanic
Picture of Bruceee
Posted Hide Post
I agree with your plan of action.

Once you get your new index page in the correct location, you should be able to test with the link from your friend's Wink site.

I think it preferable that you keep the Weston page separate, as you don't want your normal visitors seeing it. And it should be easier to code that way too.

I haven't looked too closely into the script yet, but it seems to me you should have the Weston URL somewhere in there. I'll run some tests, and based on that I'll make some further suggestions.
 
Posts: 9269 | Location: Wellington, New Zealand | Registered: December 11, 2003Reply With QuoteEdit or Delete MessageReport This Post
Guru 'Power' Mechanic
Picture of Bruceee
Posted Hide Post
You did have most of the code there, and no URL required after all Smile

Here is one of a number of possible variants:
<script language="javascript" type="text/javascript">

function FillFrame(PageName,FrameName) {
var DefaultFrame='HomeFR'
var DefaultExtn='.html'
if (FrameName==undefined) {FrameName=DefaultFrame}
if (PageName.indexOf('.')>-1) {DefaultExtn=''} 
frames[FrameName].location=PageName+DefaultExtn
}

var camefrom = document.referrer
var findit = "cmweston"
if (camefrom.indexOf(findit) > -1 )
  {FillFrame('weston')} else {FillFrame('home')} 
</script>
This leaves the FillFrame code as you had it, and adds the extra code after the FillFrame.

I suggest the following changes:
  • Remove the existing two code objects
  • Add the new code object -- this automatically places it after the i-frame it refers to. At page load time, it is important that the i-frame be already present before you start placing pages in it. If you change the z-order on the page, make sure the code object stays under the i-frame object in the drop-down object list
  • Set CSS positioning off for the new code object (desirable but not essential)
  • Change your i-frame foreign object so that it starts off blank (the new code fills it)
  • Update the 'weston' page name in the code above to match the name you use for the special page.
  •  
    Posts: 9269 | Location: Wellington, New Zealand | Registered: December 11, 2003Reply With QuoteEdit or Delete MessageReport This Post
    Working Mechanic
    Posted Hide Post
    Eek - I must be doing something wrong, cuz it's not working.

    I published the new site, though - yay! Still got lots to add, but this feels like a pretty big step!

    Thanks for all your time looking @ this Bruceee.
     
    Posts: 12 | Registered: October 03, 2004Reply With QuoteEdit or Delete MessageReport This Post
    Guru 'Power' Mechanic
    Picture of Bruceee
    Posted Hide Post
    The code looks good, but you have it ahead of the i-frame and not after.

    You still need to set the i-frame so that it starts out blank.
     
    Posts: 9269 | Location: Wellington, New Zealand | Registered: December 11, 2003Reply With QuoteEdit or Delete MessageReport This Post
    Working Mechanic
    Posted Hide Post
    It works! Hurray!

    I was in too much of a hurry when I first did it. When I went back and read your reply about where to place it in z-order and starting w/ the blank i-frame, it all came together.

    You rock Bruceee!

    Thanks so much!

    Kim
     
    Posts: 12 | Registered: October 03, 2004Reply With QuoteEdit or Delete MessageReport This Post
    Honorary Mechanic
    Picture of j razz
    Posted Hide Post
    Well done Kim. Very tasteful and respectful.

    j razz
    www.jrazzcreations.com
     
    Posts: 614 | Location: Jackson, TN USA | Registered: October 09, 2005Reply With QuoteEdit or Delete MessageReport This Post
    Working Mechanic
    Posted Hide Post
    Thanks, j razz. It felt like the classier move, although it was tough not to be snippy as he's refused twice now to remove the link from his page.

    I appreciate your taking the time to comment; it really made me feel good about the way we chose to handle this. Smile
     
    Posts: 12 | Registered: October 03, 2004Reply With QuoteEdit or Delete MessageReport This Post
      Powered by Eve Community  
     


    ™ & © 1998 - 2008, Virtual Mechanics Inc. All rights reserved.