Announcement

Do not use the forums to submit bug reports, feature requests or patches, submit a New Ticket instead.

#1 2005-10-13 13:03:35

kimss
Xinha Pro
From: Sweden
Registered: 2005-04-05
Posts: 99
Website

Off Topic - Right Click context menus

I've been searching around abit and came up with theese :
http://javascript.geniusbug.com/index.p … name=cMenu
http://www.javascriptkit.com/script/scr … text.shtml (IE)
http://dhtml-menu.com/examples/ex8-java … -menu.html
http://www.dynamicdrive.com/dynamicinde … xtmenu.htm
http://webfx.eae.net/dhtml/contextmenu/typicalusage.htm (IE)

Also in Xinha there is a right click context menu. I'm wondering if there is a way of using one of the scrips above, but populate the context of the popup after whatever you right-click. Mostly like the functionality already inside Xinha, you rightclick an image and get image related links, right click text and get text related links and such.

My situation is this :
I have an administrator where icons are heavily used. I have an icon which tells the user that an image exists, or the same icon is dimmed meaning there is no image for the item. You can click the icon and the image will popup as a preview. This is very standard logic in a typical system. Here comes the problem.

I want the user to be able to delete the same image, but I dont want to do one of the following :
- insert another trashcan icon for the image icon, this gives me another icon
- make a popup for the left button with "view" or "delete", this makes an extra click for the typical behavior

What I would like was a popup on the rightclick which had two links populated from an onlick event for that image, "View, delete".

Is this possible behavior outside a text area/ iframe like an editor would be?

Offline

#2 2005-10-13 13:04:41

kimss
Xinha Pro
From: Sweden
Registered: 2005-04-05
Posts: 99
Website

Re: Off Topic - Right Click context menus

By the way, webfx : http://webfx.eae.net/dhtml/contextmenu/typicalusage.htm, already has this functionality - but its IE only.

Regards,
Kim Steinhaug
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
www.steinhaug.com - www.easywebshop.no - www.easycms.no

Last edited by kimss (2006-02-27 19:20:52)

Offline

#3 2005-10-13 13:21:25

kimss
Xinha Pro
From: Sweden
Registered: 2005-04-05
Posts: 99
Website

Re: Off Topic - Right Click context menus

Let me come with a specific example to make it very clear, if not already, what behavior am after. In the example I use some fictional code which would fit my needs :

<table>
<tr>
  <td>This is some text</td>
  <td><img src="img-active.gif" id="image[1]"></td>
</tr>
<tr>
  <td>This is some text</td>
  <td><img src="img-active.gif" id="image[2]"></td>
</tr>
<tr>
  <td>This is some text</td>
  <td><img src="img-empty.gif"></td>
</tr>
</table>

Given the code above, right clicking anywere but the icons (img-active.gif) would result in an ordinary context menu. But right clicking on one of those images with the id of some liking, in this case "image" array, would result in a special context menu with links populated from a javascript variable some other place on the page.

Is this possible?

Offline

Board footer

Powered by FluxBB