Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Blocks
Author Message
pdoobepd
Worker
Worker


Joined: May 07, 2005
Posts: 129

PostPosted: Wed Mar 29, 2006 8:33 pm Reply with quote

Hey Guys... Can anyone help me create a block for PHP in which I can add links for a "popup" window created with html coding.

In other words... I have the html created but want it opened on click and to a certain size specification. I would like to be able to add more than one such link as each would be a different option but all popup windows would be the same size.

Embarassed I hope I explained that well Embarassed

Thanks!
Ging...

P.S. I'm running PHP Nuke 7.6 3.1 patched

_________________
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message
montego
Site Admin


Joined: Aug 29, 2004
Posts: 9453
Location: Arizona

PostPosted: Thu Mar 30, 2006 5:24 am Reply with quote

Well, here is a very simple javascript function you can start with:

Code:


function msnl_OpenWindow(URL) {
   ViewWin=window.open(URL,'ViewSomething','width=800,height=600,menubar,scrollbars,resizable,left=0,top=0');
}


You can pass more of the options as variables if you wish. There may even be more options available in the window.open method.

You would invoke this via either an "onclick" or "href" on a link.

Regards,
montego

_________________
Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
pdoobepd
PostPosted: Thu Mar 30, 2006 2:04 pm Reply with quote

Thanks Montego but I had the java script the main issue I was having was with PHP Nuke not liking the Java code in the block links were posted fine but popups wouldn't work.

So for all those who have the same issues with PHP Nuke not liking java script pop ups that you may want for certain features I found a way around it using all HTML coding ...

Code:
<a href="#" onClick="MyWindow=window.open('http://www.yourwebsite.com/yourhtmlpopup.html','MyWindow','toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=200,height=415'); return false;">PLACE_YOUR_LINKTEXT_HERE</a>


You will need to change the sizes and "yes" on the options to what you want them to be.

This works in PHP Nuke 7.6 3.1 patched test it on your site if you have a different version, but it should work.

Thanks
Ging...
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Blocks

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©