Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Script doesn't work on Mac!?!?

Status
Not open for further replies.

greggb

Programmer
Dec 6, 2003
30
US
I have a simple script that layers some text in a certain spot. I load it with "...body ...onload=..." For some reason, Mac users cannot use it. Here is the script:

<SCRIPT LANGUAGE="javascript">
function ShowIt()
{
document.body.insertAdjacentHTML('BeforeEnd', '<DIV STYLE="position:absolute; TOP:180px; LEFT:580px" ID="link"><table><tr><td width=130><font face=times size=-1><A class="mBlack" Href=" Link</a></td></tr></table></DIV>');
}
</SCRIPT>

Can anyone help me with this?
 

>> Mac users cannot use it

Which browser are the Mac users in question using? insertAdjacentHTML is proprietary Microsoft, AFAIK, and only works in IE4+ on the Mac.

Consider using the "more compliant" DOM methods of createNode, createTextNode, and appendChild to achieve your goals.

Hope this helps,
Dan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top