Setting Form fields from a database

Results 1 to 2 of 2

Thread: Setting Form fields from a database

  1. #1
    Kevin Hann Guest

    Default Setting Form fields from a database

    I have a form that reads data from a database. I can set the value of the text fields using &#060;%=value%&#062;.<BR>But I want to set the values by using<BR>It does not seem to work.<BR><BR>As an alternative how can I get a drop down box to be set from a variable.

  2. #2
    Nathan Pond Guest

    Default RE: Setting Form fields from a database

    Correct me if I&#039m wrong, but it seems to me that you are trying to mix server side logic with client side scripting. You cannot connect to a database through client side code (easily anyway). <BR><BR>Anyway.. could you try:<BR><BR>document.formname.textname.value=&#060 ;%=value %&#062;<BR><BR>that will just let the javascript set the value instead of ASP putting it in directly.<BR><BR>If this isn&#039t what you want let me know, and give me some more specifics, and I&#039ll do my best to help you out.<BR><BR>Regards,<BR>Nathan Pond

Posting Permissions

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