PopUp Tooltip Window Generator
Generates HTML and JavaScript for opening a Tooltip Window when the mouse hovers over a hyperlink.
if (window.focus) { self.focus(); } function generateCode() { if (document.form1.url.value == ''){alert('Enter a URL...');return;} if (document.form1.name.value == ''){alert('Enter a neme for the tooltip window...');return;} if (document.form1.height.value == ''){alert('Enter window height...');return;} if (document.form1.width.value == ''){alert('Enter window width...');return;} var text ='\n'; text += 'var version4 = false\;\n'; text += 'if(navigator.appVersion.charAt(0) == "4") version4 = true\;\n'; text += '\n'; text += 'function displayPopup(url,name,height,width,evnt) {\n'; text += ' var properties = "toolbar=0,location=0,height="+height\;\n'; text += ' properties = properties+",width="+width\;\n'; text += ' if(evnt != null) {\n'; text += ' if(navigator.appName == "Microsoft Internet Explorer") {\n'; text += ' properties = properties+",left="+(evnt.screenX + 10)\;\n'; text += ' properties = properties+",top="+(evnt.screenY + 10)\;\n'; text += ' }else {\n'; text += ' properties = properties+",left="+(evnt.screenX - pageXOffset + 10)\;\n'; text += ' properties = properties+",top="+(evnt.screenY - pageYOffset + 10)\;\n'; text += ' }\n'; text += '}\n'; text += 'popupHandle = open(url,name,properties)\;\n'; text += '}\n'; text += 'function closePopup() {\n'; text += ' if(popupHandle != null && !popupHandle.closed) popupHandle.close()\;\n'; text += '}\n'; document.form1.head.value = document.form1.s1.value + text + document.form1.s2.value; var code = '
Subscribe to:
Post Comments (Atom)

No comments:
Post a Comment