Ekene Ekene - 8 months ago 86
Javascript Question

Is there reasons why innerhtml won't write

I have a page with

<div id='new-feed-1367862865'>original</div>

I have an iframe with this

<script type="text/javascript">
var output-feed="<div id='new-feed-1367862872'></div>New";

Is there any reason why this won't change the content of the parent DIV. It's not working as much as I have tried.

Answer Source

output-feed is not a valid variable name. Use output_feed or outputFeed or something.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download