Dynamically generated INPUT tag

Results 1 to 2 of 2

Thread: Dynamically generated INPUT tag

  1. #1
    Join Date
    Dec 1969

    Default Dynamically generated INPUT tag

    Hello, I want to store values dynamically generated from a database (after a page load) in a INPUT field.. <BR><BR>I have it working with a drop-down menu, but I got the code from an example, which is not telling me how to do it with a input field. Can Someone please help?? <BR><BR>Set optListItem = Document.CreateElement("OPTION") <BR> optListItem.Value = ("value not nessesary") <BR> optListItem.Text = sTotaal &#039; value from function <BR>Document.All("select_name").Options.Add optListItem <BR><BR>Thanx!

  2. #2
    Join Date
    Dec 1969

    Default RE: Dynamically generated INPUT tag

    Do you mean that you want to create the entire &#060;INPUT ...&#062; via client side JS code? If so, are you aware that it WILL NOT WORK with Netscape and other browsers?<BR><BR>I would assume that this is acceptable to you, since you are using code for adding &#060;OPTION&#062;s that won&#039;t work with Netscape or other browsers, already.<BR><BR>Anyway, if this is the case, how about looking on the MSDN site for the docs for "CreateElement"??? All you need is a different element type.<BR><BR>*****************************<BR><BR> ** OR ** ...<BR><BR>Or do you mean that you want to simply put the *value* of the &#060;INPUT ...&#062; in place?<BR><BR>In which case the JS code is simply:<BR><BR>document.formName.elementName.value = &#039;....whatever...&#039;;<BR><BR>This is *the* most fundamental of JS coding and is not advanced, at all.<BR><BR>

Posting Permissions

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