HTML Coding Help

windows

Guest
Hi,<br />
<br />
I would like to know if there is anyway to code HTML in a way that a text in the HTML document can only be viewed by people with only Text base email account. that is to say that the text in the document can not be seen by people with HTML browser but only text base users.<br />
<br />
Thanks for helping in advance.<!--content-->i'm not sure at all why you would want to do this, and also I doubt that it is possible anyway.<!--content-->I don't think you can do that. Welcome to the forums anyway! ;)<!--content-->Can by done with client- and/or server side scripting. Not with HTML though. Server side would be recommended, and PHP would be my personal choice. However, there is no way to see if the browser is text-based or not. I assume you mean to separate between text-mode browsers, like lynx, and graphic ones, like Internet Explorer, since all browsers interpret HTML. If it didn't, I don't think it could really be called a browser, then telnet could be a browser, eh?<br />
Anyway, you'd need a script that can tell user agents apart, and you'd need a pretty good list of user agents.. This should be continued in either the Client side scripting forum, or in the Server side :)<br />
Good luck<br />
<br />
Edit:<br />
I got a little confused after reading the post again.. What's any email accounts got to do with it? I'd also like to add that I reserve the right to be wrong about the above :)<!--content-->or you can just follow HTML 4.0 specifications from w3.org<br />
<br />
they include attributes and tags to include for non-graphical browsers (like the ALT tag).<br />
<br />
<br />
However, I don't think that is the question. It seems more like John wants to just prevent HTML mail clients from displaying his email. But I don't understand why.<!--content-->Well I think we all wait until johnb comes back and explains his question further :)<br />
<br />
btw, johnb as in John B, the d&b producer? ;)<!--content-->Thank you for the response.<br />
To add a bit of clarification to what I posted earlier, what I'm am trying to do is, sending email out in the form of HTML. since there are some people for example unix users who mainly receives mails in plain text, I would want to add code or script in the document that can only be display for such users. This has to do with sending emails using bulk email merger programs.<br />
<br />
Thanks.<!--content-->Well, those users who receive it as plain text, receive it as plain text. There is no code what-so-ever that you can add, because it won't be executed. You simply have to know which users prefer plain text, and vice versa. <br />
I see a lot of people that send their mails as HTML, also attach the message as a plain text file. Maybe that's something to investigate. Although, attachments aren't too popular.<!--content-->a bit of a trickery here, but it could work:<br />
<br />
write the HTML version as a javascript function (using document.write())<br />
<br />
then at the end of the page, write the text-only version in a <noscript>..</noscript> tag.<br />
<br />
<br />
of course, if a HTML viewer doesn't have JS enabled, they will only see the text-only version too, but that is not so important I feel, as most HTML mailer's will be using JS anyway.<!--content-->I really do appreciate the prompt esponse and the help on this.<br />
Thank you very much and will take your advice on that.<!--content-->the only way to send it in plain text is to change the headers of the program to send in plain text instead of html. no other way.<br />
<br />
plain text will list the noscript tags as it should just display what ever is in the email.<!--content-->hmm.. yeah I guess that's right really.<!--content-->
 
Back
Top