Page 1 of 1

Right Click Menu

Posted: Fri Feb 19, 2010 2:06 am
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.

Re: Right Click Menu

Posted: Fri Feb 19, 2010 9:18 pm
by Christopher
Huh? Right click in Javascript and PHP loops?

Re: Right Click Menu

Posted: Sat Feb 20, 2010 12:42 am
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.

Re: Right Click Menu

Posted: Sat Feb 20, 2010 12:45 pm
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.

Re: Right Click Menu

Posted: Sat Feb 20, 2010 12:52 pm
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?"

Re: Right Click Menu

Posted: Sat Feb 20, 2010 6:33 pm
by Christopher
Interesting... :)