Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



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
Defies a Status

Posts: 6,522
Name: Dan
Location: Swindon
Trades: 0
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)
__________________
Discounted Web Hosting With XDnet!
>> Get 25% of hosting~ Promo: Webmaster-talk <<

Please login or register to view this content. Registration is FREE

Last edited by dansgalaxy; 11-11-2007 at 06:20 PM..
dansgalaxy is offline
Reply With Quote
View Public Profile Visit dansgalaxy's homepage!
 
 
Register now for full access!
Old 11-13-2007, 12:19 PM Re: Help needed with ajax/php div pop up thing.
dansgalaxy's Avatar
Defies a Status

Posts: 6,522
Name: Dan
Location: Swindon
Trades: 0
Thanks for the help ><... Not
__________________
Discounted Web Hosting With XDnet!
>> Get 25% of hosting~ Promo: Webmaster-talk <<

Please login or register to view this content. Registration is FREE
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 Search this Thread
Search this Thread:

Advanced Search

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

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





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



Page generated in 0.09848 seconds with 13 queries