Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > assigning values to form inputs

Reply
Thread Tools

assigning values to form inputs

 
 
Guest
Posts: n/a
 
      08-23-2004
T.I.A. to whomever replys...

I'm new to ASP. I'm reading input from a flat-file (not a DB) using a
vbscript routine to display on an ASP form so that a user can update the
info, submitting the form back to update the file. When I tried the html
command:

document.myformname.myfieldname.value = myvarname

I get an object error msg. What is the correct ASP syntax for doing this?


 
Reply With Quote
 
 
 
 
Norman Yuan
Guest
Posts: n/a
 
      08-24-2004
Where that line of code did you put?

It is client end script and only runs in client browser. It has nothing to
do with ASP.NET server side code.

<CPY> wrote in message news:(E-Mail Removed)...
> T.I.A. to whomever replys...
>
> I'm new to ASP. I'm reading input from a flat-file (not a DB) using a
> vbscript routine to display on an ASP form so that a user can update the
> info, submitting the form back to update the file. When I tried the html
> command:
>
> document.myformname.myfieldname.value = myvarname
>
> I get an object error msg. What is the correct ASP syntax for doing this?
>
>



 
Reply With Quote
 
 
 
 
Guest
Posts: n/a
 
      08-24-2004
Please disregard my previous code example and let me rephrase my question as
I'm fairly new to internet/intranet programming. By the way, this is a
'classic ASP' question, not necessarily an ASP .NET question; if I'm in the
wrong newsgroup, please direct me to the right one.

In the sample-code below, what syntax would I use in VBscript on the
server-side to PROGRAMATICALLY set the default-value of the 'codeinput'
field to 'AA1'?

<html><body>
<form action="asptest3.asp" method="post" name="myform">
<!-- default value 'AA1' -->Enter 3-letter Code: <input type="text"
name="codeinput" value="AA1" size="3">
<br><br>
<center><input type="submit" value="<< Update >>"></center>
</form>
<%
dim codeinput

codeinput=Request.Form("codeinput")
If codeinput<>"" then
Response.Write("The code you entered was: " & codeinput)
End If
%>
</body></html>

Thanks again for your help...


"Norman Yuan" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Where that line of code did you put?
>
> It is client end script and only runs in client browser. It has nothing to
> do with ASP.NET server side code.
>
> <CPY> wrote in message news:(E-Mail Removed)...
> > T.I.A. to whomever replys...
> >
> > I'm new to ASP. I'm reading input from a flat-file (not a DB) using a
> > vbscript routine to display on an ASP form so that a user can update the
> > info, submitting the form back to update the file. When I tried the

html
> > command:
> >
> > document.myformname.myfieldname.value = myvarname
> >
> > I get an object error msg. What is the correct ASP syntax for doing

this?
> >
> >

>
>



 
Reply With Quote
 
Karl
Guest
Posts: n/a
 
      08-24-2004
microsoft.public.inetserver.asp.general

The only way to do it in ASP is to output the value in the tag

<%
dim someValue = "defaultValue
%>
<input type="submit" value="<%=somevalue%>">


Karl

<CPY> wrote in message news:(E-Mail Removed)...
> Please disregard my previous code example and let me rephrase my question

as
> I'm fairly new to internet/intranet programming. By the way, this is a
> 'classic ASP' question, not necessarily an ASP .NET question; if I'm in

the
> wrong newsgroup, please direct me to the right one.
>
> In the sample-code below, what syntax would I use in VBscript on the
> server-side to PROGRAMATICALLY set the default-value of the 'codeinput'
> field to 'AA1'?
>
> <html><body>
> <form action="asptest3.asp" method="post" name="myform">
> <!-- default value 'AA1' -->Enter 3-letter Code: <input type="text"
> name="codeinput" value="AA1" size="3">
> <br><br>
> <center><input type="submit" value="<< Update >>"></center>
> </form>
> <%
> dim codeinput
>
> codeinput=Request.Form("codeinput")
> If codeinput<>"" then
> Response.Write("The code you entered was: " & codeinput)
> End If
> %>
> </body></html>
>
> Thanks again for your help...
>
>
> "Norman Yuan" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
> > Where that line of code did you put?
> >
> > It is client end script and only runs in client browser. It has nothing

to
> > do with ASP.NET server side code.
> >
> > <CPY> wrote in message news:(E-Mail Removed)...
> > > T.I.A. to whomever replys...
> > >
> > > I'm new to ASP. I'm reading input from a flat-file (not a DB) using a
> > > vbscript routine to display on an ASP form so that a user can update

the
> > > info, submitting the form back to update the file. When I tried the

> html
> > > command:
> > >
> > > document.myformname.myfieldname.value = myvarname
> > >
> > > I get an object error msg. What is the correct ASP syntax for doing

> this?
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Asp.net web form and controls .vs html form and inputs Ellie ASP .Net 2 10-30-2008 01:04 PM
Assigning methods to objects, and assigning onreadystatechange to an XMLHttpRequest -- an inconsistency? weston Javascript 1 09-22-2006 09:33 AM
Generating Form Inputs HugeBob XML 4 08-07-2006 01:22 PM
Want to auto-add form inputs to a grand total. giancarlodirisioster@gmail.com Javascript 9 10-15-2005 09:15 PM
Differences in UTF-8 html form inputs Realbot Perl Misc 3 01-10-2005 10:15 PM



Advertisments