Win a copy of Learn Java with Math: Using Fun Projects and Games this week in the Beginning Java forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Junilu Lacar
  • Martin Vashko
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Scott Selikoff
  • salvin francis
  • Piet Souris

Naming policy

 
Ranch Hand
Posts: 216
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, I visit this forum quite frequently and so often see people not registering acording to naming policy. Instead of posting follow up messages and reminding them to register, wouldn't be easier just to write some client side ( or server side if You prefer) validation using javascript that is going to inforce: User Name (first name, space and last name) ???
Vladan
 
Trailboss
Posts: 23036
IntelliJ IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The software we use is not written by us. It's a commercial package. We have already done many hacks, but that is one that looks pretty dangerous.
 
author
Posts: 621
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul,
I've thought of this too and also I realize that you don't want to hack the software (and the you may be upgrading anyway) but I just looked at the registration source for the html and it seems to me that you could put a simple javascript validation in there that would (at least) act as a first line of defence. I've written such a thing if you want to try it out. Just let me know and I email you the revised page.
Sean
 
mister krabs
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sean, if you'll notice, the registration page is actually generated by a perl program. Someone would have to hack the perl program to add the JavaScript to the generated code.
 
paul wheaton
Trailboss
Posts: 23036
IntelliJ IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sean,
How much do you know about perl?
 
Sean MacLean
author
Posts: 621
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm fine with Perl. As well, adding a bit more html to the perl code is not a problem - this used to be the meat and potatoes of our web appications. If there's something you want to try, just email me directly and we can see what's up. Just so you know, I'm an application developer for big horkin' web sites .
Sean
 
Thomas Paul
mister krabs
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The problem is that we would be hacking UBB's code so that when an update to the code came along, the hack would be lost.
 
Sean MacLean
author
Posts: 621
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, I've never seen the UUB code but they have to be either reading in a template file that contains the html or they've hard coded the html throughout the Perl. Either way, you simply find the point at which the cgi calls
print "<HEAD>";
print "</HEAD>;
or (if they are using an html template just edit that like regular html).
then between these two lines paste in
< script>
function check()
...
< /script>
Find the form element tag and add the onSubmit bit.
< FORM ACTION=" ..... onSubmit="return check();">
That's it. It would take about 5 minutes. There's no risk as long as you back up the original especially since you're not changing any of the perl code logic - just what it prints to the browser. In the old days our interface guys used to tweak their html directly in the Perl (gulp) which is particularly easy since Perl isn't compiled. Of course, we've developed well beyond the good ol' days now the we develop in Java and VB mostly. Anyway, it's not my place to say what's what with regard to the Ranch...

Sean
I edited this to show the HTML and remove the Javascript error, Carl
[This message has been edited by Carl Trusiak (edited February 05, 2001).]
 
Liar, liar, pants on fire! refreshing plug:
Sauce Labs - World's Largest Continuous Testing Cloud for Websites and Mobile Apps
https://coderanch.com/t/722574/Sauce-Labs-World-Largest-Continuous
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!