mouse click

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • chsadaki@hotmail.com

    mouse click

    HI
    I am working on a project for the university, I need to know if there
    is a method in php that returns the x,y of the mouse click. cos I need
    it to allocate some positions on a map of my city.

    thanx in advance
    shameram sadaki

  • Ian Collins

    #2
    Re: mouse click

    chsadaki@hotmai l.com wrote:[color=blue]
    > HI
    > I am working on a project for the university, I need to know if there
    > is a method in php that returns the x,y of the mouse click. cos I need
    > it to allocate some positions on a map of my city.
    >[/color]
    That's client side stuff, you have to capture this in JavaScript.

    --
    Ian Collins.

    Comment

    • Chung Leong

      #3
      Re: mouse click

      chsadaki@hotmai l.com wrote:[color=blue]
      > HI
      > I am working on a project for the university, I need to know if there
      > is a method in php that returns the x,y of the mouse click. cos I need
      > it to allocate some positions on a map of my city.
      >
      > thanx in advance
      > shameram sadaki[/color]

      Yes, if you're talking about a server-side image map. If you have the
      following on a page:

      <form>
      <input type="image" name="cmap" src="campus_map .jpg">
      </form>

      when the user clicks on a spot on the picture, the browser would sent
      the variable pair cmap.x and cmap.y to the server. These two can be
      retrieved in PHP from the $_GET array at the indices "cmap_x" and
      "cmap_y".

      Server-side image map is a somewhat outdated technique however. People
      nowadays usually use client-side image maps instead.

      Comment

      • Dikkie Dik

        #4
        Re: mouse click

        If you want to contact the web server with the coordinates:


        If you want to handle everything on the client, use USEMAP instead.

        chsadaki@hotmai l.com wrote:[color=blue]
        > HI
        > I am working on a project for the university, I need to know if there
        > is a method in php that returns the x,y of the mouse click. cos I need
        > it to allocate some positions on a map of my city.
        >
        > thanx in advance
        > shameram sadaki
        >[/color]

        Comment

        Working...