473,246 Members | 1,268 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,246 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 2564
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: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

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.