navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

write from database to textbox

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> write from database to textbox
Page: [1]
 
yogaboy

 

Posts: 377
Joined: 5/22/2004
Status: offline

 
write from database to textbox - 11/1/2004 5:17:49   
I want to fill out a form with fields from a database.

I can get this to work -
<input type="text" size="30" name="txtFirstName" maxlength="30" value="<% Response.write myRS("FirstName") %>">

but I want to use something like -

<% document.Form.txtFirstName.value = myRS("FirstName") %>

because then I can put all the writing in a big chunk at the top and it makes it neater and easier to fix/change. The problem is I get an error message when I do this -

Error Type:
Microsoft VBScript runtime (0x800A01A8)
Object required: ''


I have 27 form fields, so I don't really want to use the first method, any ideas???

Iain
cliffdeen

 

Posts: 155
Joined: 4/12/2004
From: Mckinney, TX
Status: offline

 
RE: write from database to textbox - 11/1/2004 22:05:42   
well the easy way is to let frontpage and a drw do the work for you to retrieve the data. Once it is retrieved, insert a form within the data results region. Within the form, insert the text boxes/text areas. For each text box, define the field value you wish to have in that particular box. You can name the box anything but the initial value needs to be the equivalent of the field you want displayed there. In the value field - insert the field value in this format:
<%=fp_FieldVal(fp_rs, "name of field goes here")%>.
When the page is loaded, the connection is established via a web bot in frontpage and the values are loaded. Note, upon the original data retrieve, you will have the fields showing as <<field name>>. Once you have defined the text boxes with the code as described about you can remove all the <<field name>> references and just use the Fieldval names. Once the page is loaded your users can update those fields with new values and then using a post - you can send it to a update/confirm page where those items are reloaded into the db. If you don't want someone to update a particular field, then within frontpage - go to html view. find the line that has the text box value described and just place the word: "readonly" in front of the value statement.

Hope this helps
cliff

(in reply to yogaboy)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> write from database to textbox
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts