• Post Reply Bookmark Topic Watch Topic
  • New Topic

getElementById() issue with hidden t:commandLink  RSS feed

 
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)
fireOnThis.click()
</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>
 
Master Blaster
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try this javascript function
Here begins the code

<script>
function A()
{
var block=document.forms[0];
var comp;
if(comp=="hiddenlink")
{
alert(block[comp].name);
block[comp].submit;
}
}
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!