I tried using the onLoad feature and it still didn't work.
Can you post an example of the technique you were explaining?
Main Topics
Browse All TopicsHello,
I am having trouble getting the following code to display transparent png files. This code sits in an external .js file that is loaded when the html page is loaded. If this code is placed directly into the html file it works correctly but this will not work in this case because it would mean touching well over 1,000 files. Since the .js file is already linked to these documents if I make this change once it'll affect every document which is an easier solution.
Unfortunately I have a feeling that trying to write this into the html using javascript fails because the filter 'AlphaImageLoader' doesn't get called...
Here's the code. Hopefully someone has run into this problem before and can offer a solution.
cheers,
rise4peace
div = '<div id="cancelbtn" style="position:absolute;t
div2 = '<div id="menubtn" style="position:absolute;t
divwrite = div + div2 ;
document.body.insertAdjace
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
<html>
<head>
<script type="text/javascript">
document.write('<style type="text/CSS">');
document.write('#cancelbtn
document.write('height:66;
document.write('filter:pro
document.write('#menubutto
document.write('height:66;
document.write('filter:pro
document.write('</style>')
</script>
</head>
<body onLoad="document.getElemen
<div id="cancelbtn" border="0" onMouseDown="cancel();"></
<div id="menubtn" border="0" onMouseDown="goMenu();"></
whatever else you have in the page goes here
</body>
</html>
COBOLdinosaur,
that works like a champ!
final question, since i have over 300+ htm files that need this added i suppose there's no other solution than to hard code all of this into each page correct? is there a way i can add all of this except the onLoad and div tags to a stylesheet??
thanks,
rise4peace
COBOLdinosaur,
Here's the final code that i am able to run through a linked .js file. Thank you very much for your excellent help. Get outside once in awhile and remember there's more to life than grades.
cheers,
rise4peace
==========================
var survey = "\/survey\/";
document.write('<style type="text/CSS">');
document.write('#cancelbtn
document.write('height:66;
document.write('filter:pro
if(window.location.href.in
document.write('#menubtn {position:absolute;top:611
document.write('height:66;
document.write('filter:pro
}
document.write('</style>')
document.write('<div id="cancelbtn" border="0" style="display:block" onMouseDown="cancel();"></
document.write('<div id="menubtn" border="0" style="display:block" onMouseDown="goMenu();"></
==========================
Business Accounts
Answer for Membership
by: COBOLdinosaurPosted on 2005-01-26 at 08:24:17ID: 13143577
Simple you can't do it that way because the Loader requires that executable code gets brought into memory. That can only happen at load time when the styles are being loaded in. After the fact modification will not bring in the code because it is not a conventional link.
You could try writing the style in the head during the load as as class and then write the divs with the class instead of a style entry.
Cd&