Javascript circling the brain.....

Discussion in 'Scripting & Programming' started by sirdragon, Mar 12, 2004.

  1. sirdragon

    sirdragon Nibble Poster

    70
    0
    11
    :duel Hi guys

    got a little annoying problem with my javascript. The tutors not a lot of help just repeats what i already know......

    what i need to know is where i have stalled........

    Just WROTE ALL THIS AND IT BLANKED OUT NEEDED REFRESH :evil: :evil:

    as i was saying................................................................


    Basically this is the problem

    setting up a form to be validated using javascript.

    form name="userdata"
    function that is called to validate name="validateForm(form)
    sub function having problems with name="validatenumber(form.name.value)
    validating a code consiting of 2letters 5numbers
    code is user entry into form in text box name="number"
    :hang
    problem
    to validate by ensuring first 2 digits are letters and last 5 are numbers
    used loops to try and count out digits and send to expressions to validate their nature.
    not sure if loops are right or the means to validate although i have been told its the right track.

    enclosed a text :deal doc with the offending script excerpt, plus loads of 'inprogress' notes........

    basically

    HELP :helpread

    ps

    :iluvcf

    martin
    having trouble with getting the script to run though 3 ( maybe it should be 2) instances and then switch to another loop. in order to check the letters/numbers.
     

    Attached Files:

  2. SimonV
    Honorary Member

    SimonV Petabyte Poster

    6,652
    179
    258
    Sorry Martin cant help you on this one as JS is not my area. :huh
     
    Certifications: MOS Master 2003, CompTIA A+, MCSA:M, MCSE
    WIP: Keeping CF Alive...
  3. sirdragon

    sirdragon Nibble Poster

    70
    0
    11
    doesnt seem to be one of my strengths either :lol:

    arh wellllll will persits until i get through it lol


    cheers martin
     
  4. sirdragon

    sirdragon Nibble Poster

    70
    0
    11
    :duel hi guys

    just figured out the javascript for the :daz CIT124 assessment, but would like to spruce up the alert() boxes a bit.

    does anyone know how to insert a line break, return break, or
    into the alert() box. :bam

    ie, alert("I wanna go down to next line
    here");

    cannot find any clues in the books.
    :morebeer
    martin
     

Share This Page

Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.