0

i am trying to get html code for image, but i can't find mistake.

image is in image/NY.gif

NY.gif is stored in variable COA here is piece of code

txt="<img src=\"image/"+COA+"\">" "<strong>Name: </strong>" + Name + "<br />"
1
  • try using single quotes for the attributes inside the string. Commented Apr 18, 2011 at 23:51

2 Answers 2

1

I'm not sure if this is because of a copy / paste into this site, but you don't have anything joining the img tag part of your string and the strong tag part. I think you need to remove both quotes around the empty space between the two. Failing that, get debugging with Firefox & Firebug.

Sign up to request clarification or add additional context in comments.

Comments

0

You have no closing double quote " at the end of the line, for one thing.

1 Comment

second part of code is working, withou the first "<img src=\"image/"+COA+"\">" i have edited it in question :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.