link to close the div

Posted on 2007-11-16
Last Modified: 2010-08-05
when that script shoots the div stick to the screen...
what link i got to add to <a href or onclick=...
in order that the div that was open will be gone

please help, i'm massing with that for all day now...tried a lot of scripts and nothing works
set page = new AjaxedPage



sub init() : end sub 



sub callback(action) 

if not rstemp.EOF and action = "poll" and session("alertime")<>ptime then



end if

end sub 




function poll()  

  poll = "<p style='background:#000000;color:#ffffff;font-size:20px;'>" & palert & ptime & "</p>"

end function



sub main() 



var tId=""; // create global variable to hold the interval handler 

function pollDB() {

 /* call the server and when return, call the javascript function showResult with the result */   

ajaxed.callback('poll', showResult);



function showResult(result) {    

$('res').innerHTML = result; // put the result into the div with id="res"


// onLoad (or set the same in the page load asp thingy ) 

window.onload=function() { tId=setInterval('pollDB()',6000); 






      <div id="res" style="position:absolute; left:210px; top:290px"></div>


<% end sub %>

Open in new window

Question by:sasha85
  • 2
  • 2
LVL 17

Expert Comment

Comment Utility
<a href="#" onclick="document.getElementById('res').style.display='none';">Close Div</a>
LVL 17

Assisted Solution

gops1 earned 150 total points
Comment Utility
You can add return false as well.
Rank: Wizard


<a href="#" onclick="document.getElementById('res').style.display='none';return false;">Close Div</a>

Open in new window

LVL 18

Accepted Solution

Morcalavin earned 350 total points
Comment Utility

I answered this in your last question that is still opened.
LVL 18

Expert Comment

Comment Utility
Thanks.  New rank for me(guru).  Weeee!

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This article will show, step by step, how to integrate R code into a R Sweave document
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now