Thanks for your response.
Please check my coding.
I run following page trip.asp
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft FrontPage 5.0">
<form method=post action=contno2.asp id=contractno name=contractno>
<TABLE cellSpacing=1 cellPadding=1 width="674" border=1 bordercolorlight="#CCCCCC" bordercolordark="#666666">
<TR>
<TD width="161">Contract No :</TD>
<TD width="377"><SELECT id=contractno name=contractno> <OPTION selected>
<%
dim ssql
set cn=server.CreateObject("adodb.connection")
cn.ConnectionString="Provider=SQLOLEDB.1;Integrate d Security=SSPI;Persist Security Info=False;Initial Catalog=dcil;Data Source=AUHTRIPSVR2"
cn.Open
ssql="select distinct contractno from arc order by contractno"
set rs=cn.Execute(ssql)
do while rs.eof=false
Response.Write("<option value='" & rs("contractno") & "'>")
Response.Write(rs("contractno") )
rs.movenext
loop
%>
</OPTION></SELECT><INPUT style="WIDTH: 48px; HEIGHT: 24px" type=submit size=16 value=search id=submit1 name=submit1></TD></TR>
</form>
</TD></TR></TABLE>
</P>
</form>
</BODY>
</HTML>
It move to contno2.asp page and coding is following
<html>
<head>
</head>
<body background="images/netbkgnd.gif" bgcolor="#FFFFFF" text="#000000" link="#0066CC" vlink="#999999" alink="#669999">
<%@ Language=VBScript %>
<HTML xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns="http://www.w3.org/TR/REC-html40">
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<link rel="File-List" href="contno_files/filelist.xml">
</HEAD>
<BODY background="images/netbkgnd.gif" bgcolor="#FFFFFF" text="#000000" link="#0066CC" vlink="#999999" alink="#669999">
<form method=post action=wpls5.asp id=form name=form>
<%
set cn=server.CreateObject("adodb.connection")
cn.ConnectionString="Provider=SQLOLEDB.1;Integrate d Security=SSPI;Persist Security Info=False;Initial Catalog=dcil;Data Source=AUHTRIPSVR2"
cn.Open
contractno=Request.QueryString("contractno")
contractno=Request.Form("contractno")
ssql="SELECT * FROM arc where contractno='" &contractno & "'"
'Record Set
set rs=cn.Execute(ssql)
%>
<TABLE border=1 bordercolorlight="#669999" bordercolordark="#330066">
<tr bgcolor=gold>
<th>Contract No</th>
<th>Record Drawing No</th>
<th>Description</th>
<th>Drawing Category</th>
<th>Contractor</th>
<th>Consultant</th>
<th>Drawing No</th>
<th>ImageReference</th>
<th>Window_x1</th>
<th>Window_y1</th>
<th>Window_x2</th>
<th>Window_y2</th>
<th>approvedate</th>
</tr>
<%
do while rs.eof=false
Response.Write("<tr>")
Response.Write("<td bgcolor=lightyellow>" & rs("contractno") & "</td>")
Response.Write("<td>" & rs("recordno") & "</td>")
Response.Write("<td>" & rs("description") & "</td>")
Response.Write("<td>" & rs("category") & "</td>")
Response.Write("<td>" & rs("contractor") & "</td>")
Response.Write("<td>" & rs("consultant") & "</td>")
Response.Write("<td>" & rs("drawingno") & "</td>")
Response.Write("<td>")
Response.Write("<a href=" & server.URLEncode(rs("imagereference")) & ">" & rs("imagereference") & "</a>")
Response.Write("</td>")
Response.Write("<td>" & rs("window_x1") & "</td>")
Response.Write("<td>" & rs("window_y1") & "</td>")
Response.Write("<td>" & rs("window_x2") & "</td>")
Response.Write("<td>" & rs("window_y2") & "</td>")
Response.Write("<tr>")
rs.movenext
loop
%>
</TABLE>
<INPUT id=submit2 name=submit2 type=submit value="Back" target=Right>
</P>
<P> </P>
</BODY>
</HTML>
</body>
</html>
and display image hiper link like following
$(ROOTDIR)\contract21M\21M-067.tif
$(ROOTDIR)\contract21M\21M-082.tif
$(ROOTDIR)\contract21M\21M-042.tif
My problem is in imagereference column.
It is showing $(ROOTDIR)\contractno21m\21m-067.tif
When I click the imagereference column to display the image, it not display the image.
I using localhost.
Due to $ sign and subdirectory it image not display.
How I can display the image ?
How I can remove $ sign and sub directory from the imagereference column so that only image name display,
And when I click the imagereference column, the image will display ?
image are save in d:\cather\images directory
I enter image name by the Pro-OrbitFront software, I enter only image name but software save the image name in
the access database like this
$(ROOTDIR)/CONTRACT21M/21M-067.TIF
all records and imagereference value are retrieving from the ACCESS database
Please help, how can image display ?
thanks for your guidance
Mateen Martin
[email protected]
Quote:
quote:Originally posted by NotNowJohn
Well,
Your questions aren't precisely, so I suppose that you retreive from DB something like this
image_save_url="C:\InetPub\wwwroot\application_nam e\contract\CONTRACT-164.TIF"
If you want to display an image and/or create a hyperlink you can extract only image name with par example,
array_extract=split(image_save_url,"\")
only_image=array_extract(5)
image_url="/contract/" & array_extract(5)
etc..
Variable image_url you can use to either display an image or create an appropriate hyperlink...
If I don't understand, please be more concientous and send exactly value for image you retreived from db (add one Response.Write rs("imagereference")).
Regs,
NotNowJohn
...but the Soon is eclipsed by the Moon
|