rich1234
11-01-2007, 11:25 AM
Hi, Hope someone can help and indeed if it can be done.
I need to combine this if javascript
<script type="text/javascript">
var d = new Date()
var time = d.getHours()
if (time<10)
{
document.write("<b>Good morning</b>")
}
else if (time>=10 && time<11)
{
document.write("<b>Good day</b>")
}
else
{
document.write("<b>Hello World!</b>")
}
</script>
with this.
<a onmouseover="doTooltip(event,'<img src="<%=Server.URLPathEncode(rsCard("ThumbnailURL"))%>">
<div class="tp2"><%If Trim(rsCard("Author"))<>"" Then%> <%=rsCard("Author")%><%End If%></div>' )" onmouseout="hideTip()" href="http://xxxxxxx">xxxxxxx</a></font>
I basically need the onmouseover event which has an asp include to display a different image at different times. I have three asp includes ABC so I am imagining something along the lines of.
document.write("<a onmouseover="doTooltip(event,'<img src="<%=Server.URLPathEncode(rsCard("ThumbnailAURL"))%>">")
}
else if (time>=10 && time<16)
{
document.write("<a onmouseover="doTooltip(event,'<img src="<%=Server.URLPathEncode(rsCard("ThumbnailBURL"))%>">")
}
else
{
document.write("<a onmouseover="doTooltip(event,'<img src="<%=Server.URLPathEncode(rsCard("ThumbnailCURL"))%>">")
}
I know thats completely wrong, but hope someone gets the idea. It of course needs to include the rest of the code.
Any help would be appreciated.
Thanks
Richard
I need to combine this if javascript
<script type="text/javascript">
var d = new Date()
var time = d.getHours()
if (time<10)
{
document.write("<b>Good morning</b>")
}
else if (time>=10 && time<11)
{
document.write("<b>Good day</b>")
}
else
{
document.write("<b>Hello World!</b>")
}
</script>
with this.
<a onmouseover="doTooltip(event,'<img src="<%=Server.URLPathEncode(rsCard("ThumbnailURL"))%>">
<div class="tp2"><%If Trim(rsCard("Author"))<>"" Then%> <%=rsCard("Author")%><%End If%></div>' )" onmouseout="hideTip()" href="http://xxxxxxx">xxxxxxx</a></font>
I basically need the onmouseover event which has an asp include to display a different image at different times. I have three asp includes ABC so I am imagining something along the lines of.
document.write("<a onmouseover="doTooltip(event,'<img src="<%=Server.URLPathEncode(rsCard("ThumbnailAURL"))%>">")
}
else if (time>=10 && time<16)
{
document.write("<a onmouseover="doTooltip(event,'<img src="<%=Server.URLPathEncode(rsCard("ThumbnailBURL"))%>">")
}
else
{
document.write("<a onmouseover="doTooltip(event,'<img src="<%=Server.URLPathEncode(rsCard("ThumbnailCURL"))%>">")
}
I know thats completely wrong, but hope someone gets the idea. It of course needs to include the rest of the code.
Any help would be appreciated.
Thanks
Richard