473,320 Members | 2,048 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

How can show "abc" in textbox when click one botton

Hello!
I'm Jim
by asp
How can show "abc" in textbox when click one botton?

Jul 19 '05 #1
9 3569
msnews.microsoft.com wrote:
Hello!
I'm Jim
by asp
How can show "abc" in textbox when click one botton?


You can't. ASP is server-side technology.By the time a user can click a
button, ASP is no longer running.

You need to use client-side code for this. In the future, your client-side
coding questions should be asked in a more appropriate newsgroup. Look for
newsgroups with "dhtml" in their names.

It can be this simple:

<input type="text" id=myText>
<input type="button" onclick="myText.value='abc';">

HTH,
Bob Barrows
Jul 19 '05 #2
Thank you!
but
I wrote this code:

Response.Write "<P><input type='test' id=test1></P>
Response.Write "<P><input type='button' onclick='test1.value='abc';'></P>

When my click the button,no reacting.

Jul 19 '05 #3
In news:%2****************@TK2MSFTNGP10.phx.gbl,
msnews.microsoft.com <lo************@yahoo.co.jp> typed:
: Thank you!
: but
: I wrote this code:
:
: Response.Write "<P><input type='test' id=test1></P>
: Response.Write "<P><input type='button'
: onclick='test1.value='abc';'></P>
:
: When my click the button,no reacting.

Becuase you need to "nest" the quotes and double quotes. Your "version"
evaluates to:
test1.value=abc;

abc is never declared, I'm quite surprised the browser didn't generate an js
error (you may have them turned off with ie.

the onclick should be:
onclick = "test1.value='abc';"

Notice the double quotes.

Don Verhagen

Jul 19 '05 #4
Next question? Excpected end of statement. ;]

When you response.write the " character, you have to double it (as one
option). IE.

<% response.write "<input name=""theName"" value=""theValue"">" %>

Ray at home

"Don Verhagen" <ne**@southeast-florida.com> wrote in message
news:bl************@ID-181477.news.uni-berlin.de...
In news:%2****************@TK2MSFTNGP10.phx.gbl,
msnews.microsoft.com <lo************@yahoo.co.jp> typed:
: Thank you!
: but
: I wrote this code:
:
: Response.Write "<P><input type='test' id=test1></P>
: Response.Write "<P><input type='button'
: onclick='test1.value='abc';'></P>
:
: When my click the button,no reacting.

Becuase you need to "nest" the quotes and double quotes. Your "version"
evaluates to:
test1.value=abc;

abc is never declared, I'm quite surprised the browser didn't generate an js error (you may have them turned off with ie.

the onclick should be:
onclick = "test1.value='abc';"

Notice the double quotes.

Don Verhagen

Jul 19 '05 #5
Thank you!
I'm sorry.I'm London,is the first contributor"msnews.microsoft.com".
I wrote this code:

Response.Write "<P><input type='button' onclick="text1.value="abc";"></P>"

But That is error (0x800A0401).

Jul 19 '05 #6
Unless you planned on reloading the page with that info, you'd probably
want to use JavaScript and here is a good board for that:

http://www.codingforums.com/forumdis...p?s=&forumid=2

Best regards,
J. Paul Schmidt, Freelance ASP Web Developer
http://www.Bullschmidt.com
ASP Design Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #7
In news:ek**************@TK2MSFTNGP10.phx.gbl,
London <lo************@yahoo.co.jp> typed:
: Thank you!
: I'm sorry.I'm London,is the first contributor"msnews.microsoft.com".
: I wrote this code:
:
: Response.Write "<P><input type='button'
: onclick="text1.value="abc";"></P>"
:
: But That is error (0x800A0401).

You're an idoit.

Response.Write("<P><input type='button'
onclick=""text1.value='abc';""></P>" )

=) Don


Jul 19 '05 #8
"Don Verhagen" <ne**@southeast-florida.com> wrote in message news:<bl************@ID-181477.news.uni-berlin.de>...
In news:ek**************@TK2MSFTNGP10.phx.gbl,
London <lo************@yahoo.co.jp> typed:
: Thank you!
: I'm sorry.I'm London,is the first contributor"msnews.microsoft.com".
: I wrote this code:
:
: Response.Write "<P><input type='button'
: onclick="text1.value="abc";"></P>"
:
: But That is error (0x800A0401).

You're an idoit.

Response.Write("<P><input type='button'
onclick=""text1.value='abc';""></P>" )

=) Don


test
--

en**********@wolmail.nl
Jul 19 '05 #9
What is an idoit?

Ray at work

"Don Verhagen" <ne**@southeast-florida.com> wrote in message
news:bl************@ID-181477.news.uni->
You're an idoit.

Jul 19 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Jochen Daum | last post by:
Hi ! If I have an input field <form ... method="post"> <input type="text" name="abc def"> </form>
4
by: Jack | last post by:
Hello, By VBScript I can use this code Response.Write "ABC" How can I use JScript show "ABC"? Can you help me
1
by: srinu | last post by:
Hello, We had one webserver based on a linux machine. The website is fully function and designed by a different person. Now we moved the machine from one IP to another one. I changed the...
2
by: yourmallu | last post by:
Hi Friends, All we are knowing that we can get the element by document.getelementbyid("default_txtname").value. But If it is not on that page if i am taking header.ascx and placing text box...
6
by: Dick Watson | last post by:
I had a page that works when setup like this: === <form name="frmCalc" action=""> <script type="text/javascript"> function btnCalc_onclick(abc) { return "got here with " + abc; }
0
by: serge | last post by:
I have 2 SQL Enterprise Editions running SP2 and same collation. When i try to start database mirroring I get the following error message: "The remote copy of database "ABC" has not been...
7
by: MLH | last post by:
If I drop Like "*ABC*" in a QBE grid criteria cell, the records returned include mixed case. Can I force the uppercase limitation in a QBE grid?
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.