E
EvanVLane
Hey all,
I have a Xanga Premium weblog, which allows for Javascript code, and I
want to replace the standard profile picture with an image map
generated with Photoshop and Image Ready. Xanga doesn't allow for it by
default, and I was wondering if it would be possible to replace the "<a
href="home.aspx?user=cyssis"><img
src="http://p1.xanga.com/10/b3/10b3c3b8e8b002b68734f96d9c02e1db8394697.jpg"
width="119" border="0" alt="Visit cyssis's Xanga Site!" /></a>" code
with the code for my image map.
Right now I've looked through several blog modification sites, and the
closest I've come up with is:
<!-- start code provided by createblog.com -->
<script language=javascript>
var oldno = new
Array('http://p1.xanga.com/10/b3/10b3c3b8e8b002b68734f96d9c02e1db8394697.jpg');
var newno = new
Array('http://www.google.com/intl/en/images/logo.gif');
for (var i = 0; i < document.images.length; i++) {
for (var s = 0; s < oldno.length; s++){
if (document.images.src == oldno){
neweno = document.createElement('img');
neweno.src = newno;
document.images.parentNode.replaceChild(neweno, document.images);
break;
}
}
}
</script>
<!-- end code provided by createblog.com -->
It works just fine for replacing the image, but is it possible to
modify this code to replace a string of code with another string of
code?
Thanks!
Evan.
I have a Xanga Premium weblog, which allows for Javascript code, and I
want to replace the standard profile picture with an image map
generated with Photoshop and Image Ready. Xanga doesn't allow for it by
default, and I was wondering if it would be possible to replace the "<a
href="home.aspx?user=cyssis"><img
src="http://p1.xanga.com/10/b3/10b3c3b8e8b002b68734f96d9c02e1db8394697.jpg"
width="119" border="0" alt="Visit cyssis's Xanga Site!" /></a>" code
with the code for my image map.
Right now I've looked through several blog modification sites, and the
closest I've come up with is:
<!-- start code provided by createblog.com -->
<script language=javascript>
var oldno = new
Array('http://p1.xanga.com/10/b3/10b3c3b8e8b002b68734f96d9c02e1db8394697.jpg');
var newno = new
Array('http://www.google.com/intl/en/images/logo.gif');
for (var i = 0; i < document.images.length; i++) {
for (var s = 0; s < oldno.length; s++){
if (document.images.src == oldno
neweno = document.createElement('img');
neweno.src = newno
document.images.parentNode.replaceChild(neweno, document.images);
break;
}
}
}
</script>
<!-- end code provided by createblog.com -->
It works just fine for replacing the image, but is it possible to
modify this code to replace a string of code with another string of
code?
Thanks!
Evan.