Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Feb 2013
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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.

  • #2
    New Coder
    Join Date
    May 2004
    Posts
    15
    Thanks
    1
    Thanked 0 Times in 0 Posts
    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 06:18 PM.

  • #3
    New to the CF scene
    Join Date
    Feb 2013
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

  • #4
    New to the CF scene
    Join Date
    Feb 2013
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Problem solved - thank you.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •