HTML, JavaScript And CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingHTML, JavaScript And CSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old October 27th, 2004, 06:22 PM
cprovolt cprovolt is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 1 cprovolt User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Exclamation Link problem with .jpg

This code snippet creates an iframe and creates 5 links above it to display .jpg images. the file path is pulled from an access db.
The problem is this code works perfectly and opens the images correctly in the iframe "picturesframe" but only on my development pc.
when i upload the web pages to my live server the when clicking the links nothing appears to happen and the images will not display.
I have been unsuccesssful in figuring this out. Even if I hard code the path ie "c:\images\picture.jpg" it will not open in its frame. Both
the developement server and live server are both running iis 5.1. Please help me I am going crazy! I have inluded the entire .asp file
but have uploaded as .txt it looks a little ugly in .txt format please see profile.txt


Code:
<table border="0" cellpadding="0" cellspacing="0" summary="">
<tr >
<td>
<table border="1" cellpadding="0" cellspacing="0" summary="">
	 <tr>
		 <td width=70>
		<center>
		<a href=<%=rs("Picture1")%> target="picturesframe">Photo 1</a>
		</center>
		</td>
		 <td width=70>
		<center>
		<a href=<%=rs("Picture2")%> target="picturesframe">Photo 2</a>
		</center>
		</td>
		<td width=70>
		<center>
		<a href=<%=rs("Picture3")%> target="picturesframe">Photo 3</a>
		</center>
		</td>
		<td width=70>
		<center>
		<a href=<%=rs("Picture4")%> target="picturesframe">Photo 4</a>
		</center>
		</td>
		<td width=70>
		<center>
		<a href=<%=rs("Picture5")%> target="picturesframe">Photo 5</a>
	 </center> 
		</td>
	 </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" summary="">
<tr>
	<td width="450" height="300">
	<center>
	 <iframe scrolling="no" border="0" frameborder="0" height="300" width="450" align="center" name="picturesframe" src=<%=rs("Picture1")%>></iframe>
	</center>
	</td>
</tr>
</table>
Attached Files
File Type: txt profile.txt (6.6 KB, 139 views)

Reply With Quote
  #2  
Old October 27th, 2004, 09:02 PM
Lafinboy's Avatar
Lafinboy Lafinboy is offline
The Laughing Moderator
ASP Free Loyal (3000 - 3499 posts)
 
Join Date: Apr 2004
Location: Sydney, Australia
Posts: 3,267 Lafinboy User rank is Sergeant (500 - 2000 Reputation Level)Lafinboy User rank is Sergeant (500 - 2000 Reputation Level)Lafinboy User rank is Sergeant (500 - 2000 Reputation Level)Lafinboy User rank is Sergeant (500 - 2000 Reputation Level)Lafinboy User rank is Sergeant (500 - 2000 Reputation Level)  Folding Points: 29199 Folding Title: Starter FolderFolding Points: 29199 Folding Title: Starter Folder
Time spent in forums: 2 Weeks 1 Day 10 h 48 m 12 sec
Reputation Power: 15
Send a message via ICQ to Lafinboy Send a message via AIM to Lafinboy Send a message via MSN to Lafinboy Send a message via Yahoo to Lafinboy Send a message via Skype to Lafinboy
Relative paths

You will need to specify a relative path to the image files. The c:/... path is only good for your PC, unless of course the host PC is set up exactly the same as yours and you want to allow anonymous access to the C: drive
Change the links to something like:
Code:
a href=<%=Server.Mappath(rs("Picture1"))%>

and then change the content of the rs fields so that they hold just the filename (somepicture.jpg) and if required the folder path (images/somepicture.jpg).

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingHTML, JavaScript And CSS Help > Link problem with .jpg


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT