text field besides the input tag

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • David Tay

    text field besides the input tag

    Is there a text field tag with a value parameter that I can refer to
    with Javascript besides the input tag?

    What I have been doing is using Ajax and PHP to pull data out of a
    database. Then with Javascript I have been filling the value of an
    input text field with with that data. The input text field has its
    border styled off so it looks just like text.

    Is there a cleaner way of doing this?
  • Adrienne Boswell

    #2
    Re: text field besides the input tag

    Gazing into my crystal ball I observed David Tay <david.tay20@gm ail.com>
    writing in news:0b0f7df5-6989-4221-bddf-7878eb4f5f92
    @m45g2000hsb.go oglegroups.com:
    Is there a text field tag with a value parameter that I can refer to
    with Javascript besides the input tag?
    >
    What I have been doing is using Ajax and PHP to pull data out of a
    database. Then with Javascript I have been filling the value of an
    input text field with with that data. The input text field has its
    border styled off so it looks just like text.
    >
    Is there a cleaner way of doing this?
    >
    <form method="post" action="action" >
    <div>
    <label for="field" id="field1">Fie ld</label<input type="text"
    name="name" id="field" value="recordse t.value">
    <input type="submit" value="Submit">
    </div>
    </form>

    You can style the label element and refer to it in script.

    --
    Adrienne Boswell at Home
    Arbpen Web Site Design Services

    Please respond to the group so others can share

    Comment

    • Harlan Messinger

      #3
      Re: text field besides the input tag

      David Tay wrote:
      Is there a text field tag with a value parameter that I can refer to
      with Javascript besides the input tag?
      >
      What I have been doing is using Ajax and PHP to pull data out of a
      database. Then with Javascript I have been filling the value of an
      input text field with with that data. The input text field has its
      border styled off so it looks just like text.
      >
      Is there a cleaner way of doing this?
      It's tricky to respond to a person who says what he is doing rather than
      stating what he is trying to accomplish--*why* he is doing it. I'm
      inferring that (a) you want the data to appear as text on the screen and
      (b) you also want it to be submitted along with other data from a form.

      The proper approach is (a) to display it as ordinary text where you want
      it to appear as ordinary text and (b) also to include a *hidden* input
      element on the form with the required data as its value.

      Comment

      • David Tay

        #4
        Re: text field besides the input tag

        No, you haven't bothered to explain why these items need *both* (a) to
        look like text and yet (b) function is input fields.
        Obviously you have trouble with reading English.
        The code you have seems to accomplish what it is you want superficially
        Yeah, whatever you say.

        Comment

        • Harlan Messinger

          #5
          Re: text field besides the input tag

          David Tay wrote:
          >No, you haven't bothered to explain why these items need *both* (a) to
          >look like text and yet (b) function is input fields.
          >
          Obviously you have trouble with reading English.
          Obviously you're an ingrate.
          >
          >The code you have seems to accomplish what it is you want superficially
          >
          Yeah, whatever you say.
          <plonk>

          Comment

          Working...