• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

cfimage tag

Guest
Dec 10, 2008 Dec 10, 2008

Copy link to clipboard

Copied

I have an image that I have created using the new image draw functions, but I need to have separate areas of the image as links to other pages. I know that the html map tag can be used to do this, but the problem is I can only get it to work if I hardcode the coordinates, but what I need is to use coldfusion variables as the coordinates as the images are drawn dynamically. Is there any way to do this, or a suitable alternative?
TOPICS
Advanced techniques

Views

549

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Dec 10, 2008 Dec 10, 2008

Copy link to clipboard

Copied

Can't you put the variable in the coords field

<cfset coords = "128,132,241,179">
<area shape="rect" coords="#coords#" href="link.html">

I've never tried it but it seems like the logical solution

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Dec 11, 2008 Dec 11, 2008

Copy link to clipboard

Copied

It does indeed! And that's what I set out to do when developing the site as I saw no reason why that wouldn't work... but it doesn't. The coldfusion variables aren't evaluated within the map tag, and I'm baffled as to why not....

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Dec 11, 2008 Dec 11, 2008

Copy link to clipboard

Copied

Problem solved! I have found my mistake earlier on in the code as to why the variables were not evaluated. Thanks for your reply.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Dec 11, 2008 Dec 11, 2008

Copy link to clipboard

Copied

LATEST
no problem, its always the little things. Glad you got it working.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation