|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Javascript evaluate function
Hi,
I have an onclick function that sends the ID of a div to javascript. How do I then put the ID into a javascript getelementbyid function ? ie: hide(target){ menuitem = document.getelementbyid(target) } What is the correct syntax ? |
|
#2
|
||||
|
||||
|
This example collapses a div tag. I pass the elementId to it.
function collapseDiv( elementId ) { if ( eval( "document.all." + elementId + ".style.display" ) == 'inline' ) { eval( "document.all." + elementId + ".style.display = 'none';" ) } } |
![]() |
| Viewing: ASP Free Forums > Programming > HTML, JavaScript And CSS Help > Javascript evaluate function |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|