Change the " to ' quotes in the javascript.
It works.  I just tried it.  My replace function is flawed but the concept works!

"Michael B. Murdock" wrote:

 The only problem I see with this is a killer... The Imail tag <!--IMAIL.MailboxFolderSummary--> returns a table with imbedded double quotes (")... this breaks the javascript... The Javascript see's your first quote and when it runs into the next qoute from the stuff IMAIL generates it ends the string... the stuff that follows is illegal syntax...That is why the loadjs.asp script I wrote converts all double-quotes into single-quotes....  All IPSwitch would need to do is use single quotes instead... all the browsers I tested don't seem to care either way... and we could then work magic on those "nasty" tables..  Anyone have any other ideas? Mike MurdockCIOFishingLife.com 
----- Original Message -----
Sent: Wednesday, December 01, 1999 4:22 PM
Subject: Re: [IMail Forum] Includes/ASP in Web Templates
 I haven't tried this but maybe you'd like to give it a shot.
The below code may have a bug or two ;-)  I just wrote it off the top of my head.
If you do try it, please tell me if it works.

<script language="javascript">

var longstring;
longstring = "<--IMAIL TAG FOR MAILBOX -->";
newlongstring = replace(longstring,"<table border=1>","<table border=0>")
document.write(newlongstring);

function replace(instring,replaceword,replacewith)
{
    var text=" " + instring + " ";
    apos=text.indexOf(replaceword);
    while (apos > -1)
    {
        text=text.substring(1,apos) + replacewith + text.substring(apos+instring.length,text.length);
        apos=text.indexOf(replaceword);
    }
    return text;
}

</script>

"Michael B. Murdock" wrote:

Yes... I tested it pretty thoroughly in Netscape 4.7 .... there are some things that Netscape doesn't handle as good as IE... such as style sheet definitions for TD tags. Since Imail "poops" out a couple tables (List Mail boxes & mailbox summary mainly) with raw text between <TD> and </TD> (no font tag inside the TD) there is no way to get Netscape to change font style with CSS. Maybe we could all lobby IPSWITCH to throw some <FONT> tags between the <TD>'s for the generated HTML but for now I'm kinda stuck with the look as it is for Netscape. While we are at it ...has anyone asked for the option to turn borders off in those tables? I hate them but again have no control.

Reply via email to