Author |
Topic |
|
didbou
Practical
17 Posts |
Posted - 07 Mar 2008 : 11:51:34
|
Good morning, I'm not (yet) a JS specialist ;-) I'll know the JS to check the email format in my form. Thank'a a lot |
|
s.dav
Site Admin
Italy
3364 Posts |
Posted - 07 Mar 2008 : 12:01:52
|
function checkEmail (sEmail) { var re = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-]{2,})+\.)+([a-zA-Z0-9]{2,})+$/; if (re.test(sEmail)) return true; else return false; } |
Regards, Davide |
|
|
didbou
Practical
17 Posts |
Posted - 07 Mar 2008 : 15:30:43
|
Thank's Davide but how write it into HTML Editor?
Regards |
|
|
s.dav
Site Admin
Italy
3364 Posts |
Posted - 08 Mar 2008 : 14:00:18
|
Open the page properties, go to the section Scripts/Events, click on the "Header Code" tab, create a <Script> block and paste the code above inside it.
Then in the Form, OnSubmit event execute the function above. |
Regards, Davide |
|
|
Testa
Expert
Italy
74 Posts |
|
s.dav
Site Admin
Italy
3364 Posts |
Posted - 17 Mar 2009 : 08:56:30
|
The function checkEmail checks for a valid email address so you have to give it a valid string that specifies an email address
Act as follows: 1- create a form, draw into it a text field and name it "txtEmail"; then draw into it a button and set its type to "submit"
2- go to the page properties and create a script block then paste into it the checkEmail function. 3- under it write this additional function
// this function checks if the form contains all required data function checkInput() { var s=""; var semail=document.getElementById('txtEmail').value; if (!checkEmail(semail)) s+="Please write a valid email address!\r\n";
if (s) { alert(s); return false; } return true; }
4- in the onSubmit event of the form write "return checkInput();" 5- you can customize the "checkInput" function so it can checks all fields of your form.
|
Regards, Davide |
|
|
Testa
Expert
Italy
74 Posts |
|
arthur
Practical
23 Posts |
Posted - 14 Jan 2010 : 09:29:41
|
i have just downloaded yesterday your program , nawe i want to make a field that sombody can send me a email and i surst your help and forum for this i know i have to make a form submitbutten and than its blank for me can sombody gif me the wricht directions pleas ? |
|
|
s.dav
Site Admin
Italy
3364 Posts |
Posted - 14 Jan 2010 : 17:35:03
|
Please check the program help under the "form object" and "form settings";
the basic idea behind all is: 1- create a form object 2- draw input elements into the form 3- set the form for using the "built in email processor" 4- draw a "submit" button into the form
you're done ;-) |
Regards, Davide |
|
|
arthur
Practical
23 Posts |
Posted - 15 Jan 2010 : 08:07:14
|
ok thanks that i did olready but id didnt do anything i have as mi brouzer chrom from google and nawe i tride it with windows brouzer and it lookt that he liked to send samthing .. but nathing kame to mi email adres do you have to export it furst to a surver for that ? and is it podible the problem was chrom of google ? |
|
|
s.dav
Site Admin
Italy
3364 Posts |
Posted - 15 Jan 2010 : 08:54:03
|
If your page is .asp you need to upload into a server that supports .asp servers; if your page is .php you need to upload it into a server that supports .php pages. The email processor will never work locally. |
Regards, Davide |
|
|
arthur
Practical
23 Posts |
Posted - 15 Jan 2010 : 12:22:44
|
ok thanks |
|
|
|
Topic |
|