Results 1 to 1 of 1

Thread: Enter Captcha First To Display/alert Anything.

  1. #1
    Join Date
    Nov 2009
    Location
    BEHIND YOU
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile Enter Captcha First To Display/alert Anything.

    This Is What You Need
    test.html < A Testing Page
    captcha.js < A JS File To See What Happen When The User Type On The Textbox
    random.js < A File That Show The Captcha Image

    test.html Code:
    Code:
    <!-- Script Created By:Amosngweien -->
    <!-- For More Scripts, Visit dynamicdrive.com -->
    <html>
    <head>
    <script type="text/javascript" src="captcha.js"></script>
    <script type="text/javascript" src="random.js"></script>
    </head>
    <body>
    <form>
    <b>For Security, Enter The Captcha</b>:<br />
    <script type="text/javascript">random_imglink()</script>
    <input type="text" id="text"/>
    <button OnClick="javascript:Checkcaptcha()">Submit</button>
    
    </form>
    </body>
    </html>
    captcha.js
    Code:
    /*
    Script Created By:Amosngweien
    For More Scripts, Visit, Dynamicdrive.com
    */
    function Checkcaptcha()
    {
    if (document.getElementById('text').value == '')
    {
    alert('Enter The Captcha!')
    }
    if (document.getElementById('text').value == 'Red Net Work')
    {
    (document.write("This Is Where You Want It To Display After Typing The Captcha"))
    }
    if (document.getElementById('text').value == 'Captcha')
    {
    (document.write("This Is Where You Want It To Display After Typing The Captcha"))
    }
    if (document.getElementById('text').value == 'Random')
    {
    (document.write("This Is Where You Want It To Display After Typing The Captcha"))
    }
    }
    random.js
    Code:
    /*
    Script Created By:Amosngweien
    For More Scripts, Visit, Dynamicdrive.com
    */
    function random_imglink()
    {
    var myimages=new Array()
    myimages[1]="Red Net Work"
    myimages[2]="Captcha"
    myimages[3]="Random"
      var ry=Math.floor(Math.random()*myimages.length)
    if (ry==1)
    document.write('<img src="http://habboemotion.com/usable/text/?text='+myimages[ry]+'&folder=6&space=" border=0 />')
    if (ry==2)
    document.write('<img src="http://habboemotion.com/usable/text/?text='+myimages[ry]+'&folder=6&space=" border=0 />')
    if (ry==3)
    document.write('<img src="http://habboemotion.com/usable/text/?text='+myimages[ry]+'&folder=6&space=" border=0 />')
    }
    Okay, Now The Arrays In Random.js, Are Just Sample Captchas To Display
    if you want 5 different captcha, Do
    Code:
    if (ry==1)
    document.write('<img src="http://habboemotion.com/usable/text/?text='+myimages[ry]+'&folder=6&space=" border=0 />')
    Until 5
    Remember To Add 2 More Arrays in Random.js
    Now, Lets Go Into captcha.js
    Find The Text : This Is Where You Want It To Display After Typing The Captcha
    For Example, You Want To Display:Hello
    Then Change All The 'This Is Where You Want It To Display After Typing The Captcha' into 'Hello'
    Now, Lets See The test.html now
    This is how it works
    Correct Captcha>Displays : e.g(Hello)
    Wrong Captcha>Alert : Enter The Captcha!
    if you are busy,
    Cannot Do,
    Put Your Code Here And I Will Generate It For You
    like
    Correct Captcha>Displays :
    OR
    Correct Captcha>Alert :
    Wrong Captcha>Alert:
    OR
    Wrong Captcha>Displays:
    How Many Different Arrays You Want?(Include No(1) Array Until The Amount You Want):
    No(1):
    ...
    And Post!
    I Zipped The Stuff In As Demo
    What Wasn't Used In This Tutorial
    PHP Scripting
    Mysql
    PHPMYADMIN
    I Used Javascript
    Because
    Php Tutorials All Are Secret Codes For Domains
    Javascript Tutorials Works For All.
    That's Why I Decided Javascript
    But Also, Very HARD To Script Them.
    Last edited by amosngweien; 12-20-2009 at 05:32 PM. Reason: Forgot Something

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •