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 02-22-2013, 10:26 AM   PM User | #1
mike02
New to the CF scene

 
Join Date: Feb 2013
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
mike02 is an unknown quantity at this point
How to drag with mouse inside iframe

I have an iframe on my page -

<iframe width="425" height="460" frameborder="0" scrolling="auto" marginheight="0" marginwidth="0" src="Gmap.htm"></iframe>

The html page Gmap.htm contains a map 663x855 px, name GM003.jpg. The visible part of the map can be moved around inside the iframe by the scrollbars.

I would prefer to drag it with a mouse, similar to Google Maps. I've partly grasped some of the head functions but the syntax for the body has me completely stumped. Please could someone suggest correct syntax or point me in the right direction.

Thank you.
mike02 is offline   Reply With Quote
Old 02-23-2013, 05:16 PM   PM User | #2
Ulysses69
New Coder

 
Join Date: May 2004
Posts: 15
Thanks: 1
Thanked 0 Times in 0 Posts
Ulysses69 is an unknown quantity at this point
Despite your map being larger than your iframe, you should still be able to use Google Map's default ability to drag the map around ... sounds like you have this disabled, so I would ensure this works first. See here for example: http://blog.poplabs.com/2009/08/embe...-xhtml-strict/

Using the default iframe method, your iframe should contain the google map at the size of the iframe, thus the need to move within the iframe by dragging it around or using the provided controls. Your map sounds like it is a google map iframe, within an iframe!?

Last edited by Ulysses69; 02-23-2013 at 05:18 PM..
Ulysses69 is offline   Reply With Quote
Old 02-23-2013, 05:43 PM   PM User | #3
mike02
New to the CF scene

 
Join Date: Feb 2013
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
mike02 is an unknown quantity at this point
Thank you, but it's not a Google map - it's a jpeg in the same folder as the main page and iframe page. I'm looking for a similar facility as Google maps to use on my own map.
mike02 is offline   Reply With Quote
Old 02-23-2013, 08:37 PM   PM User | #4
mike02
New to the CF scene

 
Join Date: Feb 2013
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
mike02 is an unknown quantity at this point
Problem solved - thank you.
mike02 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 03:57 PM.


Advertisement
Log in to turn off these ads.