Jump to content

cap97

Members
  • Posts

    2
  • Joined

  • Last visited

cap97's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. Okay, good to know. So here's what I got so far then:test2.php - Original page with source links, opening links with standard MM_openBrWindow javascript, just to eliminate toolbars. <html><head><title>Test Page</title><script language="JavaScript" type="text/JavaScript"><!--function MM_openBrWindow(theURL,winName,features) { //v2.0 window.open(theURL,winName,features); return false;}//--></script></head><body><h1>Image PopUp Test</h1><a href="javascript:;" onclick="MM_openBrWindow('test3.php?image_id=30','','toolbars=no,scrollbars=yes')">Click Me</a><p><a href="javascript:;" onclick="MM_openBrWindow('test3.php?image_id=236','','toolbars=no,scroolbars=yes')">Click Me Too</a><p></body></html> On to test3.php, where it pulls the variable passed in test2.php and figures out the image height and width by tapping the database the image info is stored then. Then test3.php is supposed to resize itself, based on that: <html><head><title></title><script language="javascript">function resize_popup(){ w = <?php echo "$pwidth";?>; h = <?php echo "$pheight";?>; window.resizeTo(w,h); window.moveTo((screen.availWidth-w)/2, (screen.availHeight-h)/2);}</script></head><body bgcolor="#ffffff" onload="resize_popup();" topmargin="0" marginheight="0" leftmargin="0" marginwidth="0"><?phpecho "<a href=\"javascript:window.close()\"><img src=\"$url\" border=\"0\"></a>";?></body></html> And...it works! Sorta. The only issue being the popup window seems to cut off the images both horizontally and vertical just a smidge, particularly vertically. Any ideas why this might be? To see what I mean, visit: Test Site and then resize the popup window after it opens and you'll see there's more picture that should be displaying.
  2. Is there a way to make a page load without a browser's menubar without opening it via a javascript link? In other words, I want a page to load with its own requirements to remove a menubar, without having to link it via a link like window.open('menubar=no') type link. So anyone going to the page http://blah.com/test.html will get a page with no menubar because test.html has some code that removes its own menubar. Gawd I hope that makes sense...
×
×
  • Create New...