![]() | |
#1
| |||
| |||
|
#2
| ||||
| ||||
|
|
I have an external javascript file named record.js in the file is the following sample: |
|
rec[0]="Blake, Agnes, 18 Sep 1909"; rec[1]="Boyes, Florence Edith, 1885"; rec[2]="Carter, Kathleen Sybil, 1910"; rec[3]="Carty, Joseph, ??"; rec[4]="Degee, Ann, ??"; I would access the script with the following SCRIPT SRC="record.js"></SCRIPT |
|
I have had spectacular success in getting none of it to work, |
|
In parting may I ask would it be better to create a table (containing the elements from the above function, if i ever get it working ) in the external file or on the html page that it is called from. |
#3
| |||
| |||
|
|
add the phrase (attribute) language="javascript" ! |
#4
| |||
| |||
|
|
language="javascript" Preferably, add type="text/javascript" The type attribute is required in HTML 4, and is sufficient in all versions. The language attribute is deprecated and should be omitted. /L You are extremely right of course! Why didn't I see that myself. Thanks. |
#5
| |||
| |||
|
|
How about the necessity of whatever type/language indication? Do you know browsers that choke on the script if the specifier is absent? I just tried in Moz en IE but they execute anyway. |
#6
| |||
| |||
|
#7
| |||
| |||
|
|
I have an external javascript file named record.js in the file is the following sample: rec[0]="Blake, Agnes, 18 Sep 1909"; rec[1]="Boyes, Florence Edith, 1885"; rec[2]="Carter, Kathleen Sybil, 1910"; rec[3]="Carty, Joseph, ??"; rec[4]="Degee, Ann, ??"; I would access the script with the following SCRIPT SRC="record.js"></SCRIPT What I have failed to do so far is print any of the files contents ( the full list is 163 names ) I think the best method would be to pass a variable to a function and have the function return the string point to by the variable something like ptr=4 |
|
the function would return a string containing "Degee, Ann, ??"; |
![]() |
| Thread Tools | |
| Display Modes | |
| |