| Author |
Object Expected Error
|
zaxxon25
Ranch Hand
Joined: Feb 26, 2005
Posts: 35
|
|
I am having scrollable table whose rows are not editable. This table is in first half of screen. The bottom half of screen displays detail with respect to each row. So say i click on row 1 the bottom screen gets refreshed with details of row1. When i am clicking a row i am getting javascript error "object expected". Can anyone help me out...i am putting my piece of code below... <script> func A() { document.form1.offerid.value = val; clickLink('hiddenLink'); } function clickLink(linkId) { var fireOnThis = document.getElementById(linkId) if (document.createEvent) { var evObj = document.createEvent('MouseEvents') evObj.initEvent( 'click', true, false ) fireOnThis.dispatchEvent(evObj) } else if (document.createEventObject) { fireOnThis.fireEvent("onclick") ---> line which javascript errors out } } </script> <h:form id="form1"> <input type="hidden" name="offerid" /> <t:commandLink id="hiddenLink" forceId="true" style="display:none; visibility: hidden;" action="#{TestBean.openClickOffer}"/> </h:form>
|
 |
Divya Guttikonda
Ranch Hand
Joined: Mar 09, 2005
Posts: 47
|
|
|
I dont see where you are calling function A()???
|
 |
zaxxon25
Ranch Hand
Joined: Feb 26, 2005
Posts: 35
|
|
|
funcA() is called by some third party javascript. The issue is not with it but with function clickLink(linkId)
|
 |
Divya Guttikonda
Ranch Hand
Joined: Mar 09, 2005
Posts: 47
|
|
|
Which version of JSF are you using ?? I read somewhere that for h:commandLink, onclick is present in JSF version 1.2, but not 1.1.
|
 |
zaxxon25
Ranch Hand
Joined: Feb 26, 2005
Posts: 35
|
|
|
I have resolved the issue. I was using tomahawk component which was creating javascript issue. Thanks Divya for your help.
|
 |
 |
|
|
subject: Object Expected Error
|
|
|