By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,960 Members | 2,241 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,960 IT Pros & Developers. It's quick & easy.

Help in editing value of textbox

P: n/a
Hi everyone,

I want to know how can i edit a value in textbox in html .
I have a field where I have already put a value from database but i
also want to edit it .
for example ,if in a textbox i put a value 'abc' set in the value
attribute <inptu type=text value="<%= var1%>"> .now I want to change
the value in the textbox and add it to database. hoe should I do it.

May 2 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
ru******@gmail.com wrote:
I want to know how can i edit a value in textbox in html .
From an HTML point of view - you change the value of the value attribute.
From a user point of view - you type in the form control.

You can also play around with JavaScript, but that is somewhat outside the
scope of this group and is the realm of comp.lang.javascript.
I have a field where I have already put a value from database but i
also want to edit it for example ,if in a textbox i put a value 'abc' set
in the value attribute <inptu type=text value="<%= var1%>"> .now I want to
change the value in the textbox and add it to database. hoe should I do
it.


This sounds like a case of submitting the form (so the input should be in a
form element, with the action attribute set to the URL of a script and the
method attribute set to "POST" (because you are changing something on the
server, if you were searching for something you would use "GET"). The form
would also need a submit button.

What happens then depends on your server side environment (database and
programming language). It *looks* like you are using JSP (to judge from
the "<% %>"), so asking in a group about JSP or Java (not JavaScript in
this case, JavaScript and JSP are entirely different languages) would
probably be your next stop (or googling for tutorals on basic Java, JSP and
interacting with databases in Java).

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
May 2 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.