Jump to content

Is there a more appropriate way to make my site dynamic


craftid

Recommended Posts

Hey folks,I hope this is an appropriate place to ask this question. I've been working through the tutorials here on w3cschools, and am wondering about best practises, when it comes to adding new content without reloading the page.From what I gather, I can have a .txt file containing lots of html (sample below) and add that into my main page quite successfully.

<div class="pagecontent"><p class="subheading">Sub Heading</p><p class="stuff">Some stuff</p></div>

Everything looks correct, but I can't help feeling that having all this styled html saved as .txt files will cause me problems in the future. If I'm honest, my first concern is that using <a onclick="functionthatloadsthispage()">New Page</a> doesn't play nice with the a:link,visited,hover,active styles, but that's another post.Do any of you more experienced folks see a reason not to use .txt to store all the html?Cheers,

Link to comment
Share on other sites

Just one... what if your users don't have JavaScript available for one reason or another (most typically because they browse from a less capable mobile phone, but can also occur on some corporate proxies).

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...