Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4

Thread: age pop up

  1. #1
    New to the CF scene
    Join Date
    Jan 2010
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    age pop up

    Message pop up. Sorry about the bad topic name.


    Hi Not shure if this is a html or Java issue. If you go to the following website and scrole down a bit

    http://uktv.co.uk/dave/blogpost/aid/654118

    Type in anything for a Enter trailer unlock code: and as it will be wrong, a pop up window appears

    Can someone tell me how this is done please.

    P.S. The code is wibbly

    Thanks TIA

    Desmond.
    Last edited by otuatail; 09-29-2012 at 06:24 PM.

  • #2
    Senior Coder xelawho's Avatar
    Join Date
    Nov 2010
    Posts
    2,983
    Thanks
    56
    Thanked 557 Times in 554 Posts
    Code:
    <input class="go" type="submit" value="GO" onclick="CheckNPlay();">
    </div>
    </div>
    <script type="text/javascript">
    function CheckNPlay(){
    if($.md5($('#passbox').val().toLowerCase()) == '76a53892029118e7719b0e3d6d0b30c5')
    {// etc
    probably the worst form of password validation you could have, but anyway...

  • #3
    New to the CF scene
    Join Date
    Jan 2010
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Sorry you missed the point. I am not trying to write the website you saw.
    I wan't to know how the guys who wrote the red dwarf page did this pop up. If I typed in the correct password that they created 'wibbly' I was allowed in.

    If I put the wrong password in a pop up window told me it was wrong

    I need to know how to create a pop up window.

    Desmond.

  • #4
    Senior Coder xelawho's Avatar
    Join Date
    Nov 2010
    Posts
    2,983
    Thanks
    56
    Thanked 557 Times in 554 Posts
    I'm not missing the point at all. Have a look at the code I posted:
    1 click the button to fire the function
    2 compare the value of the input box to the password
    3 if it's the same, run the code
    4 if not, pop an alert

    if you're asking how to code an alert, that would be
    Code:
    alert("hello")


  •  

    Posting Permissions

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