Forums
This topic is locked
Problem In Displaying Image in .asp
Posted 27 Mar 2007 13:59:09
1
has voted
27 Mar 2007 13:59:09 clarence dmello posted:
Hello Everyone , my project is on ecards and here is where i have got stuck in the projectThis is1.asp
<pre id=code><font face=courier size=2 id=code><html>
<%
dim cards
cards=Request.Form("cards"
%>
<body>
<form action="2.asp" method="post">
<p>Please select your favorite card:</p>
<table align="center" bgcolor="#ffffff" border="0" cellpadding="5">
<tbody><tr>
<td>
<a href="anniversary_files/anniversary1_.jpg"><img src="anniversary_files/anniversary1_.jpg" alt="anniversary1_.jpg - 4928 Bytes" border="0" height="92" width="150"><br>
</a>
<input name="cards"
<%if cards="anniversary_files/anniversary1_.jpg" then Response.Write("checked"%>
value="1.asp" type="radio"> <a href="anniversary_files/anniversary1_.jpg">Anniversary 1</a> </td>
<td> <a href="anniversary_files/anniversary2_.jpg"><img src="anniversary_files/anniversary2_.jpg" alt="anniversary2_.jpg - 4928 Bytes" border="0" height="92" width="150"><br>
</a>
<input name="cards"
<%if cards="anniversary_files/anniversary2_.jpg" then Response.Write("checked"%>
value="anniversary2_.jpg" type="radio"> <a href="anniversary_files/anniversary2_.jpg">Anniversary 2</a></td>
<br />
</tr>
</tbody></table>
<br /><br />
<input type="submit" value="Submit" />
</form>
<%
if cars<>"" then
Response.Write("<p>Your favorite car is: " & cars & "</p>"
end if
%>
</body>
</html></font id=code></pre id=code>
and this is 2.asp
<html>
<%
dim cards
cards=Request.Form("cards"
%>
<body>
<pre id=code><font face=courier size=2 id=code></form>
<%
if cards<>"" then
Response.Write("<p>Your favorite card is: " & cards & "</p>"
end if
%>
</body>
</html></font id=code></pre id=code>
the problem is that whenever i click on radio button of Anniversary 1 , on the next page ie after clicking on submit button : i dont get the image of aniversary1
Can Anyone help me out with this prob:
Here is the Project with code and images
rapidshare.com/files/23018049/Proj.rar
thxs in advance.
Replies
Replied 27 Mar 2007 15:21:49
27 Mar 2007 15:21:49 Lee Diggins replied:
Hi Clarence
The value of your first radio button is 1.asp, not what you'd want me thinks, you probably want anniversary1_.jpg.
Clarence, don't email me again unless invited. You've 1 posting in this forum and no history here, you post one thread and email me within minutes, this equals rude. <img src=../images/dmxzone/forum/icon_smile_dissapprove.gif border=0 align=middle> Myself and others are not here to help when anyone demands it, the responses and help provided by contributors on this forum are voluntary.
Sharing Knowledge Saves Valuable Time!!!
~ ~ ~ ~ ~ ~
<b>Lee Diggins</b> - <i>DMXzone Manager</i>
<font size="1">[ Studio MX/MX2004 | ASP -> VBScript/PerlScript/JavaScript | SQL | CSS ]</font>
The value of your first radio button is 1.asp, not what you'd want me thinks, you probably want anniversary1_.jpg.
Clarence, don't email me again unless invited. You've 1 posting in this forum and no history here, you post one thread and email me within minutes, this equals rude. <img src=../images/dmxzone/forum/icon_smile_dissapprove.gif border=0 align=middle> Myself and others are not here to help when anyone demands it, the responses and help provided by contributors on this forum are voluntary.
Sharing Knowledge Saves Valuable Time!!!
~ ~ ~ ~ ~ ~
<b>Lee Diggins</b> - <i>DMXzone Manager</i>
<font size="1">[ Studio MX/MX2004 | ASP -> VBScript/PerlScript/JavaScript | SQL | CSS ]</font>
Replied 27 Mar 2007 16:55:11
27 Mar 2007 16:55:11 clarence dmello replied:
sorry for mailing u but i ned to complete my project within this week so a little tensed.now moving on with the problem
when i insert anniversary1_.jpg the output is as folows
Your favorite card is: anniversary1_.jpg
i need to display the image on the screen not its name.
so plz try and configure it out.
when i insert anniversary1_.jpg the output is as folows
Your favorite card is: anniversary1_.jpg
i need to display the image on the screen not its name.
so plz try and configure it out.
Replied 27 Mar 2007 17:32:20
27 Mar 2007 17:32:20 Lee Diggins replied:
Hi Clarence
All you're doing is writing the value passed by the form, you need to add the img tag:
<% If cards <> "" Then
<p>Your favorite card is: <img src="anniversary_files/<%= cards %>" ></p>
<% End if%>
Sharing Knowledge Saves Valuable Time!!!
~ ~ ~ ~ ~ ~
<b>Lee Diggins</b> - <i>DMXzone Manager</i>
<font size="1">[ Studio MX/MX2004 | ASP -> VBScript/PerlScript/JavaScript | SQL | CSS ]</font>
All you're doing is writing the value passed by the form, you need to add the img tag:
<% If cards <> "" Then
<p>Your favorite card is: <img src="anniversary_files/<%= cards %>" ></p>
<% End if%>
Sharing Knowledge Saves Valuable Time!!!
~ ~ ~ ~ ~ ~
<b>Lee Diggins</b> - <i>DMXzone Manager</i>
<font size="1">[ Studio MX/MX2004 | ASP -> VBScript/PerlScript/JavaScript | SQL | CSS ]</font>
Replied 27 Mar 2007 18:41:36
27 Mar 2007 18:41:36 clarence dmello replied:
yes Lee Diggins , i got it , i was writing the value passed by the form.
i have added a image tag and now it works .
thxs Lee Diggins for your help
dmxzone rocks.
thxs again.
i have added a image tag and now it works .
thxs Lee Diggins for your help
dmxzone rocks.
thxs again.