Results 1 to 4 of 4

Thread: javascript innerText, help me out!!

  1. #1
    ines
    Guest
    This is my problem;

    I'm making this 'exercise' where users have to fill in a word in a textbox, when finished they click on a button and I do a javascript validation. The correct answers get innerText = 'correct' in the td next to the textbox and the wrong answers get innerText='wrong'.

    BUT!

    I can't seem to get any innerText inside the form. if I put the TD outside the form (but in the same table) it works, if I try to put the td that has to hold the innerText inside the form tags it doens't work.

    I don't get it. Can somebody please help me, at least try to explain me why this is happining. This only has to work on IE cause I have this code running on an intranet.

    Thanks for any help

  2. #2
    Matthew Gates
    Guest
    Try using this code.


    Code:
    <Script Language="JavaScript">
    var correctMsg = "correct"
    window.status = correctMsg;
    </Script>

  3. #3
    Matthew Gates
    Guest
    Or this will work:


    Code:
    <Script Language="JavaScript">
    defaultStatus = "Hello World"
    </Script>

  4. #4
    ines
    Guest
    Thanks for answering, I found out what I was doing, I put a ; too many (being a silly cow is a tough life!!)

    and I had also names the textbox the same name as the id of the td-tag, which caused some confusion.

    bye

Posting Permissions

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



Click Here to Expand Forum to Full Width