| | |
Trouble with jsf, passing event
Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
•
•
Join Date: Apr 2007
Posts: 25
Reputation:
Solved Threads: 0
Hi folks, quick question for ya. I'm working on getting a custom context menu to work in Firefox (it was written for IE with behaviors) and I can get the menu to pop-up, but i'm getting a javascript error when it does. (Also, nothing in the menu works, but I believe that's because of some other behaviors I haven't redone).
On line 4: onContextMenu="displayContextMenu" calls the function which calls a chain of functions for highlighting grid rows, getting the row id, and of course, making the contextMenu div visible. For Firefox, I've read that I need to pass the event when this is written inline like this. so I change it to this: onContextMenu="displayContextMenu(event)".
This works, but I get an error: "displayContextMenu(event) is not a function" when i'm using webdeveloper addon for firefox. Also, the source code for that line looks like "displayContextMenu(event)()". So it believes "(event)" is part of the name of the function, instead of the actual event. I know they wrote this back when JSF was new, and created custom components, but is there a way to attach the event to that function call at all?
Thank you,
Jmasta
On line 4: onContextMenu="displayContextMenu" calls the function which calls a chain of functions for highlighting grid rows, getting the row id, and of course, making the contextMenu div visible. For Firefox, I've read that I need to pass the event when this is written inline like this. so I change it to this: onContextMenu="displayContextMenu(event)".
This works, but I get an error: "displayContextMenu(event) is not a function" when i'm using webdeveloper addon for firefox. Also, the source code for that line looks like "displayContextMenu(event)()". So it believes "(event)" is part of the name of the function, instead of the actual event. I know they wrote this back when JSF was new, and created custom components, but is there a way to attach the event to that function call at all?
Thank you,
Jmasta
<w:grid id="sourceNavGrid"
beanName="sourceNav.gridManager"
selectionColumnEnabled="true"
onContextMenu="displayContextMenu"
pagingEnabled="true"
filteringEnabled="true"
sortingEnabled="true"
trackingEnabled="true"
trackingImage="/codesWeb/theme/images/tracking.gif"
styleClass="grid"
headerClass="grid-header"
rowClasses="grid-row1,grid-row2"
footerClass="grid-paging"
columnClasses="grid-link,grid-image,grid-text,grid-text,grid-number,grid-text,grid-number,grid-date,grid-date,grid-date,grid-date,grid-date,grid-date,grid-date"/> Last edited by jmasta; Jul 8th, 2008 at 3:47 pm. Reason: made some code bold
![]() |
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: Two drop downs with image
- Next Thread: correct?
| Thread Tools | Search this Thread |
acid2 ajax ajaxcode ajaxexample ajaxhelp ajaxjspservlets animate array automatically beta box browser bug calendar captchaformproblem cart checkbox close codes column createrange() css cursor date debugger decimal dependent design dom download dropdown element embed enter error events firefox focus form frameworks getselection google gwt gxt hiddenvalue highlightedword hint html htmlform ie7 iframe images index internet java javascript javascripthelp2020 jawascriptruntimeerror jquery jsfile jsp libcurl listbox maps masterpage media menu microsoft mimic mp4 onmouseover paypal php player position post problem programming progressbar prototype redirect regex runtime safari scale scriptlets search security select size software sql text textarea unicode w3c website window windowofwords windowsxp





