Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > [CSS] how can I show spaces as spaces?

Reply
Thread Tools

[CSS] how can I show spaces as spaces?

 
 
Jan C. Faerber
Guest
Posts: n/a
 
      09-06-2009
<html>
<head>
<title>lazy man</title>
</head>
<body>
<script language="JavaScript">
<!--
function passon()
{
start(document.gimme.textfield.value);
}
// -->
</script>

<form name="gimme">
<input type=text size=20 name="textfield" value="max. 20 letters
here">
<input type=button value="click" onClick="passon()">
</form>



<script language="JavaScript">
<!--
function start(b) {
var turn = b.charAt(19);
for (var l=1;l<=19;l++)
{
var turn = turn + b.charAt(19-l);
}
var space = '&nbsp;&nbsp;&nbsp;&nbsp;';
for (var x=19;x>=0;x--)
{
var z = space;
for (var a=0;a<x;a++)
{
z = z + space;
}
document.writeln(z + turn.charAt(x) + '<br>');
}
document.writeln('use the back button of your browser to enter a new
text');
}
// -->
</script>
</body>
</html>


I don't know yet why the textfield disappears after clicking the
button.
And how to avoid the loading of the page...
can be continued in a js group.

roger & over
 
Reply With Quote
 
 
 
 
Doug Miller
Guest
Posts: n/a
 
      09-06-2009
In article <h807t2$b54$(E-Mail Removed)>, Tomasz Chmielewski <(E-Mail Removed)> wrote:

>I have some software which "transforms" received emails into web pages.


That is SO not a good idea.
>
>Basically, it reads an email and creates a HTML page with very little
>modification to the email body: it will add some <br> tags and will
>highlight the links, but nothing more than that.


So if the email contains something like
<img src="www.porn.com/NakedPeopleDoingDisgustingThingsWithVegetables.jpg ">
or
<a href="www.evil.com/DownloadVirus">See nude pics of Jennifer Anniston</a>
your software will display that on the web page, too?

Hopefully, the need for better software, if not a completely different
approach, is now obvious.

 
Reply With Quote
 
 
 
 
Michael Fesser
Guest
Posts: n/a
 
      09-06-2009
..oO(Doug Miller)

>In article <h807t2$b54$(E-Mail Removed)>, Tomasz Chmielewski <(E-Mail Removed)> wrote:
>
>>I have some software which "transforms" received emails into web pages.

>
>That is SO not a good idea.
>>
>>Basically, it reads an email and creates a HTML page with very little
>>modification to the email body: it will add some <br> tags and will
>>highlight the links, but nothing more than that.

>
>So if the email contains something like
> <img src="www.porn.com/NakedPeopleDoingDisgustingThingsWithVegetables.jpg ">
>or
> <a href="www.evil.com/DownloadVirus">See nude pics of Jennifer Anniston</a>
>your software will display that on the web page, too?


Where did he mention HTML emails?

>Hopefully, the need for better software, if not a completely different
>approach, is now obvious.


It would work well for plain text emails.

Micha
 
Reply With Quote
 
Jukka K. Korpela
Guest
Posts: n/a
 
      09-06-2009
Michael Fesser wrote:

>>> Basically, it reads an email and creates a HTML page with very
>>> little modification to the email body: it will add some <br> tags
>>> and will highlight the links, but nothing more than that.

[...]
> Where did he mention HTML emails?


He didn't, but he wrote "nothing more than that".

So if a plain text e-mail message contains <blink>, it will appear as
<blink> on an HTML page, and if an HTML e-mail message contains <blink>, it
will also appear as <blink>.

If you wanted to convert plain text to HTML, it would not suffice to "add
some <br> tags and [...] hightlight the links". You would need to do more
than that.

--
Yucca, http://www.cs.tut.fi/~jkorpela/

 
Reply With Quote
 
Tomasz Chmielewski
Guest
Posts: n/a
 
      09-06-2009
Jukka K. Korpela wrote:
> Tomasz Chmielewski wrote:
>
>> I have some software which "transforms" received emails into web
>> pages.

>
> I guess the main problems (which you might still be unaware of) are not
> technical but more fundamental. Publishing an arbitrary e-mail message
> without permissions easily takes you on the wrong side of the law, or at
> least into trouble.


It's a mailing list and everyone posting there knows it.


>> Basically, it reads an email and creates a HTML page with very little
>> modification to the email body: it will add some <br> tags and will
>> highlight the links, but nothing more than that.

>
> Then it's horrendously wrong. Test it with a message containing
> <blink><font size=7 color=red>Goofed!</font></blink>
>
> And how does it handle MIME, for example?


Yes, I didn't mention that.
It does handle HTML mail and does some more processing in that case.

BTW, the software is Lurker: http://lurker.sourceforge.net/



--
Tomasz Chmielewski
http://wpkg.org

 
Reply With Quote
 
Tomasz Chmielewski
Guest
Posts: n/a
 
      09-06-2009
Doug Miller wrote:
> In article <h807t2$b54$(E-Mail Removed)>, Tomasz Chmielewski <(E-Mail Removed)> wrote:
>
>> I have some software which "transforms" received emails into web pages.

>
> That is SO not a good idea.


Most web email archives work this way.


>> Basically, it reads an email and creates a HTML page with very little
>> modification to the email body: it will add some <br> tags and will
>> highlight the links, but nothing more than that.

>
> So if the email contains something like
> <img src="www.porn.com/NakedPeopleDoingDisgustingThingsWithVegetables.jpg ">
> or
> <a href="www.evil.com/DownloadVirus">See nude pics of Jennifer Anniston</a>
> your software will display that on the web page, too?
>
> Hopefully, the need for better software, if not a completely different
> approach, is now obvious.


It will display these as links (if the spam filter doesn't stop it); the
software processes HTML of course.

Dealing with spam and malicious mail is not the main topic for alt.html.


--
Tomasz Chmielewski
http://wpkg.org
 
Reply With Quote
 
Doug Miller
Guest
Posts: n/a
 
      09-06-2009
In article <(E-Mail Removed)>, Michael Fesser <(E-Mail Removed)> wrote:
>..oO(Doug Miller)
>
>>In article <h807t2$b54$(E-Mail Removed)>, Tomasz Chmielewski

> <(E-Mail Removed)> wrote:
>>
>>>I have some software which "transforms" received emails into web pages.

>>
>>That is SO not a good idea.
>>>
>>>Basically, it reads an email and creates a HTML page with very little
>>>modification to the email body: it will add some <br> tags and will
>>>highlight the links, but nothing more than that.

>>
>>So if the email contains something like
>> <img src="www.porn.com/NakedPeopleDoingDisgustingThingsWithVegetables.jpg ">
>>or
>> <a href="www.evil.com/DownloadVirus">See nude pics of Jennifer Anniston</a>
>>your software will display that on the web page, too?

>
>Where did he mention HTML emails?


Why do imagine that it makes a difference?
>
>>Hopefully, the need for better software, if not a completely different
>>approach, is now obvious.

>
>It would work well for plain text emails.
>

What do you imagine to be the difference between "HTML emails" and "plain text
emails"?
 
Reply With Quote
 
dorayme
Guest
Posts: n/a
 
      09-06-2009
In article <h807un$b54$(E-Mail Removed)>,
Tomasz Chmielewski <(E-Mail Removed)> wrote:

> dorayme wrote:

....
> Unfortunately, I don't have much control over HTML code, so I can't do
> it this way.


I did not really know what you are doing. Still don't. Are you in some
group that email each other, some sort of email list and you want to
make a web record of it all?

I subscribe to a list that about a year or two ago suddenly went all
google, and you can choose how to read and write to it. You can simply
go to Google and sign in and do the business there.

Or you can get every email direct to your email program.

Or you can get a digest of the emails once a day (menu of posts at the
top - each menu item also being a link to go to G and see it there if
you want - and all the messages at the bottom).

Or you can get just the menu of posts (a sort of cut down of the digest
sans the actual messages) in an email.

(I liked it the way it used to be better, just email - but this has the
advantage of all the threads being there to be searched easily.)

I am just saying there are different ways to manage a bunch of people
emailing things to each other and the idea of making a webpage of email
messages sounds like quite a task for someone to sit and do. There are
probably automated alternatives you might explore (as in the case I
outline above). Please ignore all this if it is not relevant.

--
dorayme
 
Reply With Quote
 
Tomasz Chmielewski
Guest
Posts: n/a
 
      09-07-2009
dorayme wrote:
> In article <h807un$b54$(E-Mail Removed)>,
> Tomasz Chmielewski <(E-Mail Removed)> wrote:
>
>> dorayme wrote:

> ...
>> Unfortunately, I don't have much control over HTML code, so I can't do
>> it this way.

>
> I did not really know what you are doing. Still don't. Are you in some
> group that email each other, some sort of email list and you want to
> make a web record of it all?
>
> I subscribe to a list that about a year or two ago suddenly went all
> google, and you can choose how to read and write to it. You can simply
> go to Google and sign in and do the business there.
>
> Or you can get every email direct to your email program.


Note that not all lists are open public lists; note that subscribers may
wish that their emails show up in the archive with proper formatting.

Anyway, the problem is solved, thanks all for the input.

--
Tomasz Chmielewski
http://wpkg.org

 
Reply With Quote
 
Jan C. Faerber
Guest
Posts: n/a
 
      09-07-2009
On Sep 6, 3:24*pm, "Jan C. Faerber" <(E-Mail Removed)> wrote:

Now I ask myself (respecting that JavaScript might not be object
orientated) if you could not use such a script to fill in always
different text in different <td>s. That would be 'reusability'.

Of course I know now that HTML is not a programming language and some
people turn off JavaScript in their browsers.

So one question is left for me at this point:

How manage big online news portals whith rapidly changing content the
actualisation of their pages?
Do they open the source code?
Or do they have an interface?
I think 'contribute' in CS4 Webstandard is something for blogs.
But I never heard about something for magazines.

A person who writes the stories for an online magazine - does he
automatically have to know about HTML?
Or is it another person who takes the article and places it into the
right places of the huge portal?
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
XSD to allow A-Z 0-9 and spaces, but not leading/trailing spaces johkar XML 2 12-10-2009 09:24 AM
how can I show spaces as spaces, part 2 Tomasz Chmielewski HTML 14 09-10-2009 03:54 PM
Re: How to trim a String trailing spaces, but not leading spaces? Roedy Green Java 3 09-14-2008 02:10 AM
Re: How to trim a String trailing spaces, but not leading spaces? John B. Matthews Java 4 09-12-2008 05:28 AM



Advertisments