473,466 Members | 1,445 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

ASP code for opening links in new page?

24 New Member
Ok, i figured since the <a href> code pretty much works the same on .asp, that by adding the target=_blank that it would open up in a new window, however when I do so, it give me an error on the _ character.

What would I need to use?

Thanks in advance everyone,

Gregory Gawaran
May 3 '07 #1
4 1367
AricC
1,892 Recognized Expert Top Contributor
Ok, i figured since the <a href> code pretty much works the same on .asp, that by adding the target=_blank that it would open up in a new window, however when I do so, it give me an error on the _ character.

What would I need to use?

Thanks in advance everyone,

Gregory Gawaran
What kind of error? What does your code look like? Are you using XHTML if so your attributes should be in quotes. You can use Javascript try this out
May 3 '07 #2
GGawaran
24 New Member
Heres the code when asp doesn't like it.

Expand|Select|Wrap|Line Numbers
  1.  
  2.                 if instr(invoice_tracking,"variable") then
  3.                     invoice_tracking = "<a target="_blank" href=http://www.something.com>" & invoice_tracking & "</a>"
  4.                 end if
  5.  
  6.  
May 7 '07 #3
devsusen
136 New Member
Hi,
u should write
Expand|Select|Wrap|Line Numbers
  1. if instr(invoice_tracking,"variable") then
  2.       invoice_tracking = "<a target='_blank' href='http://www.something.com'>" & invoice_tracking & "</a>"
  3. end if
  4.  
Heres the code when asp doesn't like it.

Expand|Select|Wrap|Line Numbers
  1.  
  2.                 if instr(invoice_tracking,"variable") then
  3.                     invoice_tracking = "<a target="_blank" href=http://www.something.com>" & invoice_tracking & "</a>"
  4.                 end if
  5.  
  6.  
susen
May 8 '07 #4
chaitanya02
46 New Member
Hi,
u should write
Expand|Select|Wrap|Line Numbers
  1. if instr(invoice_tracking,"variable") then
  2.       invoice_tracking = "<a target='_blank' href='http://www.something.com'>" & invoice_tracking & "</a>"
  3. end if
  4.  


susen
======================

You may also try with this:

<a href="www.google.com" target="blank">click here to open google website in a new page<
May 10 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

109
by: Andrew Thompson | last post by:
It seems most people get there JS off web sites, which is entirely logical. But it is also a great pity since most of that code is of such poor quality. I was looking through the JS FAQ for any...
10
by: Michael | last post by:
Hi, I'm trying to load a page external to my website into my frame. I have several links on my page that work fine but when connecting to the site http://www.formulaboats.com I am forced out of...
68
by: Steve | last post by:
Hi There, Prob a simple answer to this (I hope) but I can't quite work it out yet... I have this in a page: <map name="Map"> <area shape="rect" coords="43,68,52,77" href="map.html"...
10
by: Don Munroe | last post by:
This one has me stumped. I have three web applications running on two different servers. The first that works fine is hosted by a .Net hosting company. Everyone that uses it has no problems...
44
by: Viken Karaguesian | last post by:
Hello all, On occasion I want to open hyperlinks (images, etc.) in a new window. In the past, I've used target="_blank" to open the link in a new window. However, using the "target" attribute...
1
by: OtisUsenet | last post by:
Hello, I have some onClick events in <a href...> elements, so they get called when a user clicks on a link. This works well, and looks like this: <a onclick="onLinkClick(123);"...
0
by: peridian | last post by:
Hi, I wanted a web page where I could post code to, and have it appear in coloured formatting based on the context of the code. Most of the techniques I have seen for this involve complex use...
28
by: timhaynes1985 | last post by:
Hi, I am very new to PHP so please go easy on me. I have a page with 2 divs next to each other, a menu in the left and content in the right. Now what I want to know, is it possible to chenge...
15
by: anon | last post by:
I have a page where the ASP script create a table of links i.e. 1 = NextPage.asp?Item=1 2 = NextPage.asp?Item=2 etc What I would like to do is open an new window with this link without any...
13
by: Neil Gould | last post by:
Hi all, Thanks for the suggestions for our club's initial bulkmail sending routines. I did read up on the use of ASP vs. a separate COM app such as ASPEmail, and determined that for our club's...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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
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
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
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
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
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.