display input from form

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kabuto
    New Member
    • Oct 2006
    • 4

    display input from form

    how do i get the input from a form and then display it using document.write?
  • Seith
    New Member
    • Oct 2006
    • 16

    #2
    Um, I don't know how to do it with JS

    Would you be willing to learn how to use PHP becuase ECHO would be better in my opinion =)

    Comment

    • kabuto
      New Member
      • Oct 2006
      • 4

      #3
      Originally posted by Seith
      Um, I don't know how to do it with JS

      Would you be willing to learn how to use PHP becuase ECHO would be better in my opinion =)
      i would prefer to use JS but if you could show it using any other way, i'll be interested too,

      Comment

      • ronverdonk
        Recognized Expert Specialist
        • Jul 2006
        • 4259

        #4
        Have a look at this JS form tutoral Accessing and validating forms using Javascript
        It probably gives you the information you are looking for,

        Ronald :cool:

        Comment

        • kabuto
          New Member
          • Oct 2006
          • 4

          #5
          Originally posted by ronverdonk
          Have a look at this JS form tutoral Accessing and validating forms using Javascript
          It probably gives you the information you are looking for,

          Ronald :cool:
          yes, that's it..
          thanks a lot

          Comment

          • rhys
            New Member
            • Nov 2006
            • 25

            #6
            Originally posted by ronverdonk
            Have a look at this JS form tutoral Accessing and validating forms using Javascript
            It probably gives you the information you are looking for,

            Ronald :cool:
            I have an issue related to these discussions...

            I am writing a table maintenance program, where users can update their existing data. (Debian, PHP4, PostGreSQL7.4) I have no problem displaying existing data using php and echo. My problem is that the first choice in a "select" <option value...> list overrides the existing data. I've tried loading up the first option with existing data values, to no avail. I used switch/case, in the pgsql section after it loads the array, to load the display description, but I can't get it to display. php/echo, single quotes, double quotes, none apparently work. (case 2: $labdisp = "bad labor"; echo "$labdisp"; eg.) The display string in a select option is not quoted, so I'm wondering if I am asking the impossible.

            My option/value line resembled varieties of this:
            <option value = "<? echo $array["labor"]; ?> <? echo $labdisp; ?>
            or just $labdisp (quoted various ways.)

            Does anybody know how to get existing values to display in the entry field, overriding the first choice in the option list? I thought my hack would work, but I was WRONG.

            I would say it's urgent, but after this many years, nothing is urgent.

            I thank any angels in advance who have suggestions!! God bless!!

            - Rhys

            Comment

            • ronverdonk
              Recognized Expert Specialist
              • Jul 2006
              • 4259

              #7
              Rhys, show some code because I cannot deduct from your sample what the problem is. Anyway the statement that you showed is incorrect [php]<option value = "<? echo $array["labor"]; ?> <? echo $labdisp; ?>
              [/php]
              this is the correct format (when defining it in HTML code):
              [php]
              <option value = "<? echo $array['labor']; ?>"><? echo $labdisp; ?></option>
              [/php]

              Ronald :cool:

              Comment

              Working...