Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

Hiding Div Help

Trying to hide a div via ajax

12:30 am on Jul 30, 2008 (gmt 0)

New User

5+ Year Member

joined:July 30, 2008
posts: 2
votes: 0

I am trying to hide a div via ajax using an input button.

here's my function:

function saveHideDetail(divid) {
document.getElementsByName(divid).style.display ='none';

here is how i am calling it (php):


When I click in the input button, nothing happens. No errors, nothing. I'm sure it is a syntax issue.

Thanks in advance!

7:35 am on July 30, 2008 (gmt 0)

Junior Member

10+ Year Member

joined:Dec 7, 2004
votes: 0


replace 'getElementsByName' with 'getElementById'

HTH, Tom