|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi,
I need to make an InputBox() with three functions... One Makes it required, The next checks if it's a valid email and the third will write it to a MySQL database. If anyone can direct me in the right direction or knows where I can find a tutorial/information on how to go about doing this, I would much appreciate it. P.S. I have done many searches and came up with nothing other than a standard InputBox. Am I even phrasing this question correctly? Thank You, Donna |
|
#2
|
||||
|
||||
|
For what language? HTML, VB?
|
|
#3
|
|||
|
|||
|
i was thinking vb, most of my pages are done in asp, i do have alot of vb throughout the site with some js. but i really don't care what language it is as long as the end result is the same... haha
Thanx again... Donna |
|
#4
|
||||
|
||||
|
Going with ASP/HTML - Use Javascript to make the box required, then do it again in ASP. Ditto for the validation.
The writing to the database part is quite simple, and there are tutorials everywhere on how to do this. |
|
#5
|
||||
|
||||
|
BTW - I use this function to validate email in ASP
Code:
function validateEmail(strEmailAddress)
Dim objRegExp
Set objRegExp = New RegExp
objRegExp.IgnoreCase = True
objRegExp.Pattern = "^[\w-\.]{1,}\@([\da-zA-Z-]{1,}\.){1,}[\da-zA-Z-]{2,3}$"
if objRegExp.Test(strEmailAddress) then
bResult = true
else
bResult = false
end if
validateEmail = bResult
end function
|
|
#6
|
|||
|
|||
|
Thank you, how to incorporate that into my InputBox()? I know how to do it if I was to use a form. But this is just an InputBox that pops up and my client wants it to be required before the user goes to the next page and validate the email and send it to a database.... ugg ???
![]() |
|
#7
|
||||
|
||||
|
Making a text box (<input type="text">) required has to be done via Javascript AND ASP. If a user was to turn off Javascript in their browser, then you need to fall back on ASP.
You can write a little JS "required" script by using the onSubmit event handler in your HTML form. Code:
<form name="frmFoo" onSubmit="return isRequired()"> Code:
if (document.frmFoo.txtBar.value == "") {
return false
else
return true
}
|
|
#8
|
|||
|
|||
|
Thank you again for the reply, but I t is not a form it is an InputBox which is VB or i could use a prompt whick is js. I know how to validate a form and i can make the prompt or inputbox required but i can't seem to make it do all three things at once.
|
![]() |
| Viewing: Dev Articles Community Forums > Databases > MySQL Development > InputBox and MySQL |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|