Jump to content
Updating IPB tonight Read more... ×

Archived

This topic is now archived and is closed to further replies.

corillo181

a quick help not php

Recommended Posts

can someone please give me or tell me how to do a function that if a username got white space in it the script would pop up and say " can't have blank space on your username"..

sorry i know this is not java but i need it real quick and this is the only forum i come to thanx for any one that can help me as quick as possible

Share this post


Link to post
Share on other sites
Hi there,

try this

[code]function checkSpace(text){
if(text.indexOf(" ")!=-1)
alert("Can't have blank space in your username");
}[/code]

HTH

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.