Jump to content

why isn't this displaying?


sphinx

Recommended Posts

function showSubmit() {
    var link_text = '<input type="submit" name="login" value="Login">'; 
    document.write(link_text);
}

window.onload = function() {
    var t = setTimeout('showSubmit();', 3000);
}

 

here's a working example: http://www.realtown.com/test19.php

 

Write it to a div instead using innerHTML. I noticed the loading issue with Firefox. It appears to go away using the following code.

Example: http://www.realtown.com/test19.php

<script>

 

function showSubmit() {

    var link_text = '<input type="submit" name="login" value="Login">';

   

    document.getElementById('result').innerHTML = link_text;

}

 

window.onload = function() {

    var t = setTimeout('showSubmit();', 3000);

}

</script>

</head>

 

 

<div id="result">

 

</div>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.