var url = "http://jinpusa.angelfire.com/image/"; this in order to have it work correctly.
I want this code to be portable and bring to any web site without having to edit it.
Is there any alternative for not specifying the whole path?
Expand|Select|Wrap|Line Numbers
- function init_image()
- {
- // var url = "http://jinpusa.angelfire.com/image/";
- // var url = "http://mysite.verizon.net/solang/image/";
- // var url = "./";
- var url = "/image/";
- pieces[ 0]="SQUARE.JPG";
- // pieces[ 0]="NPAWN.JPG";
- pieces[ 1]="NPAWN.JPG";
- pieces[ 2]="NFPAWN.JPG";
- .
- .
- for (var i=0; i<pieces.length; i++)
- {
- pieces[i] = url + pieces[i];
- }
- }