Google Answers Logo
View Question
 
Q: Web page features ( No Answer,   1 Comment )
Question  
Subject: Web page features
Category: Computers > Internet
Asked by: summer95-ga
List Price: $10.00
Posted: 28 Oct 2006 11:12 PDT
Expires: 27 Nov 2006 10:12 PST
Question ID: 777813
I have a web page with various pictures and text. The web page is
hosted on a server running Linux, Apache and PHP 4.4.4. Generally, the
pictures and text are in a table with the picture in one ?box? and the
text describing the picture in the adjacent ?box?.  Here?s an example:

<table width=100% cellspacing=55>
<tr>
<td>
<FONT face="EnviroD" color=FFFFFF size=5>
Some text describing the picture to the right.
</td>
<td>
<IMG align=left SRC="Pic_01.jpg"  width=320 height=213 alt="">
</td>
</tr>

<tr>
<td>
<IMG align=left SRC="Pic_02.jpg"  width=320 height=213 alt="">
</td>
<td>
<FONT face="EnviroD" color=FFFFFF size=5>
Some text describing the picture to the left.
</td>
</tr>

etc.

Some of the pictures have been made ?clickable? to view a larger image
by using the following:

<a href="Pic_01Large.html"><img src="Pic_01.jpg" width=320 height=213 alt="" /></a>

I want to add some features so that when a visitor clicks on a small
version of the picture in the table, the picture will automatically
resize itself to fit the visitor?s screen. (It may or may not make a
difference, but I?m assuming the visitor has maximized the web
browser.) I would also like to add a zoom/pan feature. I need the
specific code for this, not just general ideas.

I have previously asked this question in alt.php and received the following reply. 

http://groups.google.com/group/alt.php/browse_thread/thread/e082f85a96156c7c/167f460244f55464?lnk=gst&q=summer&rnum=3#167f460244f55464

I was able to use the java script to get the users screen size, but I
was stuck after that.

Please advise if I need to adjust the price.
Answer  
There is no answer at this time.

Comments  
Subject: Re: Web page features
From: adixm-ga on 03 Nov 2006 19:41 PST
 
Here are two demo files.
<!-----------------------No.1 start,as source page--------------------------->
<html>
<head>
<script language="JavaScript">
function MachakFull(Ie,other){
x=screen.availWidth;
y=screen.availHeight;
target = parseFloat(navigator.appVersion.substring(navigator.appVersion.indexOf(".")-1,navigator.appVersion.length));
if((navigator.appVersion.indexOf("Mac")!=-1)
&&(navigator.userAgent.indexOf("MSIE")!=-1)
&&(parseInt(navigator.appVersion)==4))
window.open(other,"sub","scrollbars=yes");
if (target >= 4){
if (navigator.appName=="Netscape"){
var MachakFull=window.open(other,"MachakFull","scrollbars=yes","width="+x+",height="+y+",top=0,left=0");
MachakFull.moveTo(0,0);
MachakFull.resizeTo(x,y);}
if (navigator.appName=="Microsoft Internet Explorer")
window.open(Ie,"MachakFull","fullscreen=yes");
}
else window.open(other,"sub","scrollbars=yes");
}
</script>
</head> 
<body onload="MachakFull('fullScreen.html','');"><p>loading...</p></body>
</html>
<!---------------------No.1 page end--------------------------------->
<!---------------------No.2 page start, as target page--------------->
<html>
<head>
<script type="text/javascript">
function resizePic(pic){
		pic.width= screen.width;
		pic.Height= screen.Height;
	}
</script>
</head>
<body>
<P align=center><IMG
src="http://bbs.blueidea.com/images/blue/logo.gif"

onload=javascript:resizePic(this) onclick="window.close();"border=0></P>
</body>
</html>
<!--------------------No.2 page end---------------------------->

there are two function,resizePic and MachakFull.MachakFull make the
new window to fullScreen,and resizePic make the pic to fullScreen.

Hope that can help you.
If you choose my comment, please let me know, thx.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy