Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

formating text to html mode 1

Status
Not open for further replies.

mici

Programmer
Jun 2, 2003
36
0
0
IL
i read an email and desplay the content on the website, in a pop - up window (window.open)

the text however is being displayed there as a plain text with no paragraphs or line breaks. How do i change it to html mode as in the email .?
 
"Anything scripted that runs on the client side is stuff that obviously can't be important, period."

I consider my users, and their experience, very important.
The small amount of time that it takes it takes to validate server side, that is saved by your java script isn't all that important -- especially if that validation method makes the site unusable to anyone who may be a paying customer.
A friend of mine who is a huge advocate of anti-js once said something along the lines of: "If the page still displays and works without me having to the risk of <b>executing</b> your code on my machine, then I just may buy products from you. You don't run every program that appears in your e-mail box, because that would be insecure -- so why would you allow someone's code to run on your machine automatically?"

But for writing dynamic content to windows, I use client-side as I've described. I also use JavaScript to make sure all forms are properly filled-out, numbers are formatted, etc. not as a security measure for my application, but as a convenience to the vast majority of my users.
And that's fine... as long as I don't need to execute your javascript to get the next page, use your navigation, and/or see your content. "If I'm stranded at checkout because of having js turned off, I can't buy your products -- so I'll shop elsewhere. That's not only money you lose, but money your competitor gains.
 
I would do 0 validation in client-side!
You can validate in php, so why not do it there, even if the customer has to reload the page?

I actually think it's better using Flash, than Javascript! As then they will see nothing or everything, instead of everything or partial errors.

Olav Alexander Mjelde
Admin & Webmaster
 
I disagree. I would do validation on both the client AND server side. It's quite a pain in the ass to have to press the back button to make changes, and even if you set it up so the errors display on the same form, I think a user appreciates being told what data is wrong before submitting the data.

again, that's my opinion.

*cLFlaVA
----------------------------
[tt]insert funny quotation here.[/tt]
 
You can submit to self, with different "steps", eg. step_1, step_2, etc. and tell the user (by what field), what is wrong/missing.

Olav Alexander Mjelde
Admin & Webmaster
 
Hi Everyone!

Thank you ! the <pre> did help!
and yes i am using ms sql server - server-side code. (ASP)

This Forum is excellent!!

Mici
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top