Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-21-2005, 06:19 PM   PM User | #1
winsonlee
New Coder

 
Join Date: May 2005
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
winsonlee is an unknown quantity at this point
Display part of the picture.

with the existing code, i am able to display a picture till the width of the mapBox. Eg if the pic is 1200 and the box is 600, it is able to display half the picture in the box only. the pic displayed is from 0-600. I wonder if there is any way i can display from 600-1200 which is the next half of the picture in the mapBox ??

Code:
<style type="text/css"> <!--
body {
background-image:  url(files/bg.gif);

}
div#mapBox,
{
top:130px;
left:300px;
width:600px;
height:450px;
position:absolute;
overflow:hidden;
}
--></style>

<script language="JavaScript">
function init(){
	obj=document.getElementById("mapImage");

	obj.width = 1200;
	obj.height= 1200;
	cursorLocation();

}
</script>

<body topmargin="0" leftmargin="0" mar onload="init()">

	<div id="mapBox">
		<img id="mapImage" img src="files/final2.gif" onclick="zoom(1.2)">
	</div>
winsonlee is offline   Reply With Quote
Old 05-21-2005, 07:16 PM   PM User | #2
BaldEagle
Regular Coder

 
Join Date: Apr 2005
Location: Lisbon, CT
Posts: 339
Thanks: 0
Thanked 0 Times in 0 Posts
BaldEagle is an unknown quantity at this point
Not sure if this the solution you are looking for, but overflow: auto; will add scrollbars in both directions.

BaldEagle
BaldEagle is offline   Reply With Quote
Old 05-21-2005, 10:56 PM   PM User | #3
vwphillips
Senior Coder

 
Join Date: Mar 2005
Location: Portsmouth UK
Posts: 4,355
Thanks: 3
Thanked 458 Times in 445 Posts
vwphillips is a jewel in the roughvwphillips is a jewel in the roughvwphillips is a jewel in the rough
see

http://www.vicsjavascripts.org.uk/Di...yPartImage.htm

http://www.vicsjavascripts.org.uk/Im...mageViewer.htm

http://www.vicsjavascripts.org.uk/Cl...lipEffects.htm
vwphillips is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:00 PM.


Advertisement
Log in to turn off these ads.