www.pudn.com > LDAP.zip > emailfriend.js


// developerWorks e-mail to a friend JavaScript 
// initialize global var for new window object 
// so it can be accessed by all functions on the page 
var emailWindow  
// set flag to help out with special handling for window closing 
var isIE3 = (navigator.appVersion.indexOf("MSIE 3") != -1) ? true : false 
// make the new window and put some stuff in it 
function newWindow() { 
        var output = "" 
        emailWindow = window.open("","subwindow","HEIGHT=500,WIDTH=600") 
        // take care of Navigator 2 
        if (emailWindow.opener == null) { 
                emailWindow.opener = window 
        } 
        output += "" 
        output += "" 
        output += "" 
        output += "" 
        output += "" 
        output += "" 
        output += "" 
        output += "" 
        output += "" 
        output += "" 
        output += "" 
        output += "" 
        output += "" 
        output += "" 
        output += "" 
        output += "" 
        output += "" 
        output += "" 
        output += "" 
        output += "" 
        output += "" 
        output += "" 
        output += "" 
        output += "" 
        output += "
spacer gif
spacer gif
spacer gife-mail it!developerWorksspacer gif
spacer gifShare this developerWorks content with others who you think will find it interesting, useful, or even amusing. Be sure to separate multiple e-mail addresses with a comma.

spacer gif
spacer gif" output += "
" output += "" output += "" output += "" output += "" output += "" output += "" output += "" output += "" output += "" output += "" output += "" output += "" output += "" output += "" output += "" output += "" output += "" output += "" output += "" output += "" output += "" output += "" output += "
Title:" + justTitle + "
" + emailAbstract + "
Send to:
Your name:
Your e-mail address:
Comments:
 Close window
" output += "
spacer gif
" output += "" emailWindow.document.write(output) emailWindow.document.close() } // close subwindow, including ugly workaround for IE3 function closeWindow() { if (isIE3) { // if window is already open, nothing appears to happen // but if not, the subwindow flashes momentarily (yech!) emailWindow = window.open("","subwindow","HEIGHT=200,WIDTH=200") } if (emailWindow && !emailWindow.closed) { emailWindow.close() } }