Jump to content

absorr

Members
  • Posts

    53
  • Joined

  • Last visited

absorr's Achievements

Newbie

Newbie (1/7)

3

Reputation

  1. 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).
  2. 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!
  3. that worked thanks guys
  4. <!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"
×
×
  • Create New...