KiXforms Forum Index KiXforms
The Forum for the KiXforms Community
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Quick Links 
Site News
Downloads
Documentation
Donations
Script Archive
Tracking Systems

MaskedTextBox for IP Address input?

 
Post new topic   Reply to topic    KiXforms Forum Index -> Advanced Scripting
View previous topic :: View next topic  
Author Message
jmuirh
KiXforms Novice
KiXforms Novice


Joined: 05 Aug 2008
Posts: 4

PostPosted: Wed Sep 03, 2008 4:43 am    Post subject: MaskedTextBox for IP Address input? Reply with quote

Anyone done something like this yet, possibly including the "intelligence" to determine that the IP is valid (in other words, digits/numbers within ranges valid for each octet segment of the IP)?

Merely curious. Smile

Thanks.
Back to top
View user's profile Send private message
Gargoyle
KiXforms Aficionado
KiXforms Aficionado


Joined: 30 Dec 2003
Posts: 366
Location: Arizona

PostPosted: Wed Sep 03, 2008 12:22 pm    Post subject: Reply with quote

There are several solutions that are possible.

When do you want to check the input? As they type or when the leave the text box, or possibly just before you perform some type of function.

Are each of the Octets in seperate text boxes or just a single one.

All use different methods.

_________________
Parents were invented to make children happy by giving them something to ignore.
Back to top
View user's profile Send private message
jmuirh
KiXforms Novice
KiXforms Novice


Joined: 05 Aug 2008
Posts: 4

PostPosted: Wed Sep 03, 2008 2:16 pm    Post subject: Reply with quote

Gargoyle wrote:
There are several solutions that are possible.

When do you want to check the input? As they type or when the leave the text box, or possibly just before you perform some type of function.

Are each of the Octets in seperate text boxes or just a single one.

All use different methods.


I was thinking a single box for all octets w/ some static "dots" and an "as they type" validation.
Back to top
View user's profile Send private message
Gargoyle
KiXforms Aficionado
KiXforms Aficionado


Joined: 30 Dec 2003
Posts: 366
Location: Arizona

PostPosted: Thu Sep 04, 2008 6:49 am    Post subject: Reply with quote

Ok,

So you want something like this...
Code:


$textbox_ip.keydown="validate{$textbox_ip.text)"

Function Validate ($input)
  $Parts = Split($input,".")
  For each $Part in $Parts
    If $part > 255
      $rc = messagebox("warning","invalid entry")
    EndIf
  Next
EndFunction


Not the only way to do it, but gives you something to work with.

_________________
Parents were invented to make children happy by giving them something to ignore.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    KiXforms Forum Index -> Advanced Scripting All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group