|
Hi,
I'm a beginner in web app.
To cut it short, i'm having problem with handling elements from multiple documents.
The idea is multiple html pages calling a common js file, from only one document at a time. eg. when the search page calls the js file, it'll only handle the elements of that search.html.
I need to so a lot of element handling like
document.getElementById('mnuSearch').style.color = '#647782';
or
var input = document.getElementById('txtUserName').value;
It's working fine when there is only one document.
When there are more than 1 documents, the document.getElementById('mnuSearch') is not recognized.
That keeps giving "undefined".
How can I solve that?
Thanks
rgds,
tyml
|