c1hundred
04-14-2009, 08:57 AM
Hi, I'm new on forum.
Anyway, I have this code but it doesn't work.
If I remove the CSS in the document.write function it works fine.
I have tried moving background:url(); to background='' in the anchor but that still doesn't work.
function generate(){
var user = document.getElementById('user').value;
document.write("<style type='text/css'>
.subscribe {
font-family:Arial;
background:url(subscribe.png) no-repeat;
font-weight:bold;
width:80px;
height:25px;
padding:5px 12px 5px 8px;
color:#994800;
text-decoration:none;
}
.subscribe:hover {
text-decoration:underline;
}
</style>
<a href='http://youtube.com/subscription_center?adduser="+ user +"' class='subscribe'>Subscribe</a>");
}
Thanks for any help given!!!
Anyway, I have this code but it doesn't work.
If I remove the CSS in the document.write function it works fine.
I have tried moving background:url(); to background='' in the anchor but that still doesn't work.
function generate(){
var user = document.getElementById('user').value;
document.write("<style type='text/css'>
.subscribe {
font-family:Arial;
background:url(subscribe.png) no-repeat;
font-weight:bold;
width:80px;
height:25px;
padding:5px 12px 5px 8px;
color:#994800;
text-decoration:none;
}
.subscribe:hover {
text-decoration:underline;
}
</style>
<a href='http://youtube.com/subscription_center?adduser="+ user +"' class='subscribe'>Subscribe</a>");
}
Thanks for any help given!!!