简体   繁体   中英

changing innerhtml but page does not display new innerhtml

In an application that I am working on, on page load, I set innerhtml and the page displays correctly. I have a radio button on my page that when hit, the innerhtml is changed. The new change to the innerhtml does not display on the page.I know that my new innerhtml is being changed due to setting tracepoints and debugging but the old values still stay in my table. is there something i need to call to refresh with the new html (i do not want the page to refresh, but the data in my table)? Page load calls LoadDashboardTree - and the table displays correctly. The javascript action of my radio buttons call the correct sub depending on the value of the radio button selected, I can tell that when I hit the radio button to call loadDashboardTreeDays that it is calling this because I have set tracepoints in this and it does go through, just the table never refreshes. divsummary inner html does not refresh either but it is not needed as both days and non days do the same thing, so it still is displaying correctly and picking up the onclick

    Public Sub LoadDashboardTree(ByVal Id, ByVal Cat, ByVal Type, ByVal ExplodeTo)
    div027.InnerHtml = LoadChild(Id, Cat, Type, ExplodeTo)
    divSummary.InnerHtml = LoadSummary(Id, Cat, Type)
End Sub

Public Sub LoadDashboardTreeDays(ByVal Id, ByVal Cat, ByVal Type, ByVal ExplodeTo)
    div027.InnerHtml = LoadChildDays(Id, Cat, Type, ExplodeTo)
    divSummary.InnerHtml = LoadSummaryDays(Id, Cat, Type)
End Sub

edit- this is the call to change the innerHTML from my aspx.vb page - not the actual javascript portion of the page, for those who could not tell

No, there is nothing that you need to do to refresh the display. If you set the innerHTML property, it will update the element.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM