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)

5+ Year Member

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 Jul 30, 2008 (gmt 0)

10+ Year Member


replace 'getElementsByName' with 'getElementById'

HTH, Tom


Featured Threads

Hot Threads This Week

Hot Threads This Month