|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
URL link using asp
I am currently developing a learning resource database and want to add links on the page which point me to resources located on our Intranet server. The resource information is read from Access2000 database.
The code I am using looks like this and its the location field that needs to be a hyperlink. Ideally, a button would be better for the link as the URL's are fairly long. Any help greatly appreciated. Thanks. <table align="center" border="0" height="12" width="600"> <tr> <td width="10"> </td> <td width="74"><%=RS("KeyStage")%></td> <td width="77"><%=RS("Subject")%></td> <td height="36" width="9"><font color="#FF0000">-</font></td> <td width="88"><%=RS("Location")%></td> <td height="36" width="9"><font color="#FF0000">-</font></td> <td width="179"><%=RS("Description")%></td> <td height="36" width="120"> <div align="center"></div> <%=RS("Date")%></td> </tr> </table> |
|
#2
|
||||
|
||||
|
Here's a good little primer on how to do hyperlinking: http://www.htmlgoodies.com/primers/primer_4.html. Basically, your link would look something like this:
Code:
<a href="<%=RS("Location")%>">Click here to link to wherever</a>
|
|
#3
|
|||
|
|||
|
Thanks a lot for the code snippet, it came in handy. I am fairly new to server side scripts like ASP, php etc. but was building websites in HTML before using web design applications. Its just getting used to the syntax that takes a bit of practice.
How would I add an image link to the code you supplied rather than using a text link? Cheers ![]() |
|
#4
|
|||
|
|||
|
If I understand your question right:
<a href="<%=RS("Location")%>"><img src="/foldername/imagename.gif" border="0" alt="Click on this image to go to this page"></a> |
|
#5
|
|||
|
|||
|
yep. that works fine. Thanks a lot
![]() |
|
#6
|
|||
|
|||
|
Is it possible to include a Javascript rollover image within an ASP page or is it possible to make rollover using ASP?
|
|
#7
|
|||
|
|||
|
No problem to use a Javascript rollover image within an ASP page.
The link will be something like this: <a href="<%=RS("Location")%>"><img src="/foldername/imagename.gif" border="0" alt="Click on this image to go to this page" onMouseOver="Javascript MouseOver script" onMouseOut="Javascript MouseOut script"></a> You can put all the normal stuff into a ASP page that you are used to put into a webpage. Coding is the same as long as you don't put it inside the ASP code. You can't make a rollover in ASP since ASP is serverside. Javascript is clientside (the browser), therefor Javascript can make a rollover-function. |
|
#8
|
|||
|
|||
|
OK, I created a rollover in Dreamweaver MX and replaced the href with "<%=RS("Location")%>"
I put the Javascript at the top of the ASP page between <head> tags but the rollover doesnt work. Would I be better using a different Javascript or maybe an applet? |
|
#9
|
||||
|
||||
|
Get it all going in HTML first, THEN do the ASP stuff. Once you know the basics of HTML & JS, you won't have any problems inserting the ASP code into the right places.
|
![]() |
| Viewing: Dev Articles Community Forums > Programming > ASP Development > URL link using asp |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|