You correct Daniel. This one is so strange. 

I made a change to the HTMLComponent.writeStyle()
function that should fix this problem:


The problem was with the \n at the end of the string.
Very strange indeed.

HTMLComponent.writeStyle = function(s){
        // note: don't ever add \n to the end of the
following strings or ns4 will choke!
        if(!s) return;
        var css ='<style><!-- ';
        for(var i in s) css +='.'+i+' {'+s[i]+';} ';
        css += ' --></style>'; 
        document.write(css);
};

Also note new writeStyle usage:

HTMLComponent.writeStyle({StyleName:'Inline-Styles;'})


PS. Sometimes I really hate ns4 :)

--
Raymond Irving
 

--- Daniel Tiru <[EMAIL PROTECTED]> wrote:
> Hi again!
> 
> After testing for about 4 hours i realised i would
> try something else :)
> 
> These lines in the htmlMenu code i commented away,
> and guess what? I think it works now...i have no
> idee why or what they actually do. but now they are
> taken away from my code and works very fine :)
> 
> // Write Style to browser
> //HTMLComponent.writeStyle({
> //    HCMNU:                  '{border: 1px solid #003366}',
> //    HCMNUItm:               '{border: 1px solid #002851}',
> //    HCMNUItmText:   '{cursor: default; text-decoration:
> none; color: #FFFFFF; font: 12px Arial, Helvetica }'
> //});
> 
> Best Regards
> Daniel
> 
> > Hi!
> > 
> > I have a problem with the HTML meny in NS 4.
> > 
> > If you see the example file i never call any meny
> functions even thought i have it included.
> > 
> > If you open the file in ns 4 (i am using 4.7) you
> will mostly not get the alert('hoho') to work. But
> sometimes you will. I have put 200 lines of a var:
> test = 1hohohoho; just for getting this error, it
> works fine if your script isnt long. 
> > I get the error:
> > unterminated string literal. 
> > var test='133Ho
> > 
> > But as the lines range from 1 to 200 and the lines
> is exaclty thesame, the error should not ever
> happen.
> > 
> > I have put everything in a init now but its
> thesame as without it.
> > 
> > You will probably get some cache problems in ns 4
> so be sure to check the source (even if its not
> there once in a while... after commenting the
> htmlMenu) 
> > 
> > If you comment away the htmlMenu include it will
> start to work again.
> > Could you pleas look at this asap? As i really
> really really need to get it to work.
> > 
> > Best regards and thanks in advance
> > Daniel Tiru
> >
>
-------------------------------------------------------
> > This SF.Net email sponsored by: Free pre-built
> ASP.NET sites including
> > Data Reports, E-commerce, Portals, and Forums are
> available now.
> > Download today and enter to win an XBOX or Visual
> Studio .NET.
> >
>
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
> > _______________________________________________
> > Dynapi-Dev mailing list
> > [EMAIL PROTECTED]
> >
>
http://www.mail-archive.com/[EMAIL PROTECTED]/
> >
> ----------------------------------------------------
> >      Name: testdyn.zip
> >      Type: application/x-zip-compressed
> >  Encoding: base64
> >    Length: 0.94 KB
> 
> 
> 
> 
>
-------------------------------------------------------
> This SF.Net email sponsored by: Free pre-built
> ASP.NET sites including
> Data Reports, E-commerce, Portals, and Forums are
> available now.
> Download today and enter to win an XBOX or Visual
> Studio .NET.
>
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
> _______________________________________________
> Dynapi-Dev mailing list
> [EMAIL PROTECTED]
>
http://www.mail-archive.com/[EMAIL PROTECTED]/


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com


-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
Dynapi-Dev mailing list
[EMAIL PROTECTED]
http://www.mail-archive.com/[EMAIL PROTECTED]/

Reply via email to