Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sloppy code (according to my boss.....)

Status
Not open for further replies.

Webflex

Technical User
Apr 20, 2001
101
GB
The code below displays a URL to link to a detail page, for some reason the link in the processed page (Photo) displays with speech marks " at the beginning as in "Photo.

Code:
response.write RS(&quot;dept&quot;) & &quot;</td><td>&quot;&quot;<A href='2picture.asp?action=display&id=&quot;&rs(&quot;id&quot;)&&quot;'><b>Photo</b></td>&quot;

Any pointers to get rid much appreciated
 
response.write RS(&quot;dept&quot;) & &quot;</td><td><A href='2picture.asp?action=display&id=&quot;&rs(&quot;id&quot;)&&quot;'><b>Photo</b></td>&quot;

response.write RS(&quot;dept&quot;) & &quot;</td><td>&quot;&quot;<A
remove these quotes===================^

hth
Bastien

There are many ways to skin this cat,
but it still tastes like chicken
 
rewrite to:

response.write RS(&quot;dept&quot;) & &quot;</td><td><A href='2picture.asp?action=display&id=&quot; & rs(&quot;id&quot;) & &quot;'><b>Photo</b></a></td>&quot;

you had 2 double quotes in between the <td> and the <a tag

you also forgot to close the a tag with a </a>

if you wanted Photo in double quotes then simply rewrite to:

response.write RS(&quot;dept&quot;) & &quot;</td><td><A href='2picture.asp?action=display&id=&quot; & rs(&quot;id&quot;) & &quot;'><b>&quot;&quot;Photo&quot;&quot;</b></a></td>&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top