Webmaster Forum


Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Coding Forum Problems with your code? Let's hear about it.

Lionsanime Directory   ClickBooth Network   V7N Directory

Reply
 
LinkBack Thread Tools Display Modes
Old 06-10-2007, 12:09 AM   #1 (permalink)
Inactive
 
Join Date: 06-10-07
Posts: 1
iTrader: 0 / 0%
Latest Blog:
None

Alternus is liked by many
Need help with creating an "error" on registration :)

Hey everyone , i'm having a problem. I'm working on some form, and its a quite simple registration page that includes first name, last name, username, email, password, and so on.

now, instead of doing for example:
if(isEmpty(account)){
document.frm.username.focus();
alert('*Username most contain atleast 3 characters';
return false;
}

i was doing something more like this:
if(isEmpty(account)){
document.frm.username.focus();
document.frm.eror.value='*Username most contain atleast 3 characters';
return false;
}

the "account" is just variable.

the "isEmpty" is a code i've made aswell, that works like that:
if the txt is less than 3 characters, it will return false.

frm is the form name, and username is the input name, where i enter the username i nrhe registration.

i've made a simple <textarea> code named "eror" that just works simply as it looks, if the username input is empty it will write down the error on the textarea code instead of giving that annoying alert, which is quite disturbing

now, the problem is that i dont like it like that aswell, and i was thinking if you guys could help me out with making that error just appear at the top of the screen, above all the inputs i've made, like a normal registration site that if your clicking the submit it will just simply type the error in red color above the form itself.
Alternus is offline  
Add Post to del.icio.us
Reply With Quote
Sponsored Links
SEO Hosting by HostGator  Advertise Here  Buy Blog Links
Old 06-10-2007, 06:24 AM   #2 (permalink)
Contributing Member
 
Join Date: 02-10-07
Posts: 347
iTrader: 1 / 100%
Latest Blog:
None

ScriptMan is just really niceScriptMan is just really niceScriptMan is just really niceScriptMan is just really niceScriptMan is just really niceScriptMan is just really niceScriptMan is just really niceScriptMan is just really niceScriptMan is just really niceScriptMan is just really niceScriptMan is just really nice
I can't help you, but you really should restrict the input and validate it. As in, allowed characters, email in the form of string @ string and so on.
__________________
ScriptMan
Gardening?
ScriptMan is offline  
Add Post to del.icio.us
Reply With Quote
Old 06-10-2007, 07:36 AM   #3 (permalink)
v7n Mentor
 
Costin Trifan's Avatar
 
Join Date: 04-13-07
Location: Romania
Posts: 2,927
iTrader: 0 / 0%
Costin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web pro
Why don't you try to use a span to keep your error msg and display it on error?

Set the initial display value of the span to none and make it visible on error.

hth
__________________
JUNE - JavaScript Framework
Costin Trifan is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum

Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating a "coupon corner" interface allreal Coding Forum 1 02-28-2007 02:04 PM
"Method POST not allowed" error east_pole Web Design Lobby 3 02-16-2007 02:57 PM
"FREE REGISTRATION SOFTWARE" ilajeni Computers & Internet 8 06-30-2006 02:31 PM
PHP "Service Unavailable" caused by code error? gnznroses Coding Forum 14 03-12-2006 01:16 PM


Sponsor Links
Get exposure! Get exposure! Find Scripts Web Hosting Directory Get exposure! SEO Blog


All times are GMT -7. The time now is 06:45 PM.
© Copyright 2008 V7 Inc