• 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

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi i am using bea weblogic on publishing portlet applications, now my problem is that when i set an id to a tag, the portal appends the name of the porlet among other things... a sample id can be Porlet_4_1wlw-select_key:{actionForm.cdTipoJDC}

To solve that problem i need to use a bea javascript function, getNetuiTagName("myNormalId") and that retreives me the complex id described.

Now i am using:
var availableList = document.getElementById(getNetuiTagName("availableOptions"))

That works great on ie but on mozilla i receive null. I thing that is for the use of { } in the id name. I tried with scape characters \{ \} and the same result.

am I wrong, mozilla doesn't support complex ids?

thanks
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is getNetuiTagName? What is that returning?


Also just checking:
Are you usinig mozzila's JavaScript debugger which gives better error messages?

Tools->Web Development->JavaScript Console
 
Eduardo Plata
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
getNetuiTagName("myNormalId") its a bea weblogic funcion that returns a String like "Porlet_4_1wlw-select_key:{actionForm.cdTipoJDC}"

Using javascript debugger the error is on:
availableList.length

and i am retrieving availableList as:

availableList = document.getElementById(getNetuiTagName("availableOptions"))

Using
availableList = document.forms[0].elements[getNetuiTagName('availableOptions')] it works, but like i am in a portal app, i don't know what form will be ... with the index 0 works only if there is only a form.
 
Eduardo Plata
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
simplifying my post:

I have this:



how can i retrieve the select element on mozilla? (like i am using a framework i can't change the name or put something beyond (like the id).
reply
    Bookmark Topic Watch Topic
  • New Topic