faqts : Computers : Programming : Languages : JavaScript : Database

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

5 of 12 people (42%) answered Yes
Recently 3 of 10 people (30%) answered Yes

Entry

JavaScript: How to insert data separately in JavaScript? [include/SCRIPT/SRC/database/external]

Sep 12th, 2004 05:50
Knud van Eeden,


----------------------------------------------------------------------
--- Knud van Eeden --- 11 September 2004 - 10:15 pm ------------------

JavaScript: How to insert data separately in JavaScript? 
[include/SCRIPT/SRC/database/external]

---

To separate data from the program itself:

Use e.g. the 'SRC' statement to include your data (e.g. for your
arrays).

<SCRIPT
  LANGUAGE="JavaScript"
  SRC="yourdatasourcefilename.yourextension"
>
</SCRIPT>

The advantage is that you can adapt (=insert, delete, change, ...)
your data external from your main program.

---
---

e.g.

---

<SCRIPT
  SRC="yourdata1.txt"
>
</SCRIPT>
<SCRIPT

---

do something with this data 1

---

<SCRIPT
  SRC="yourdata2.txt"
>
</SCRIPT>

---

do something with this data 2

---

...

---
---

Internet: see also:

---

JavaScript: Database: Overview: Can you give an overview of links?
http://www.faqts.com/knowledge_base/view.phtml/aid/31360/fid/53

----------------------------------------------------------------------