7 Replies - 790 Views - Last Post: 15 July 2011 - 08:29 PM

#1 been_1990   User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 71
  • Joined: 20-February 10

iframe and using html as data

Posted 14 July 2011 - 03:50 PM

Is it wrong to use a html page as data? Ex:
index.html READS pages.html (<section></section> <section></section> <section></section> <section></section>)


Or should I format the embeded html page, starting with <html> tags?
Is This A Good Question/Topic? 0
  • +

Replies To: iframe and using html as data

#2 Dormilich   User is offline

  • 痛覚残留
  • member icon

Reputation: 4208
  • View blog
  • Posts: 13,283
  • Joined: 08-June 10

Re: iframe and using html as data

Posted 14 July 2011 - 03:58 PM

a HTML page always starts with <html> (or <!DOCTYPE). if you want to store data, try XML or JSON.

and yes, it is wrong to use HTML as data, because HTML is a structured document for viewing.
Was This Post Helpful? 0
  • +
  • -

#3 been_1990   User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 71
  • Joined: 20-February 10

Re: iframe and using html as data

Posted 14 July 2011 - 05:50 PM

It's not gonna be for data per se, it's gonna be formated html, I just don't want to keep it in a database.
Was This Post Helpful? 0
  • +
  • -

#4 Dormilich   User is offline

  • 痛覚残留
  • member icon

Reputation: 4208
  • View blog
  • Posts: 13,283
  • Joined: 08-June 10

Re: iframe and using html as data

Posted 15 July 2011 - 12:28 AM

if itís a valid HTML file, you can use it as such, if it only contains a chunk of HTML, then you could declare it a template or inlude file (the extension doesnít matter as long as it is not used for something different), which are basically simple text files.
Was This Post Helpful? 1
  • +
  • -

#5 Lemur   User is offline

  • Pragmatism over Dogma
  • member icon


Reputation: 1439
  • View blog
  • Posts: 3,609
  • Joined: 28-November 09

Re: iframe and using html as data

Posted 15 July 2011 - 01:24 AM

Don't try and use some pointless hack to do something that would be far better attributed to SQL or an actual DB. You're wasting time thinking about these things that you could use to better learn a real database which is far better experience in the end.

This is one of the most bizarre ways of being lazy I have ever seen.
Was This Post Helpful? -1
  • +
  • -

#6 been_1990   User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 71
  • Joined: 20-February 10

Re: iframe and using html as data

Posted 15 July 2011 - 04:31 AM

The issue is not learning a database, and this is not laziness, I'm just exploring different ways to create websites with multiple pages that do not require a database to run. This is not a pointless hack, or even a hack.
Are this rude always? Please understand, don't just read, posted questions before answering and showing your bag of ****.
Dormilich, I guess that's the confirmation I was needing, thanks.
Was This Post Helpful? -1
  • +
  • -

#7 Dormilich   User is offline

  • 痛覚残留
  • member icon

Reputation: 4208
  • View blog
  • Posts: 13,283
  • Joined: 08-June 10

Re: iframe and using html as data

Posted 15 July 2011 - 06:38 AM

nevertheless, you might check out SQLite, which is a file based DB.
Was This Post Helpful? 0
  • +
  • -

#8 Lemur   User is offline

  • Pragmatism over Dogma
  • member icon


Reputation: 1439
  • View blog
  • Posts: 3,609
  • Joined: 28-November 09

Re: iframe and using html as data

Posted 15 July 2011 - 08:29 PM

View Postbeen_1990, on 15 July 2011 - 06:31 AM, said:

The issue is not learning a database, and this is not laziness, I'm just exploring different ways to create websites with multiple pages that do not require a database to run. This is not a pointless hack, or even a hack.
Are this rude always? Please understand, don't just read, posted questions before answering and showing your bag of ****.
Dormilich, I guess that's the confirmation I was needing, thanks.


Then use a flat database text file. You're wasting your time by finding a new way of doing something in this regard. Have you ever heard of the concept of reinventing the wheel? The only issue is you're making a square.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1