Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

New to ASP (Writing an IF statement)

Status
Not open for further replies.

TomR100

Programmer
Aug 22, 2001
195
0
0
US
Hello,
Our default on our local Intranet is to open a link to a new page using the target=_blank. I would like to open a page using the target=_self statement when the "FileName" equals a certain page.

How would I write the IF statement to only open the page using the target=_self? I do not know much about ASP and any help would be greatly appreciated.

Here is the current code:
<% Do While Not (objRS.Eof OR objRS.AbsolutePage <> iPage)%>
<br>

<a class="Orange14" href="<%= objDirRS("DirectoryPath")%>
<%= objRS("FileName").value%>" target="_blank">
<%= objRS("DisplayName").value %> </a>

<br>&nbsp;&nbsp;<%= objRS("Description").value%>
<% objRS.movenext
Loop %>

Thank you,
TomR100
 
try this...
<%
Do While NOT (objRS.EOF OR objRS.AbsolutePage <> iPage)
Response.Write "<BR><A CLASS='Orange14' HREF='" & objDirRS("DirectoryPath") & objRS("FileName") & "'"

If objRS("FileName") <> "myFile.asp" Then
Response.Write " TARGET='_blank'"
End If

Response.Write ">" & objRS("DisplayName") & "</A><BR>&nbsp;&nbsp;" & objRS("Description") & vbcrlf

objRS.MoveNext
Loop
%>

Tony
reddot.gif WIDTH=500 HEIGHT=2 VSPACE=3

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top