473,385 Members | 1,342 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,385 software developers and data experts.

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=VBScript %>
<%
set conn=server.CreateObject ("adodb.connection")
connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
Server.MapPath("customer.mdb") & ";Persist Security Info=False"
conn.Open connect
%>
<html>
<head>
<script language="javascript">
<!--
function dept_onchange(frmSelect) {
document.frmSelect.submit();
}

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

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

Response.Write "<td><font color=CornflowerBlue 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><font color=#000099 face=arial
size=2><b>" & ors.fields(i).value & "&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(this);"
onkeydown="return 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 1710
<input type="text" value="<%=Server.HTMLEncode(yourValue)%>">

Ray at work

<ni******@yahoo.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.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
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...
6
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...
7
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...
9
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...
20
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...
1
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...
5
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...
1
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"...
3
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...
1
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.