473,508 Members | 2,390 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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
Jul 19 '05 #1
2 2627
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" <ro*****@hotmail.com> wrote in message
news:72**************************@posting.google.c om...
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

Jul 19 '05 #2
"Aaron Bertrand [MVP]" <aa***@TRASHaspfaq.com> wrote in message news:<OJ*************@tk2msftngp13.phx.gbl>...
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" <ro*****@hotmail.com> wrote in message
news:72**************************@posting.google.c om...
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


THANKS AARON!
Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
7667
by: Flapper | last post by:
Help please, Have a situation when converting from Oracle SP's to SQL SP's. The old oracle cursor was roughly as follows CURSOR cur_rsStock IS select * from (select StockRowId, CategoryId
2
8057
by: Kai Grossjohann | last post by:
The following HTML file invoker.html creates a modal dialog: <html><head> <script language="JavaScript"> function popup() { window.showModalDialog("main.html", null,...
19
11167
by: Arthur Connor | last post by:
Currently I specified a TARGET attribute inside an <A> tag which is not allowed under strict XHTML. How do I change the line to meet the requirements of strict HTML? <A...
13
3266
by: Jalal | last post by:
I am trying to use numeric_limits<double>::min() in an MFC application in Microsoft Visual C++.NET 2003. I am having some difficulties here. The following are the parts of a simple program I wrote...
87
5112
by: ziliath | last post by:
I recently tried out the Google "top coder" contest, as a C++ coder. I noticed immediately that they expected me to know STL. To which I say, what the fuck?! I may be missing something, but at...
4
7352
by: socialism001 | last post by:
I have the following code in my cgi script. How would I use target="_top" in the code below so that it would prevent my page from opening in a frame. Thanks, Chris ********************* my...
6
7036
by: Mason A. Clark | last post by:
LAST WORD(s): 1. MSIE6 and Firefox will go to the top of the page on command <a href="#top">go upsy</a> even if there is NO name="top" or id="top" They know what a "top" is :-) Opera...
2
2202
by: TadPole | last post by:
Hi all, My main problems are::::::::: 1. Set a value within a block container that can be used and changed by subsequent templates/block-containers/tables etc.. 2. get/determine/find the...
23
3592
by: lwoods | last post by:
I am trying to pass some info to another page on my site. I set "session_start()" in page 1, assign a session variable to a value, then execute a "header('Location: ....')." But on the target...
0
7224
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7380
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7494
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5626
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5050
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
4706
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3192
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3180
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1553
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.