-
Posts
53 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by absorr
-
-
How do I add an attribute (like src="blah") into a tag created using createElement? It has to be in JS, and can not use innerHTML. Thanks!
-
that worked thanks guys
-
<!DOCTYPE html><html> <head> <title>Nova Skin Lite</title> <script type="text/javascript"> function steve() { document.getElementById('edit').innerHTML = '<iframe src=\"http://minecraft.novaskin.me/lite#http://www.minecraft.net/images/char.png\" width=\"100%\" height=\"800\">ERROR CODE: I ######ed up</iframe>'; } function userSkin() { var user = document.skin.user.value document.getElementById('edit').innerHTML = '<iframe src=\"http://minecraft.novaskin.me/lite#'user'\" width=\"100%\" height=\"800\">ERROR CODE: I ######ed up</iframe>'; } </script> </head> <body> <div id="edit"><iframe src="http://minecraft.novaskin.me/lite#http://www.minecraft.net/images/char.png" width="100%" height="90%">ERROR CODE: I ######ed up</iframe></div> <form name="skin"> Load User Skin: <input type="text" name="user" /> <input type="button" value="Submit" onClick="javascript:userSkin();" /> <input type="button" value="Steve (default)" onClick="javascript:steve();" /> </form> </body></html>
When I click the button (either one) it does not work. In the chrome JS console it says "Uncaught ReferenceError: steve is not defined"
Get title and metadata from diffrent HTML page
in JavaScript
Posted
Is there a way to get document elements of a different html file through JavaScript? I need to be able to get the title and the description (the description being se by meta tag).