Okay this is for a Email this page to a friend things.
i have that script done ( http://calm.dansgalaxy.co.uk/modules...end/friend.php) just takes refer...
Anyway
i have this ajax pop up thing form dynamic drive and i have played with it a bit this is the main page
demo.php:
PHP Code:
<? if($_GET['id'] == 'self') { include('../../modules/emailtoafriend/friend.php'); } else { ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <link rel="stylesheet" href="windowfiles/dhtmlwindow.css" type="text/css" /> <script type="text/javascript" src="windowfiles/dhtmlwindow.js"> /*********************************************** * DHTML Window Widget- © Dynamic Drive (www.dynamicdrive.com) * This notice must stay intact for legal use. * Visit http://www.dynamicdrive.com/ for full source code ***********************************************/ </script> <body onload="googlewin.hide(); return false"> <script type="text/javascript"> var googlewin=dhtmlwindow.open("googlebox", "iframe", "demo.php?id=self", "Send this page to a friend!", "width=590px,height=420px,resize=1,scrolling=1,center=1", "recal") googlewin.onclose=function(){ //Run custom code when window is being closed (return false to cancel action): return window.confirm("Are you sure you want to close this window?") } </script> <p>Play around with Window 1 (iframe content)</p> <ul> <li><a href="#" onClick="googlewin.show(); return false">Show Window 1</a></li> <li><a href="#" onClick="googlewin.hide(); return false">Hide Window 1</a></li> <!-- <li><a href="#" onClick="googlewin.load('iframe', 'http://www.cssdrive.com', 'CSS Drive'); return false">Change Window's URL to CSS Drive</a></li> <li><a href="#" onClick="googlewin.setSize(800, 500); return false">Resize Window to 800px by 600px</a></li> --> </ul> <? } ?>
The pop up opens automatically so as a quick hack (and all i could do) i put the close function onload in the body but it flashes up..
So i need to have it so it only opens when i click the link to open the pop-up which inlcludes the send to sa friend script and displays it in the popup and then (i guess) i could just add the close pop up function instead of the window.close() so it closes it.
So can someone help me?
i wil attach the other js file which does this (i havnt edited it.)
__________________
Personal UK Webhosting Get 25% of ANY shared package for life ~ Promo: webmaster-talk (only for members!)
Last edited by dansgalaxy : 11-11-2007 at 06:20 PM.
|