PDA

View Full Version : Force "preferred photo viewing size" to large?


jerek
Jan-24-2006, 10:49 PM
Cheers folks.

I like the feature that user can adjust the picture size. But i think the users are too lazy, or just many times not interested in this kind of interactivity, so i would like to adjust the default viewing size to large. Is this possible? Now the default viewing size seems to be always small, which is mostly way too small.

Could it be done with javascript? So that script would check the pulldowns value, and if it is not large, it would change the value..do some redirection stuff, set cookies or something. Havent tried that yet, thought about asking it here first. Last time i got great answers here about css very fast :): . Anyways, havent seen such page here on smugmug yet, and im not sure if it is even possible to do..

I guess the photosizechange.mg - page is server side code (?), so i have no idea what cookies or such it sets. Seems the size changing auto-submits settings to this page and it does the magic. Just is this possible to force to large?

Here's few lines from the form. It takes the size and the origin as values :
<form action="/homepage/photosizechange.mg" method="post" name="photosize_chooser" id="photosize_chooser">
<select name="Size" onChange="document.photosize_chooser.submit();">

Maybe if javascript would check the pulldown value, and if not large, it would set the pulldown to large and call the document.photosize_chooser.submit() - function? Im just thinking loud.

-Jere

bwg
Jan-25-2006, 01:26 AM
Cheers folks.

I like the feature that user can adjust the picture size. But i think the users are too lazy, or just many times not interested in this kind of interactivity, so i would like to adjust the default viewing size to large. Is this possible? Now the default viewing size seems to be always small, which is mostly way too small.

Could it be done with javascript? So that script would check the pulldowns value, and if it is not large, it would change the value..do some redirection stuff, set cookies or something. Havent tried that yet, thought about asking it here first. Last time i got great answers here about css very fast :): . Anyways, havent seen such page here on smugmug yet, and im not sure if it is even possible to do..

I guess the photosizechange.mg - page is server side code (?), so i have no idea what cookies or such it sets. Seems the size changing auto-submits settings to this page and it does the magic. Just is this possible to force to large?

Here's few lines from the form. It takes the size and the origin as values :
<form action="/homepage/photosizechange.mg" method="post" name="photosize_chooser" id="photosize_chooser">
<select name="Size" onChange="document.photosize_chooser.submit();">

Maybe if javascript would check the pulldown value, and if not large, it would set the pulldown to large and call the document.photosize_chooser.submit() - function? Im just thinking loud.

-Jere

from just a few posts down...

http://www.dgrin.com/showthread.php?p=232410#post232410

devbobo
Jan-25-2006, 01:52 AM
Other method....


resizeLarge();

function resizeLarge()
{
var objForm = document.photosize_chooser;

if ((objForm) && (objForm.Size.value != 'Large'))
{
objForm.Size.value = 'Large';
objForm.submit();
}
}

jerek
Jan-25-2006, 04:29 AM
The devbobo's function seems exactly like the one in needed,and works like a charm! Dont really need the force-to-large thing, but usefull info too. :thumb

Thanks a lot! I made few searches on this board, but seems i used wrong words.doh.