Hi i was wondering if anyvody could help me. i have a link on a page which runs a javascript fucntion. i need to hide this link between 0am and 6am. heres my code. i know how to display but not to hide
What do i do.im just learning this.
this my link below which i need to hide.
<% if rst("currentdate") => 14 then response.write ("hello") end if %> <a href="javascript: SetField(document.Date_of_Birth,'<%=dtmCurrentDate%>');dirtyForm();">Use today</a> </font></td>
</tr>
ajm22386
Member
1 Points
9 Posts
hide a link?
Oct 22, 2008 01:22 PM|LINK
Hi i was wondering if anyvody could help me. i have a link on a page which runs a javascript fucntion. i need to hide this link between 0am and 6am. heres my code. i know how to display but not to hide
What do i do.im just learning this.
this my link below which i need to hide.
<% if rst("currentdate") => 14 then response.write ("hello") end if %> <a href="javascript: SetField(document.Date_of_Birth,'<%=dtmCurrentDate%>');dirtyForm();">Use today</a> </font></td>
</tr>
thanks for your help
hide link
jnsuryapraka...
Participant
1300 Points
250 Posts
Re: hide a link?
Oct 22, 2008 03:47 PM|LINK
you can hide this link by putting it in a div and making the div visibility false in javascript.
for the logic of hiding it between 12 AM and 6 AM, check below logic.
var intHours, intMinutes, intSeconds;
var today;
today = new Date();
intHours = today.getHours();
intMinutes = today.getMinutes();
if (intHours > 0 && intHours < 6) {hide the control, put it in div and make the div visible false.}
else {display the div}
is this what you are looking for......
Surya Prakash Jayanti
http://suryaprakashj.blogspot.com
http://jnsuryaprakash.blogspot.com
p.s. Please click "Mark as Answer" if you think this post answered your question
ajm22386
Member
1 Points
9 Posts
Re: hide a link?
Oct 22, 2008 04:54 PM|LINK
i honestly not sure i know nothing about .net stuff. i just started learning 2 days ago. ill try it and see
thanks
ajm22386
Member
1 Points
9 Posts
Re: hide a link?
Oct 22, 2008 05:03 PM|LINK
its part of a table which is in a div but suppose i cud separtate it
jnsuryapraka...
Participant
1300 Points
250 Posts
Re: hide a link?
Oct 22, 2008 05:04 PM|LINK
yes you can have div inside div. give them separate div id's
Surya Prakash Jayanti
http://suryaprakashj.blogspot.com
http://jnsuryaprakash.blogspot.com
p.s. Please click "Mark as Answer" if you think this post answered your question
ajm22386
Member
1 Points
9 Posts
Re: hide a link?
Oct 22, 2008 05:04 PM|LINK
its part of a table thats in a div. could i just have it in a separate div?
ASPNetEngine...
Participant
1242 Points
138 Posts
Re: hide a link?
Oct 27, 2008 02:58 AM|LINK
Hi,
Yes, you can contain the link in a seperate div tag.
The following code demonstrates how to do this. Please refer to it: