• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

getElementById() issue with hidden t:commandLink

 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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>
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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;
}
}
 
Trust God, but always tether your camel... to this tiny ad.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic