473,545 Members | 2,469 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

show value in text box

I have a page with one text box when I search name, return value such
as (address, phone...) I show these value in the table but I want to
show these in text box that I have in my page.

<%@ Language=VBScri pt %>
<%
set conn=server.Cre ateObject ("adodb.connect ion")
connect = "Provider=Micro soft.Jet.OLEDB. 4.0;Data Source=" &
Server.MapPath( "customer.m db") & ";Persist Security Info=False"
conn.Open connect
%>
<html>
<head>
<script language="javas cript">
<!--
function dept_onchange(f rmSelect) {
document.frmSel ect.submit();
}

//-->
</script>
</head>
<body>
<form name="frmSelect " method="Post" action="search. asp">
Name:<input type=text name=print
onchange="dept_ onchange(frmSel ect);" />
<%
a=Request.Form ("print")
if a<> "" then
sqlstr2="select * from Ticket where Name='" & a & "'"
set ors = conn.Execute(sq lstr2)

if ors.eof=true and ors.bof=true then
Response.Write "<br><b>No Records Matched.</b>"
else
numfields=ors.f ields.count
Response.Write "<table border=1 width=100% bgcolor=#c1e0ff >"
Response.Write "<tr>"
for i=0 to numfields-1

Response.Write "<td><font color=Cornflowe rBlue face=arial
size=2><b>" & ors(i).name & "</font></b></td>"
next
Response.Write "</tr>"
ors.movefirst
do while not ors.eof
Response.Write "<tr>"
for i=0 to numfields-1

Response.Write "<td valign=top><fon t color=#000099 face=arial
size=2><b>" & ors.fields(i).v alue & "&nbsp;</font></b></td>"
next
Response.Write "</tr>"
ors.movenext
loop
'************** ****
Response.Write "</table>"
end if
end if
%>
<table border="1">
<tr>
<td>
<font size="2" face="arial" color="#339966" ><strong><em>
Name: </em></strong>
</font></td>
<td align="right" style="width: 184px">
<p><input name="Name" maxlength="25">
</td>
<td align="right" style="width: 184px; text-align: left">
<span style="font-size: 14pt"><p>+</p></span></td>
</tr>
<tr>
<td>
<font size="2" face="arial" color="#339966" ><strong><em>
Address:</em></strong>
</font></td>
<td align="right" style="width: 183px">
<p>
<input name="Address">

</td>
<td align="right" style="width: 183px">
</td>
</tr>
<tr>
<td>
<font size="2" face="arial" color="#339966" ><strong><em>
Phone: </em></strong>
</font></td>
<td align="right" style="width: 183px">
<p><INPUT TYPE="text" NAME="Phone" mask="(###)-###-####"
onblur="return onBlurMask(this );" onfocus="return onFocusMask(thi s);"
onkeydown="retu rn doMask(this);" style="width: 155px"></td>
<td align="right" style="width: 183px">
</td>
</tr>
<tr>
<td>
<font size="2" face="arial" color="#339966" ><strong><em>
Status:</em></strong>
</font></td>
<td align="right" style="width: 183px">
<p>

<input name="status" style="width: 183px">

</td>
<td align="right" style="width: 183px">
</td>
</tr>
<tr>
<td>
<font size="2" face="arial" color="#339966" ><strong><em>
comment:</em></strong>
</font></td>
<td style="width: 184px">
<p>
<textarea name="comment" style="width: 183px"></textarea>
</td>
<td style="width: 184px">
</td>
</tr>
<tr>
<td>
</td>
<td align="right" style="width: 184px">
<font size="2" face="arial" color="yellow">
<input type="Button" value="Save" id="submit1" name="submit1" >
<input type="reset" id="reset1" name="reset1">& nbsp;</font>
</td>
<td align="right" style="width: 184px">
</td>
<td>
&nbsp;</td>
</table>
</form>
</td>
<tr>
</tr>
<tr>
</tr>
</table>
</form>

</body>
</html>

Dec 7 '05 #1
2 1721
<input type="text" value="<%=Serve r.HTMLEncode(yo urValue)%>">

Ray at work

<ni******@yahoo .com> wrote in message
news:11******** **************@ z14g2000cwz.goo glegroups.com.. .
I have a page with one text box when I search name, return value such
as (address, phone...) I show these value in the table but I want to
show these in text box that I have in my page.


Dec 7 '05 #2
thnaks I got it,

Dec 7 '05 #3

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

Similar topics

3
7284
by: Matt | last post by:
The ASP page has a combo box with id list, and when user click the particular id, it will show the name in the text box. My attempt was when the user have event on combo box, it will call JavaScript showempname(), and it will then look up the name by executing SQL statement. However, the following code has the following error: Microsoft...
6
148535
by: Steve Speirs | last post by:
Hi I'm trying to show/hide a simple piece of text and a text field on a form based on what choice is made from a drop down box. <select name="dropdown" size="1"> <option selected value="">Please make a selection</option> <option value="1">Choice 1</option> <option value="2">Choice 2</option> <option value="3">Choice 3</option>
7
4121
by: Mad Scientist Jr | last post by:
Through messing around I got IE6 (win xp) to show/hide a table row. I gave my <TR> an ID of "trRow" and trRow.style.display='none'; hides it trRow.style.display='block'; displays it (will any value other than 'none' display on IE6?) I tried enclosing the <TR></TR> inside a <DIV> tag, and hiding that, but it doesn't work for some reason.
9
2741
by: sergio | last post by:
Hi all, I have created the following script that will show/hide a menu based on checkboxes. It works fine in Opera but not on IE6! Does anybody knows a workaround this problem? Thanks for your response. Sergio ------------------------------------------------ <script language="JavaScript" type="text/javascript">
20
2545
by: WindAndWaves | last post by:
Hi Gurus I was wondering if you can send me in the right direction: I have a table with about 300 rows. I want to make all of them invisible and when a user enters a code in a form then make selected ones visible. At the moment, I am doing it as follows: www.corstorphinehouse.com/d/avail.html
1
16731
by: asilverpeach | last post by:
Hey Guys! Found some great scripts here on this topic but have to make to changes to the code that I can't seem to figure out. First, In the following code clicking on the headers shows the div information. I want a nested show hide element though. So when you click on "Do you have carpets to be cleaned?" Small Rooms & Medium Rooms...
5
8416
by: ali | last post by:
Hello every one i need you help regarding div hide and show. i am having a link like <a href="#" onClick="expandWin()">show/hide </a> <div id=showHide> </div> within div i have lots of form tags and div elements say n. The problem
1
4916
by: basavaraj koti | last post by:
I need to show image using xslt Below provided in my xml and xslt. <?xml version="1.0" encoding="iso-8859-1"?> <?xml-stylesheet type="text/xsl" href="../xyz.xsl"?> <Grade class="03" subject="Science"> <media id="2809"> <topic>A Bird's Paradise</topic> <category>Concept</category> <type>Animation</type>
3
4748
by: jerrydigital | last post by:
good evening, I am trying to allow my users to enter in text if they don't find their option on my drop down menu. In the code below, I can get a text box to show up when I select 'Other' on the drop down menu. However, I cannot get it to work when I try to select 'Other' on the second drop down menu. Any ideas about how I can start getting...
1
3786
oranoos3000
by: oranoos3000 | last post by:
hi would you please help me i have a online shopping center that i show pictures of the my product in home page. in the InterExplorer pictures is shown correctly but in Firefox browser is shown properties alt in img tag istead of picture . place of the pictures is saved in the database(my database is with mysql) and in home page i fetch...
0
7490
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7682
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7935
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
6009
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5351
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5069
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3465
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1037
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
734
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.