CariDotMy

 Forgot password?
 Register

ADVERTISEMENT

View: 1815|Reply: 5

Dreamweaver: form validation, nk minimum characters

[Copy link]
Post time 2-4-2008 07:28 PM | Show all posts |Read mode
nak tumpang tnya laa...mcmna nak validate kan form yg akan diisi oleh user ... nk minimum kan character tu dari 6 character jer....n maximum is 12 character. yg tau maximum character jer....minimum tak tau
Reply

Use magic Report


ADVERTISEMENT


Post time 2-4-2008 08:11 PM | Show all posts

Reply #1 mofarby's post

Sorry, aku tengah sibuk sket ni... hopefully akan ada orang tolong ko settlekan issue ni. Maybe besok aku leh masuk tolong ko pasal ni. Good luck.
Reply

Use magic Report

Post time 5-4-2008 01:22 AM | Show all posts
nape tak pakai javascript je? ko pnya form ni dalam web based ke?html? or.....
Reply

Use magic Report

 Author| Post time 6-4-2008 12:28 AM | Show all posts
haah...web based pkai utk buat php nyer page. kalau pkai javascript ada tak script dia? tp javascript ni kadang2 dia tk run bler dah msuk dlm coding tu...contohnyer javascript utk no right click...bler msuk jer tp still bleh right click. ermm...helpp...
Reply

Use magic Report

Post time 8-4-2008 08:10 AM | Show all posts
<script language="JavaScript" >

function validateRequired(objInput)

{

        if (objInput.value == "")

        {

                alert("Required fields.");

        }

}



function validateMinLength(objInput,sValue)

{

        if (objInput.value != "" && objInput.value.length < sValue)

        {

                alert("Min " + sValue + " characters. ");

        }

}



function validateMaxLength(objInput,sValue)

{

        if (objInput.value != "" && objInput.value.length> sValue)

        {

                alert("Max " + sValue + " characters. ");

        }

}

</script>

kat form
<input type="input1" name="input1" onchange="validateMinLength(this, 4);

aku tak test jalan ke tak... try dulu
Reply

Use magic Report

Post time 11-4-2008 09:28 AM | Show all posts
nie ha aku bg link berkaitan dgn soklan ko tu..pepandai ler ko paham...

http://javascript.internet.com/forms/val-external-js.html

[ Last edited by  orkedz at 11-4-2008 11:16 AM ]
Reply

Use magic Report

Follow Us
You have to log in before you can reply Login | Register

Points Rules

 

ADVERTISEMENT


Forum Hot Topic

 

ADVERTISEMENT


 


ADVERTISEMENT
Follow Us

ADVERTISEMENT


Mobile|Archiver|Mobile*default|About Us|CariDotMy

8-1-2025 12:43 PM GMT+8 , Processed in 0.066578 second(s), 19 queries , Gzip On, Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

Quick Reply To Top Return to the list