473,394 Members | 1,773 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

How to write this link in html?

17
Hi, I know this simple, but I tries several times and failed. In html there is a link to a site, but it only links to root dir, not next dir that I want.

In javascript
[code]
var pic="<a href=\"http://www.abc.com/\""+place[i]+"\"?cat=travel\" target=\"_blank\"><img align=\"left\" border=\"0\" src=\"/map/xml/logo.gif\" style=\"margin:0 5px 5px 0\" alt=\"Go to learn more\"></a>";
[code]

What I want is www.abc.com/sing?cat=travel
place[i] is an array variable, may refer to sing, dance, poem...

But what I got is always only www.abc.com

Why?

Thank you very much in advance.
Oct 3 '07 #1
2 2569
theS70RM
107 100+
var pic = "<a href=\"http://www.abc.com/"+place[i]+"?cat=travel\" target=\"_blank\"><img align=\"left\" border=\"0\" src=\"/map/xml/logo.gif\" style=\"margin:0 5px 5px 0\" alt=\"Go to learn more\"></a>";




u needed to lose the quotes around the place[i] variable.

if in doubt, use alert(pic) and see if the html makes sense.

Andy
Oct 3 '07 #2
1965
17
Thank you. Andy
Yes, it works.
Oct 3 '07 #3

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

Similar topics

4
by: Charles Crume | last post by:
Hello all; I have a web page that displays a blank gif for about 2 seconds, then displays an animated gif image, then, after the animation plays, I want to display a link so the user can click...
2
by: PhoneLover | last post by:
Hi, I have a page with this frameset: <frameset cols="185,800*" frameborder="YES" border="2" framespacing="2" rows="*" bordercolor="#FF0000"> <frame name="leftFrame" noresize...
1
by: Vincy | last post by:
Hi, I have the follow problem: a windows is divided on two frames: frame1 and frame2. on frame 2 there is a buttom it runs a function 'SendMsg' that write (by operator 'write' of javascript) a...
5
by: imaband | last post by:
Hi, I've got a little Quizzer program that asks a question in the upper frame of a frameset and then lists the answer in the lower frame. Answers can be plain text, straight html, a sound, or a...
7
by: Remi Bastide | last post by:
I'm trying to open a blank window and write a message in it. The following page works as expected in IE, but in Firefox the message is not written: <HTML> <HEAD> <TITLE>Document.write...
1
by: Magix | last post by:
Hi, I have these string data: str_data1, str_data2, str_data3, which capture some value after a routine process A. Then I would like to write (append) these 3 string values into a text file each...
2
by: Steve Franks | last post by:
What is the proper/best way to dynamically change the HTML written out to the browser based on the value from a variable in a code behind page? For instance, I have test.aspx.vb as a code behind...
0
by: DC | last post by:
The problem I'm using the .NET GridView and FormView objects for the first time and im getting the error "An OleDbParameter with ParameterName '@ID' is not contained by this...
14
by: Frank | last post by:
I see that ImageFormat includes exif. But I can't find out if I've System.Drawing.Image.FromStream or something like it can read and/or write that format.
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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...

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.