Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Object Expected Error

 
zaxxon25
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I dont see where you are calling function A()???
 
zaxxon25
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
funcA() is called by some third party javascript. The issue is not with it but with function clickLink(linkId)
 
Divya Guttikonda
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have resolved the issue. I was using tomahawk component which was creating javascript issue. Thanks Divya for your help.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic