| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
hi, how do i read in a text file with javascript. I want to use a text file and put var's in it. Instead of coding the script repeatedly, i want to make lots of text config files, the script reads these in and sets the variables up acording to the ones in the text file. Anyone have any examples? im just do it for multiple website redirection.
Kendals |
|
#2
|
||||
|
||||
|
to include an single javascript page into multiple others, use:
Code:
<head> <script type="text/javascript" source="/folder/file.js"></script> </head> in the <head> of any of these "multiple other" pages. This external javascript document can hold any/all variables you use. People commonly use this for form processing or popup windows that may require the use of the same script on hundreds of pages. Per the example above, anything declared in file.js would be available in any page that has the aforementioned code in it's <head>
__________________
If you found a post of mine helpful, please click on the on my post to add to my reputation.
|
|
#3
|
|||
|
|||
|
thank you
|
![]() |
| Viewing: ASP Free Forums > Programming > Code Bank > javascript redirect using external text config files |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|