This topic is locked

Links

2/29/2004 9:50:50 AM
ASPRunnerPro General questions
A
arx author

I have web site of links. Can they be made to open in a new window instead of the main database window?

Sergey Kornilov admin 2/29/2004

You can use the following HTML code to open a link in new window

<a href="..." target=_blank>...</a>


I hope this helps.

A
arx author 2/29/2004

I've used this code in a normal html page for a link, but when I tried this in ASPRunner I didn't get it to work. If I have a field that is a link in my ASPRunner generated page, how do I get it to open in a new window?

Thanks for the help,

AXR

Sergey Kornilov admin 2/29/2004

Find a section in ...list.asp file that displays hyperlink field:
<%

if IsBinaryField(rsData.Fields("FieldName")) then

Response.Write CreateImageControl(rsData, "FieldName")

else

Response.Write ProcessLargeText(GetData(rsData.Fields("FieldName"), "Hyperlink"))

end if

%>
and replace it with:
<%

Response.Write "a href=""" & GetData(rsData.Fields("FieldName"), "") & """>" &


GetData(rsData.Fields("FieldName"), "") & "</a>"

%>

A
arx author 3/26/2004

This opened up my link in a new page, but now my database only shows 1 record per page even though it says there's 37 records in all. Anything else I have to do?

Thanks for the help.

A
arx author 3/26/2004

Sergey;

Ignore last comment. I made a typing mistake. It works!

Thanks

swat 4/7/2004

Find a section in ...list.asp file that displays hyperlink field:

<%

if IsBinaryField(rsData.Fields("FieldName")) then

Response.Write CreateImageControl(rsData, "FieldName")

else

Response.Write ProcessLargeText(GetData(rsData.Fields("FieldName"), "Hyperlink"))

end if

%>
and replace it with:
<%

Response.Write "a href=""" & GetData(rsData.Fields("FieldName"), "") & """>" &

GetData(rsData.Fields("FieldName"), "") & "</a>"

%>



hi admin-
The code for hyperlink does not work:

Html code is missing <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=1558&image=1&table=forumreplies' class='bbcemoticon' alt=':o' />

<%

Response.Write"a href=""" & GetData(rsData.Fields("FieldName"), "") & """>" &

GetData(rsData.Fields("FieldName"), "") & "</a>"

%>
I have changed this to "<a href....

after u changed this the hyperlink fields work However , still the link goes under server address example if I have "www.google.com"'>www.google.com"; as my hyperlink data in field

asprunner will display as http"//localhost/Myfile/www.google.com
must be some thing to do with HTML-ASP <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=1558&image=2&table=forumreplies' class='bbc_emoticon' alt=':ph34r:' /> .. let me know any solution for this

thank youu

<img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=1558&image=3&table=forumreplies' class='bbc_emoticon' alt=':D' />

Sergey Kornilov admin 4/11/2004

Swat,
you need to put full hyperlink address into the database like www.google.com'>http://www.google.com. Just putting www.google.com is not enough.

swat 4/12/2004

ok-
Here is what I got finally for link display code:

Response.Write "<a href=""http://" & GetData(rsData.Fields("FieldName"), "") & """ target=_blank>" & GetData(rsData.Fields("FieldName"), "") & "</a>"


  • the links will be open as new window
  • user can enter links as www.google.com no need to http://
    thanks for help admin..

    swat