You are here: Re: Form field entry directs to diff URLs based on entry? « HTML « IT news, forums, messages
Re: Form field entry directs to diff URLs based on entry?

Posted by Toby Inkster on 11/24/46 11:46

Dustin wrote:

> <script>
> function redirect()
> {
> var domain = "exampledomain.com";
> var name = document.getElementById("name").value;
> name = name.toLowerCase(); //put everthing in lower case
> name = name.replace(" ", "");
> document.location.href = "http://" + name + "." + domain;
> }
> </script>

What if the user doesn't have Javascript enabled? Important things like
navigation shouldn't rely on client-side scripting.

What if they type in the name "John O'Groats"? Treat all user input as
hostile by default.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация