Right Click Menu

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
codybecker
Forum Newbie
Posts: 4
Joined: Mon Sep 14, 2009 1:24 pm

Right Click Menu

Post by codybecker »

Anybody know of a right click menu code that can work with php loop? So if the link has a get valuable in it, it will be unique to the record that was clicked on.
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: Right Click Menu

Post by Christopher »

Huh? Right click in Javascript and PHP loops?
(#10850)
codybecker
Forum Newbie
Posts: 4
Joined: Mon Sep 14, 2009 1:24 pm

Re: Right Click Menu

Post by codybecker »

What i mean is . . . .

I have a loop of records

<? while($row = mysql_fetch_array($recruitq, MYSQL_ASSOC))
{ ?>
<tr>
<td><? echo $row['id']; ?></td>
</tr>
<? } ?>

And i want to create a custom right click menu when you click on each <TR> row associated with that record information.
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: Right Click Menu

Post by Christopher »

I don't think you can control the browser's right click menu in HTML -- maybe Flash. It seems like you just want to make them links and have them call Javascript for whatever behavior you need.
(#10850)
User avatar
Eran
DevNet Master
Posts: 3549
Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME

Re: Right Click Menu

Post by Eran »

You can intercept right click events and present a custom menu.
http://www.quirksmode.org/js/events_properties.html - scroll down to "Which mouse button has been clicked?"
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: Right Click Menu

Post by Christopher »

Interesting... :)
(#10850)
Post Reply