Click to See Complete Forum and Search --> : help with javascript ticker
cimnik.029
07-22-2003, 05:33 PM
i am current;y working on a news ticker. the ticker creates a link though html code and put it on the page. i wanted it so that when i clicked on the link generated, it would open a certain page in a new window. i have acomplished this, however, when i try to open one of the pages, it opens in a new window, BUT also erases everything in the original window and writes in [object].
can anyone help me with this?
It is always helpful to see code...
Charles
07-22-2003, 05:37 PM
You have fallen under the influence of some very bad people. Never use the href="javascript:someScript()" construction. And furthermore, it's important to be certain that your site works for the 13% of users who do not use JavaScript. Use instead:
<a href="http://www.w3.org/" onclick="window.open(this.href, 'child'); return false">W3C</a>
cimnik.029
07-22-2003, 07:14 PM
thanxs man. works perfectly. so with that code, if a browser dosen't have javascript capabilities, it will just load up in the present window?
thanxs again