i have a page called page1.htm and i would like to use the page1 name within the document itself (i mean the page1.htm) so that i don't have to write page1 everytime
i would like to use it in this line:
i have multiple pages and the .js filename is always the same as the .htm filename.
could that be replaced with +filename+ or something like that (i'm just guessing here so don't laugh:D
You could try
var file = location.pathname;
Note: This works only correct if you call the file from the server, not when you open it from the file system of Windows ('cause Windows use \ instead of /).
thanks. it works just fine:thumbsup: