Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #1697 (closed defect: wontfix)

Opened 11 years ago

Last modified 11 years ago

server side map (eg <img ... ismap="ismap" ...>) not handled

Reported by: mettwoch Owned by: anonymous
Priority: normal Milestone: 1.0.4
Component: TurboGears Version: 1.0.3.2
Severity: normal Keywords: server side map
Cc:

Description

Hi,

I need to know the coordinates of where a user has clicked in an image to perform some basic image manipulation. I've found the ismap attribute for an img tag. But unfortunately the URL is not standard (eg .../image/bgMakeTransp?x,y) and TG returns an error.

Traceback (most recent call last):

File "c:\python25\lib\site-packages\cherrypy-2.2.1-py2.5.egg\cherrypy\_cphttptools.py", line 103, in _run

applyFilters('before_main')

File "c:\python25\lib\site-packages\cherrypy-2.2.1-py2.5.egg\cherrypy\filters\init.py", line 151, in applyFilters

method()

File "c:\python25\lib\site-packages\cherrypy-2.2.1-py2.5.egg\cherrypy\filters\decodingfilter.py", line 31, in before_main

self.decode(enc)

File "c:\python25\lib\site-packages\cherrypy-2.2.1-py2.5.egg\cherrypy\filters\decodingfilter.py", line 50, in decode

decodedParams[key] = value.decode(enc)

AttributeError?: 'int' object has no attribute 'decode'

What can be done to avoid that problem.

Thx

Change History

comment:1 Changed 11 years ago by Chris Arndt

  • Status changed from new to closed
  • Resolution set to wontfix

ISMAP is not part of the HTML 4 standard and therefore not supported. You can use client-side image maps (with the MAP element) and define the target URL for every sensitive area individually.

If you need the exact pixel position of mouse-clicks, use an image button (<input type="image">) instead, then the URL will be properly encoded too.

Note: See TracTickets for help on using tickets.