Warptweet Posted January 18, 2007 Share Posted January 18, 2007 When I make a popup, I need to give a direct link to a website to popup.How can I embed HTML or code onto a popup instead of an image or website? Link to comment https://forums.phpfreaks.com/topic/34755-popup-with-html/ Share on other sites More sharing options...
Psycho Posted January 18, 2007 Share Posted January 18, 2007 Eidt; misread post Link to comment https://forums.phpfreaks.com/topic/34755-popup-with-html/#findComment-163803 Share on other sites More sharing options...
blear Posted January 18, 2007 Share Posted January 18, 2007 Generic version:[code]echo "<A HREF=' ' onClick='javascript:window.open(\"www.someUrl.com\")'> someUrl </a>";[/code]The window.open() js command has lots of extra properties you can add to it. Link to comment https://forums.phpfreaks.com/topic/34755-popup-with-html/#findComment-163805 Share on other sites More sharing options...
Warptweet Posted January 18, 2007 Author Share Posted January 18, 2007 When I click a link to open a popup...[code]<b><FONT SIZE=+3><A HREF=\"javascript:void(0)\"ONCLICK=\"window.open('http://www.warptweet.com/211612151419/$randnum','miniwin','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=$flashwidth,height=$flashheight')\">Watch this Movie!</a></font>[/code]As you can see, I can only open www.warptweet.com/XXXXXXXXXX/XXXXXXXXHow can I open a popup, but instead of openening a website page, make the popup have a code? Such as <h1>Hi there! Link to comment https://forums.phpfreaks.com/topic/34755-popup-with-html/#findComment-163807 Share on other sites More sharing options...
Warptweet Posted January 18, 2007 Author Share Posted January 18, 2007 What I really want is to have a popup, that instead of opening a website page, display this code...[code]<EMBED src="http://www.warptweet.com/211612151419/$randnum" width="$flashwidth" height="$flashheight" align="center">, (Tip). <EMBED>[/code] Link to comment https://forums.phpfreaks.com/topic/34755-popup-with-html/#findComment-163810 Share on other sites More sharing options...
Psycho Posted January 18, 2007 Share Posted January 18, 2007 Does your server support PHP/ASP/??? You could simply open a PHP page and pass the variables ont he query string. Link to comment https://forums.phpfreaks.com/topic/34755-popup-with-html/#findComment-163836 Share on other sites More sharing options...
Warptweet Posted January 19, 2007 Author Share Posted January 19, 2007 Of course my server supports php.Although, I was wondering if instead of creating a page of PHP, simply open a popup with code instead of an url. Link to comment https://forums.phpfreaks.com/topic/34755-popup-with-html/#findComment-164137 Share on other sites More sharing options...
Psycho Posted January 19, 2007 Share Posted January 19, 2007 That seems more of a complex solution to me. Plus, by using Javascript you make it less accessible.Your PHP page would just need to consist of the following:[code]<?php$randnum = $_GET['randnum'];$flashwidth = $_GET['flashwidth'];$flashheight = $_GET['flashheight'];echo "<EMBED src=\"http://www.warptweet.com/211612151419/$randnum\" width=\"$flashwidth\" height=\"$flashheight\" align=\"center\">, (Tip). <EMBED>?>[/code]Not sure what 'Tip' is for or if that is supposed to be a variable, but you get the idea.Then you just call the page in your popup using "pagename?randnum=12345&flashwidth=200&flashheight=200" Link to comment https://forums.phpfreaks.com/topic/34755-popup-with-html/#findComment-164502 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.