I need to pass the contents of an inside div to a function, for example myfun(string). I have tried using
myfun((this).children[0].innerHTML)
myfun((this).children[1].innerHTML)
myfun((this).children[0].children[0].innerHTML)
but none of those seem to work. I can’t just pass the getElementById value because the function should be generic since it would be called by php on various <a> elements (ideally I think it should include the this. keyword).

Thanks for any help.
in your function, “this” refers to the link, and can’t be used.
a much cleaner solution would be to have myfunc know that it is going to receive an object which contains the text
javascript:
html