Connecting Tech Pros Worldwide Help | Site Map

Using target="top" in a response.write Please help.

Rob McLennan - ZETLAND
Guest
 
Posts: n/a
#1: Jul 19 '05
Hi, I'm relatively clueless when it comes to correct ASP syntax. I'm
testing out a search form for my company's website which is done in
ASP. The results are displayed as per the code shown at the very
bottom of this message.

All I want to do is add a target="top" to the URL which is displayed
as a link at the top of the results. I know enough about html to know
that it probably goes somewhere into the follwing section:

<a href=""" & urls(ipage) & """>" & titles(ipage) & "</a>

....but have tried various placements without any luck.

Please help! Thanx.

Full code shown below...



' Display the results
do while (arrayline < matches AND arrayline < result_limit)
ipage = output(0, arrayline)
score = output(1, arrayline)
if (OutputStyle = 0) then
'Basic style
Response.Write("<p>" & "Page: <a href=""" & urls(ipage) &
""">" & titles(ipage) & "</a><br>") & VbCrlf
Response.Write("Score: " & score &
"&nbsp;&nbsp;<small><i>URL:" & urls(ipage) & "</i></small></p>") &
VbCrlf
else
'Descriptive style
Response.Write("<p><b>" & (arrayline+1) & ".</b>&nbsp;<a
href=""" & urls(ipage) & """>" & titles(ipage) & "</a>") & VbCrlf
if (UseCats = True) then
catindex = catpages(ipage)
Response.Write(" <font color=#999999>[" &
catnames(catindex) & "]</font>")
end if
Response.Write("<br>") & VbCrlf

if (Highlighting = 1) then
PrintHighlightDescription(descriptions(ipage))
else
Response.Write(descriptions(ipage))
end if
Response.Write("...<br>") & VbCrlf
Response.Write("<font color=#999999><small><i>Terms matched: "
& output(2, arrayline) & " Score: " & score & "&nbsp;&nbsp;URL: " &
urls(ipage) & "</i></small></font></p>") & VbCrlf
end if
arrayline = arrayline + 1
loop
Aaron Bertrand [MVP]
Guest
 
Posts: n/a
#2: Jul 19 '05

re: Using target="top" in a response.write Please help.


Response.Write "<a href='" & urls(ipage) & "' target=_top>" & titles(ipage)
& "</a>"

If you want target=_top to be a part of urls(ipage) then just drop the
quotes around the URL.

urls(0) = "http://www.aspfaq.com/ target=_top"
Response.Write "<a href=" & urls(0) & ">test</a>"

Also see
http://www.aspfaq.com/2052

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/




"Rob McLennan - ZETLAND" <robskoo@hotmail.com> wrote in message
news:72dbedd4.0401202111.41dfc99d@posting.google.c om...[color=blue]
> Hi, I'm relatively clueless when it comes to correct ASP syntax. I'm
> testing out a search form for my company's website which is done in
> ASP. The results are displayed as per the code shown at the very
> bottom of this message.
>
> All I want to do is add a target="top" to the URL which is displayed
> as a link at the top of the results. I know enough about html to know
> that it probably goes somewhere into the follwing section:
>
> <a href=""" & urls(ipage) & """>" & titles(ipage) & "</a>
>
> ...but have tried various placements without any luck.
>
> Please help! Thanx.
>
> Full code shown below...
>
>
>
> ' Display the results
> do while (arrayline < matches AND arrayline < result_limit)
> ipage = output(0, arrayline)
> score = output(1, arrayline)
> if (OutputStyle = 0) then
> 'Basic style
> Response.Write("<p>" & "Page: <a href=""" & urls(ipage) &
> """>" & titles(ipage) & "</a><br>") & VbCrlf
> Response.Write("Score: " & score &
> "&nbsp;&nbsp;<small><i>URL:" & urls(ipage) & "</i></small></p>") &
> VbCrlf
> else
> 'Descriptive style
> Response.Write("<p><b>" & (arrayline+1) & ".</b>&nbsp;<a
> href=""" & urls(ipage) & """>" & titles(ipage) & "</a>") & VbCrlf
> if (UseCats = True) then
> catindex = catpages(ipage)
> Response.Write(" <font color=#999999>[" &
> catnames(catindex) & "]</font>")
> end if
> Response.Write("<br>") & VbCrlf
>
> if (Highlighting = 1) then
> PrintHighlightDescription(descriptions(ipage))
> else
> Response.Write(descriptions(ipage))
> end if
> Response.Write("...<br>") & VbCrlf
> Response.Write("<font color=#999999><small><i>Terms matched: "
> & output(2, arrayline) & " Score: " & score & "&nbsp;&nbsp;URL: " &
> urls(ipage) & "</i></small></font></p>") & VbCrlf
> end if
> arrayline = arrayline + 1
> loop[/color]


Rob McLennan - ZETLAND
Guest
 
Posts: n/a
#3: Jul 19 '05

re: Using target="top" in a response.write Please help.


"Aaron Bertrand [MVP]" <aaron@TRASHaspfaq.com> wrote in message news:<OJD8F493DHA.536@tk2msftngp13.phx.gbl>...[color=blue]
> Response.Write "<a href='" & urls(ipage) & "' target=_top>" & titles(ipage)
> & "</a>"
>
> If you want target=_top to be a part of urls(ipage) then just drop the
> quotes around the URL.
>
> urls(0) = "http://www.aspfaq.com/ target=_top"
> Response.Write "<a href=" & urls(0) & ">test</a>"
>
> Also see
> http://www.aspfaq.com/2052
>
> --
> Aaron Bertrand
> SQL Server MVP
> http://www.aspfaq.com/
>
>
>
>
> "Rob McLennan - ZETLAND" <robskoo@hotmail.com> wrote in message
> news:72dbedd4.0401202111.41dfc99d@posting.google.c om...[color=green]
> > Hi, I'm relatively clueless when it comes to correct ASP syntax. I'm
> > testing out a search form for my company's website which is done in
> > ASP. The results are displayed as per the code shown at the very
> > bottom of this message.
> >
> > All I want to do is add a target="top" to the URL which is displayed
> > as a link at the top of the results. I know enough about html to know
> > that it probably goes somewhere into the follwing section:
> >
> > <a href=""" & urls(ipage) & """>" & titles(ipage) & "</a>
> >
> > ...but have tried various placements without any luck.
> >
> > Please help! Thanx.
> >
> > Full code shown below...
> >
> >
> >
> > ' Display the results
> > do while (arrayline < matches AND arrayline < result_limit)
> > ipage = output(0, arrayline)
> > score = output(1, arrayline)
> > if (OutputStyle = 0) then
> > 'Basic style
> > Response.Write("<p>" & "Page: <a href=""" & urls(ipage) &
> > """>" & titles(ipage) & "</a><br>") & VbCrlf
> > Response.Write("Score: " & score &
> > "&nbsp;&nbsp;<small><i>URL:" & urls(ipage) & "</i></small></p>") &
> > VbCrlf
> > else
> > 'Descriptive style
> > Response.Write("<p><b>" & (arrayline+1) & ".</b>&nbsp;<a
> > href=""" & urls(ipage) & """>" & titles(ipage) & "</a>") & VbCrlf
> > if (UseCats = True) then
> > catindex = catpages(ipage)
> > Response.Write(" <font color=#999999>[" &
> > catnames(catindex) & "]</font>")
> > end if
> > Response.Write("<br>") & VbCrlf
> >
> > if (Highlighting = 1) then
> > PrintHighlightDescription(descriptions(ipage))
> > else
> > Response.Write(descriptions(ipage))
> > end if
> > Response.Write("...<br>") & VbCrlf
> > Response.Write("<font color=#999999><small><i>Terms matched: "
> > & output(2, arrayline) & " Score: " & score & "&nbsp;&nbsp;URL: " &
> > urls(ipage) & "</i></small></font></p>") & VbCrlf
> > end if
> > arrayline = arrayline + 1
> > loop[/color][/color]

THANKS AARON!
Closed Thread


Similar ASP / Active Server Pages bytes