/    Sign up×
Community /Pin to ProfileBookmark

PHP Photo Viewer

Hi All, Happy Thanksgiving!!

I have a little script on my site that lets people view photos.
go to [url]http://photoweb.esctonline.com/[/url] USERNAME & PASSWORD both “test”
click on: dance on 12/31/04 under events

Click on a photo and you will see that there is white space

The H of the photo is 360 and the W of the photo is 480, thats what the size of the viewer is set too. Do you guys have any ideas?

Thanks

to post a comment
PHP

3 Comments(s)

Copy linkTweet thisAlerts:
@NogDogNov 24.2005 — All I can think of (since I don't know what your code/markup looks like for the pop-up page) is to set the body margin and padding to 0 (or whatever value works for you):

CSS:
<i>
</i>body {
margin: 0;
padding: 0;
}
Copy linkTweet thisAlerts:
@bokehNov 24.2005 — The H of the photo is 360 and the W of the photo is 480, thats what the size of the viewer is set too. Do you guys have any ideas?[/QUOTE]What you are doing is opening the image directly in the pop-up window without the the pop-up window having any html or css control. To add css control as suggested by Nogdog the pop-up will need html added to the pop-up. The image will then need to be requested by the html in the pop-up.
Copy linkTweet thisAlerts:
@purefanNov 24.2005 — I found your JS for opening the new window:
<script type="text/javascript">

function popUp(url) {

var features="left=100,top=100,width=480, height=360,menubar=0,status=0,scrollbars=0,resizable=0,toolbar=0,location=0,directories=0";

window.open(url,'setlist',features);

}

function hidestatus(){

window.status=''

return true

}

if (document.layers)

document.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT)

document.onmouseover=hidestatus

document.onmouseout=hidestatus

</script>[/quote]

I wrote a JS function for opening a new window but actually creating it 'on the fly'. My function was intended for displaying an applet but it is easy to modify it to suit your needs:
[code=html]
<script type="text/javascript">
<!--
function AbrirVentana(Titulo,Nombre,PGN, Condicion)
{
var VentanaNueva=window.open('','name','height=675,width=655,status=0');
VentanaNueva.document.write('<html><head><title>' + Titulo + '</title>');
VentanaNueva.document.write('</head><body background="bakgrnd2.jpg">');
VentanaNueva.document.write('<script type="text/javascript" src="../scripts/condiciones.js"></script>');
VentanaNueva.document.write('<H2><FONT COLOR="Maroon">' + Nombre + '</FONT></H2>');
VentanaNueva.document.write('<APPLET code="ChessBoard.class" codebase="partidas" align="baseline" width="630" height="560">');
VentanaNueva.document.write('<PARAM name=pgngamefile value=' + PGN + '>');
VentanaNueva.document.write('</APPLET>');
VentanaNueva.document.write('<br><a href="partidas/' + PGN + '">Bajar el PGN</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;||&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;');
if(Condicion=="NO")
{ VentanaNueva.document.write('Ver condiciones del evento&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;||&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;');
}
else {
VentanaNueva.document.write('<a href="javascript:Condiciones('../ajedrez/condiciones/' + Condicion +'')">Ver condiciones del torneo</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;||&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;');
}
VentanaNueva.document.write('<a href="javascript:self.close()">Cerrar esta Ventana</a></p>');
VentanaNueva.document.write('</body></html>');
VentanaNueva.document.close();
}
//-->
</script>
[/code]


I know the resulting webpage wouldnt be validated by the w3.org but just change it a bit and you would have a perfectly handable webpage for displaying your photos.

hope it helps.
×

Success!

Help @comptech520 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...