im trying to call a function onClick event but its not working for me.. the red color script is the one i want to call onClick the green one is basically dropdown menu script (frm dynamic drive) see the bold area of green 1, if i replace this with the script no longer work well (not show dropdown menu) can any 1 help me regarding how can i call the function in <a href="#" class="subnav2" >Search 3</a> the whole page code is:
Your links array should be built like this: srch[0]='<a href="#" class="subnav2" onClick="msg(\'Search1\');">Search 1</a>' srch[1]='<a href="#" class="subnav2" onClick="msg(\'Search2\');">Search 2</a>' srch[2]='<a href="#" class="subnav2" onClick="msg(\'Search3\');">Search 3</a>' Code (markup): Single quotes inside single quote statement must be escaped with backslash.