Current location: Hot Scripts Forums » Programming Languages » ASP » Change of file location ASP page


Change of file location ASP page

Reply
  #1 (permalink)  
Old 09-30-11, 06:01 PM
Frogger Frogger is offline
Wannabe Coder
 
Join Date: Jul 2006
Posts: 149
Thanks: 5
Thanked 0 Times in 0 Posts
Change of file location ASP page

Hi,

I have created an .asp file linked to a .mdb MS access file. The page uses the <select> function where you can select a number of different plants and when this is done it shows the associated plant image which corresponds to the plant name.

It all works fine but I want to change the location of the .mdb file and the .jpg images files. I have worked out how to change the location of the mdb file (from /plants.mdb to Dlink-16a766\volume_1\Plant Database\plants.mdb). I just can work out how to change the new location to where I want to locate the images files. I think it may have something to do wiuth this line of text:

document.getElementById('blank2').src=this.options[this.selectedIndex].value

They use to be in the root directory but I want to change this to a new locationed \\Dlink-16a766\volume_1\Plant Database\

See my code below:

Code:
<img src="\\Dlink-16a766\volume_1\Plant Selection\blank.gif" name="blank1" border="1" width="150" height="150"> 

<select id="list1" onchange="document.getElementById('blank1').src=this.options[this.selectedIndex].value">

        <%
Response.Buffer = true

dim cnn,rst
set cnn = Server.CreateObject("ADODB.Connection")
set rst = Server.CreateObject("ADODB.RecordSet")
cnn.Open "driver={Microsoft Access Driver (*.mdb)};;DBQ=\\Dlink-16a766\volume_1\Plant Database\plants.mdb;"


sqltext = "SELECT * FROM plants" _
& " ORDER BY plantname" 


Set RS = cnn.Execute(sqltext)
WHILE NOT RS.EOF

%>
        <option value="<%=RS("filename")%>"><%=RS("plantname")%></option>
        <%
 RS.MoveNext
 WEND
 RS.Close
 cnn.Close
%>
      </select>
Thanks for your help.
Reply With Quote
  #2 (permalink)  
Old 10-05-11, 05:44 AM
Frogger Frogger is offline
Wannabe Coder
 
Join Date: Jul 2006
Posts: 149
Thanks: 5
Thanked 0 Times in 0 Posts
I just worked out how to do this by changing the code this way.

Code:
<option value="[B]\\Dlink-16a766\volume_1\Plant Selection\[B]<%=RS("filename")%>"><%=RS("plantname")%></option>
Cheers everyone
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Checking a file exists lee PHP 3 04-23-06 12:44 AM
Output page by file name deanloh PHP 2 10-29-04 01:25 PM
Classified Ads skipper23 Perl 2 12-30-03 03:43 AM
Script to change file extensions JavaHead Script Requests 2 09-13-03 09:44 AM
Need ONE mouseover event to change TWO graphics on the page AccessGuy JavaScript 1 06-19-03 02:45 AM


All times are GMT -5. The time now is 04:12 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.