Results 1 to 9 of 9
  1. #1
    Star Lounger
    Join Date
    Sep 2001
    Location
    San Jose, California, USA
    Posts
    92
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Sharing content across sites (FP2002)

    Hi;

    We're trying to figure out a way to share common page content (usually flat html with hyperlinks, tables, etc.) across three different intranet sites.

    Nothing we've tried works: Server-side includes don't work across sites, IFRAMES don't inherit each site's unique page/font styles, and converting the html content to JavaScript files (a simple translation of each line of html that is then document.writ(ten), and then calling it into the page) causes more behind-the-scenes maintenance than just plainly maintaining the three sites separately.

    Because the sites have different formatting (mainly font size and bullet and heading styles), none of these file-sharing attempts seems worthwhile.

    Is there a straightforward way to pull shared <body> information into pages across sites that also inherits the local page's inherent styles?

    Thanks,
    Dave

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Sharing content across sites (FP2002)

    Interesting problem. I've never tried it myself, but... assuming you have standardized on a single DOM (e.g., IE5+), you could create a DIV in your page (with the attribute ID="DIV1") and stuff the entire blob of HTML into it using, for example:

    var myDiv = document.getElementById("DIV1");
    myDiv.innerHTML = strHugeBlobOfHTML;

    I guess the question then is how to get the huge string from the other server's file system in a lightweight manner. I might experiment with this some more if I can find the right approach.

  3. #3
    Star Lounger
    Join Date
    Sep 2001
    Location
    San Jose, California, USA
    Posts
    92
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sharing content across sites (FP2002)

    Thanks. [img]/forums/images/smilies/ohmy.gif[/img]) As of now, I still haven't found anything that'll work.

    Dave

  4. #4
    4 Star Lounger
    Join Date
    Aug 2002
    Location
    Dallas, Texas, USA
    Posts
    594
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sharing content across sites (FP2002)

    Are these three INTRANET sites on the same machine?

  5. #5
    Star Lounger
    Join Date
    Sep 2001
    Location
    San Jose, California, USA
    Posts
    92
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sharing content across sites (FP2002)

    Sorry, three different machines, three different domains. Our company is, internally, three. Combining the sites into one isn't practical because the business needs are different enough among them that we'd be forced to do so much "click here for this way, click here for that way, click here for the other way" that we might as well have kept 3 separate sites.

    The problem arises when we run into common corporate-wide content that we now have to maintain identically in 3 locations, each with the look and feel of it's site. Not something the big paycheck folks saw coming. [img]/forums/images/smilies/ohmy.gif[/img])

    Dave

  6. #6
    4 Star Lounger
    Join Date
    Aug 2002
    Location
    Dallas, Texas, USA
    Posts
    594
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sharing content across sites (FP2002)

    Okay, two more questions. Are they running on computers you/company have access too, and are they NT based (IIS servers)?

  7. #7
    Star Lounger
    Join Date
    Sep 2001
    Location
    San Jose, California, USA
    Posts
    92
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sharing content across sites (FP2002)

    1. Yeah, they're our servers.
    2. Two are on IIS, one on Linux/Apache.

    Love the logo on your posts by the way. [img]/forums/images/smilies/ohmy.gif[/img]) One point of weirdness - I clicked the email notification's link to view your post and the logo was there under your name. Then I logged in to do this reply, and all the logos disappeared. Odd, that. <img src=/S/confused.gif border=0 alt=confused width=15 height=20>

    Dave

  8. #8
    4 Star Lounger
    Join Date
    Aug 2002
    Location
    Dallas, Texas, USA
    Posts
    594
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sharing content across sites (FP2002)

    Could have sworn I replied to this a while back, but I've been out with the flu, and going through all the mail in my inbox, and I didn't see a reply to this on the lounge. Go figure.

    Okay, essentially what I was going to recommend was an ASP/VB .dll combination. Put the master files on the Linux/Apache machine (since it won't allow VB .dll's). On that, the 'master' server, create an .asp page that can be given a filename and date/time (as querystring data), and have it return yes/no, or true false, as to whether or not the file requested is 'newer' then the date sent with the filename.

    Then, on the IIS servers, create a .dll which does that interaction, using the URLdownloadToFile api, you can hit the asp page on the Linux machine, to determine if the locally 'cached' file is the current one, if it is, the .dll returns the text within that file, if it isn't, it downloads the latest one (from the Linux, using the same API), and then sends the text within the new file (which is now cached for the next user that hits the page).

    I know I'm glossing over specifics, just wanted to give you an outline of how I would do this.

    The other method, which would work just as well, actually, probably a bit better, would be to make an NT service (which you can do with VB (sorry, I'm a VB guy... <img src=/S/grin.gif border=0 alt=grin width=15 height=15>). There is an API that you can call, to 'watch' changes in a particular folder, including adding/editing files. Set one of the IIS servers as the 'Master' server, and put the 'includes' in a particular folder, that the service would 'watch'. Whenever a file on the master server is changed or added, the service would 'push out' the new file to the other two servers. That's the only catch I can think of, because I'm not exactly sure how to 'upload' a file to another machine, without there being some sort of Fileshare, or FTP involved.

    Well, there's two suggestions for ya.

    My logo is from my website. Not sure why my logo would act up the way you described though......go figure.

  9. #9
    Star Lounger
    Join Date
    Sep 2001
    Location
    San Jose, California, USA
    Posts
    92
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sharing content across sites (FP2002)

    Thanks for the ideas! [img]/forums/images/smilies/ohmy.gif[/img])

    Dave

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •