Reply
Help needed with ajax/php div pop up thing.
Old 11-11-2007, 06:17 PM Help needed with ajax/php div pop up thing.
dansgalaxy's Avatar
Eat, Sleep, Code

Posts: 6,284
Name: Dan
Location: Swindon
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.)
Attached Files
File Type: txt dhtmlwindow.txt (18.2 KB, 1 views)
__________________
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.
dansgalaxy is offline
Reply With Quote
View Public Profile Visit dansgalaxy's homepage!
 
When You Register, These Ads Go Away!
Old 11-13-2007, 12:19 PM Re: Help needed with ajax/php div pop up thing.
dansgalaxy's Avatar
Eat, Sleep, Code

Posts: 6,284
Name: Dan
Location: Swindon
Thanks for the help ><... Not
__________________
Personal UK Webhosting
Get 25% of ANY shared package for life ~ Promo: webmaster-talk (only for members!)
dansgalaxy is offline
Reply With Quote
View Public Profile Visit dansgalaxy's homepage!
 
Reply     « Reply to Help needed with ajax/php div pop up thing.
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Webmaster Resources Marketplace:
Software Development Company | Webhosting.UK.com | Text Link Brokers 


   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.11499 seconds with 13 queries