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

URLs in Microsoft Access Databse

Hi,
I have a Access database which stores organizations' webistes. When my asp form displays the website column it adds the search directory website instead displaying the website itself. I'm not sure if this makes sense but here is a example:

When click ,I want the page to go www.website.com. Right now is going to something like www.organization.com/search/www.website.com.

Here's me code:
Expand|Select|Wrap|Line Numbers
  1.   <%
  2. If Len(fp_rs("Website"))>2 then
  3.  Response.Write "<a target=""_blank"" href=" &fp_rs("Website") & Chr(34) & ">"  & FP_FieldVal(fp_rs,"Website") & "</a>"
  4.         End If
  5. %>
  6.  
Any help would be greatly appreciated and sorry for any grammer or spelling error, I'm running off of two hours of sleep. Thanks

Greg
Sep 17 '08 #1
9 1691
jhardman
3,406 Expert 2GB
And what does the generated HTML code look like? Does it say
Expand|Select|Wrap|Line Numbers
  1. <a target="_blank" href="www.website.com">www.website.com</a>
or
Expand|Select|Wrap|Line Numbers
  1. <a target="_blank" href="www.organization.com/search/www.website.com">www.organization.com/search/www.website.com</a>
?

Jared
Sep 18 '08 #2
And what does the generated HTML code look like? Does it say
Expand|Select|Wrap|Line Numbers
  1. <a target="_blank" href="www.website.com">www.website.com</a>
or
Expand|Select|Wrap|Line Numbers
  1. <a target="_blank" href="www.organization.com/search/www.website.com">www.organization.com/search/www.website.com</a>
?

Jared
Hi Jared,
Thanks for the response, I have placed the 'target =_blank' into the my response.write statement and get the same results. The field is diplayed as www.website.com in my asp form but the hyperlink is targeting to www.organization.com/search/www.website.com. For some reason the link is be added to the root of the search directory page. The acutally field in the database is called website which stores the URL. I'm not sure is this make sense. Thanks for your input.

Greg
Sep 18 '08 #3
jhardman
3,406 Expert 2GB
Hi Jared,
Thanks for the response, I have placed the 'target =_blank' into the my response.write statement and get the same results. The field is diplayed as www.website.com in my asp form but the hyperlink is targeting to www.organization.com/search/www.website.com. For some reason the link is be added to the root of the search directory page. The acutally field in the database is called website which stores the URL. I'm not sure is this make sense. Thanks for your input.

Greg
That's not exactly what I was asking. On the page that is behaving badly, hit control+u in firefox or go to the view menu --> Source in IE to show the HTML source code. What is the HTML source code for this line?

Jared
Sep 19 '08 #4
That's not exactly what I was asking. On the page that is behaving badly, hit control+u in firefox or go to the view menu --> Source in IE to show the HTML source code. What is the HTML source code for this line?

Jared
Sorry about that. Please see below.

Expand|Select|Wrap|Line Numbers
  1. <tr> 
  2.       <td width="60" style="padding:2; border-style:solid; border-width:1; " bgcolor=#DFFCA9 height="24">
  3.       <font class="style6">
  4.       <a target="_blank" href="Detail.asp?ID=3315">Complete Commissioning, Inc.</a></font></td>
  5.       <td height="24" bgcolor=#DFFCA9 style="padding:2; border-style:solid; border-width:1; ">
  6.       <font class="style6">
  7.       </font>
  8.       <font class="style6">   Clinton
  9.       </font></td>
  10.       <td width="42" style="padding:2; border-style:solid; border-width:1; " bgcolor=#DFFCA9 height="24">
  11.       <font class="style6"> MD
  12.       </font></td>
  13.       <td width="87" style="padding:2; border-style:solid; border-width:1; " bgcolor=#DFFCA9 height="24">
  14.       <font class="style6">301-877-2260
  15.    </font></td>
  16.       <td width="166" style="padding:2; border-style:solid; border-width:1; " bgcolor=#DFFCA9 height="24">
  17.             <font class="style6">
  18.             <a href="www.completecommissioning.com"> www.completecommissioning.com</a>
  19. </font> 
  20.  
  21.      </td>
  22.       <td width="93" style="padding:2; border-style:solid; border-width:1; " bgcolor=#DFFCA9 height="24">
  23.       <font class="style6">Capital-Mar Va 
  24.      </font></td>
  25.       <td width="99" style="border-style: solid; border-width: 1; padding-left: 0; padding-right:0; padding-top:2; padding-bottom:2" bgcolor=#DFFCA9 height="24">
  26.       <font class="style6">James Huber
  27.     </font></td>
  28.       <td width="146" style="border-style: solid; border-width: 1; padding-left: 0; padding-right:0; padding-top:2; padding-bottom:2" bgcolor=#DFFCA9 height="24">
  29.       <font size="1"> <a href="mailto:jhuber@completecommissioning.com">jhuber@completecommissioning.com</a>
  30.           </font></td>
  31.       <td width="21" style="border-style: solid; border-width: 1; padding-left: 0; padding-right:0; padding-top:2; padding-bottom:2" bgcolor=#DFFCA9 height="24">
  32.       <font class="style6">
  33.       <input Type="CheckBox" checked>
  34.       </font><font size="2">
  35.         </font></td>
  36.       <td width="20" style="border-style: solid; border-width: 1; padding-left: 0; padding-right:0; padding-top:2; padding-bottom:2" bgcolor=#DFFCA9 height="24">
  37.       <font size="1">
  38.       <input Type="CheckBox" checked>
  39.       </font><font size="2">
  40.         </font></td>
  41.       <td width="19" style="border-style: solid; border-width: 1; padding-left: 0; padding-right:0; padding-top:2; padding-bottom:2" bgcolor=#DFFCA9 height="24">
  42.       <font size="2">
  43.         <input Type="CheckBox" checked></font></td>
  44.       <td width="19" style="border-style: solid; border-width: 1; padding-left: 0; padding-right:0; padding-top:2; padding-bottom:2" bgcolor=#DFFCA9 height="24">
  45.       <font size="2">
  46.         <input Type="CheckBox" checked></font></td>
  47.       <td width="19" height="24" bgcolor=#DFFCA9 style="border-style: solid; border-width: 1; padding-left: 0; padding-right:0; padding-top:2; padding-bottom:2">
  48.       <font size="2">
  49.         <input Type="CheckBox" checked></font></td>
  50.       <td width="19" height="24" bgcolor=#DFFCA9 style="border-style: solid; border-width: 1; padding-left: 0; padding-right:0; padding-top:2; padding-bottom:2"><font size="2">
  51.         <input Type="CheckBox" checked>
  52.       </font></td>
  53.       <td width="19" height="24" bgcolor=#DFFCA9 style="border-style: solid; border-width: 1; padding-left: 0; padding-right:0; padding-top:2; padding-bottom:2"><font size="2">
  54.         <input type="CheckBox"        >
  55.       </font></td>
  56. </tr>
Here is the line in question. The html source code looks okay but when I roll over or click the link it takes me to 'www.nebb.org/DirectorySearch/www.compelecomissioning.com'. Thanks
Greg

Expand|Select|Wrap|Line Numbers
  1.  <td width="166" style="padding:2; border-style:solid; border-width:1; " bgcolor=#DFFCA9 height="24">
  2.             <font class="style6">
  3.             <a href="www.completecommissioning.com"> www.completecommissioning.com</a>
  4. </font> 
  5.  
  6.      </td>
Sep 19 '08 #5
jeffstl
432 Expert 256MB
I'm confused because if your HTML source is showing the <a href> as the site you want to link to, it should be correct.

Anyway I would try something like this if your not developing in a debug environment and can't step through to see the value of the RS("Website") variable

Expand|Select|Wrap|Line Numbers
  1.  
  2. response.write RS("Website")
  3.  
  4.  
Whatever is printed out should be the same thing printed inside the <a href>.

You could also try putting an http:// in front of your string. Also I guess I'm not sure what the FP_Field is doing there (what its function is) but my code would look more like this.

Expand|Select|Wrap|Line Numbers
  1.  Response.Write "<a href=" & fp_rs("Website") & " target=_blank>" & fp_rs("Website") & "</a>"
  2.  
Sep 19 '08 #6
JamieHowarth0
533 Expert 512MB
Hi guys,

Jeff is absolutely right about adding http://. If you don't do it browsers get confused that you're pointing the URL to a relative location instead of an absolute URL. I found a resource on this a while ago but don't have anything to point further.

Simply add http:// in front of your website address and it should work fine.

Hope it helps!

medicineworker
Sep 19 '08 #7
Hi guys,

Jeff is absolutely right about adding http://. If you don't do it browsers get confused that you're pointing the URL to a relative location instead of an absolute URL. I found a resource on this a while ago but don't have anything to point further.

Simply add http:// in front of your website address and it should work fine.

Hope it helps!

medicineworker
Hi guys,
Thanks for all of your input and suggestions. It just one those things. I have actually adding the http:// in front of it and the results was the same but thanks again.

Greg
Sep 19 '08 #8
jeffstl
432 Expert 256MB
Hi guys,
Thanks for all of your input and suggestions. It just one those things. I have actually adding the http:// in front of it and the results was the same but thanks again.

Greg
How did you add the http in front?

Hopefully like this?

Expand|Select|Wrap|Line Numbers
  1. response.write "<a href=http://" & rs("website") & " target=_blank>" & rs("website") & "</a>"
  2.  
Again this the above isnt working then the value of rs("website") should be double checked I would say. Also as earlier stated check your HTML source to make sure everything looks write on the output side
Sep 19 '08 #9
jhardman
3,406 Expert 2GB
This seems like a pretty simple thing, but I think you may have gotten the wrong number of quote marks. For passages that should have a lot of quote marks, I prefer to write them this way:
Expand|Select|Wrap|Line Numbers
  1.   <%
  2. If Len(fp_rs("Website"))>2 then %>
  3. <a target="_blank" href="<%=fp_rs("Website")%>"><%=fp_rs("Website")%></a>
  4. <%
  5.         End If
  6. %>
  7.  
Let me know if this helps.

Jared
Sep 19 '08 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Creative Acceleration | last post by:
Hi all, I need to convert the Query Strings into Clean URLs, Found some articles on PHP and Apache server.. How do we it them with ASP ?? Thanks Kart
0
by: Jim M | last post by:
For about a year and a half now I have been working in Access 2002 at home and converting to Access 2000 for work (I need both versions). I made a few changes to forms and queries then converted to...
4
by: ugo_lavoie | last post by:
Hi there, i'm doing a databse right now and i want it to be secure, about 20-30 people (max) will be using it and it will be on a SQL server. My first question: I saw some web page about adding...
1
by: Benny | last post by:
hello all, i want to implement an asp.net web application using microsoft access as its databse. im looking for some articles that describle how to security a microsoft access database. ...
11
by: Mark Rae | last post by:
Hi, I've inherited an ASP.NET web app which I want to restructure into a more logical folder hierarchy (over 150 WebForms in the app's root), but lots of users access the site by fully-qualified...
2
by: Bevo | last post by:
My app validates web page URLs by using the HttpWebRequest/WebResponse .NET classes. If URL is ok I'd like to present the user with the title of the web page. Anybody knows how to...
3
by: Jahangir | last post by:
I have made Access databse with all functions and forms. But now I want to generate executabel databse in which user does not have permission to change design of databse. How i can do this. PLz help.
0
by: Nixon | last post by:
Hi there, in my application i have the need to protect certain urls, urls that the user first must make a payment to view or invoke, e.g urls for downloading video clips. If a user hasnt paid i...
1
by: pic078 via AccessMonster.com | last post by:
I have an Access databse file on my desktop. When I double-click the icon to open, a "locked" Access icon suddenly appears on the desktop indicating the databse is opening/has opened - but there...
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
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.