TJena alla glada!
Har ett liten grejj jag skulle vilja göra i min gästbok men är inte 100 på hur man gör..
är adressen..
Som vi kanske märker så har hon varken skrivit i någon hemsida, bara http:// och hon har inte skrivit in någon e-mailadress, men länkarna finns ändå..
Jag skulle vilja ha så att länkarna bara finns ifall hon har skrivit in hemsida eller e-mail..
if len(RecSet("hemsida"))>3 then
Response.write "<a href="& RecSet("hemsida") &">"& RecSet("hemsida") &"</a>"
end if
if len(RecSet("epost"))>3 then
Response.write "<a href=mailto:"& RecSet("epost") &">"& RecSet("epost") &"</a>"
end if
Det blir fel, som du ser om du går in på sidan.. Jag gjorde om din kod lite.
<% if len(objRS("hemsida"))>3 then %>
<a href="<%=objRS("email")%>" target="_blank" title="<%=objRS("email")%>">"
<% end if %>
<% if len(ojbRS("hemsida"))>3 then %>
<a href="<%=objRS("hemsida")%>" target="_blank" title="<%=objRS("hemsida")%>">"
<% end if %>
<% if len(ojbRS("hemsida"))>3 then %>
<a href="<%=ojbRS("email")%>" target="_blank" title="<%=ojbRS("email")%>">"
<% end if %>
<% if len(ojbRS("email"))>3 then %>
<a href="<%=ojbRS("hemsida")%>" target="_blank" title="<%=ojbRS("hemsida")%>">"
<% end if %>
<% if len(ojbRS("hemsida"))>3 then %>
<a href="<%=ojbRS("email")%>" target="_blank" title="<%=ojbRS("email")%>">"
<% end if %>
<% if len(ojbRS("email"))>3 then %>
<a href="<%=ojbRS("hemsida")%>" target="_blank" title="<%=[b]objRS[/b]("hemsida")%>">"
<% end if %>