I can't get my javascript to change text on a page

AFrelepypedaync

New Member
I'm fairly new to Javascript, and I'm trying to self teach it.I've been trying to get text on a page to change using this line of code:\[code\]document.getElementById("gamepage_header").innerHTML = '<h1>Test</h1>'\[/code\]Instead of doing what I want, it seems to just sit there and do nothing.Yes, I've looked in many places to something to work.ThanksEdit:This is the page I'm trying to edit. http://www.kongregate.com/games/kChamp/shellshock-liveMy real idea is to fetch a link within the HTML, then set the gamepage_header as the link so I can simply rightclick and download the .swf. As per request, here is my whole "code", if you can call it that.\[code\]// ==UserScript==// @name SWFLinkage for KH// @namespace tag://kongregate// @description SWF Link getter// @version 1// @grant none// @author SimpleAOB// @date 12.7.2012// ==/UserScript==document.onload = function(){ document.getElementById("gamepage_header").innerHTML = '<h1>Test</h1>' };\[/code\]
 
Back
Top