Gnarlodious wrote:
I want to send a variable to a styleswitching script that will be a function
of where the script is in the folder structure.
The script will then assemble the stylesheet URL around the variable.
For example, the variable "../../../../" would need to be sent to the
script, how will I do this?
Here is the script:
http://www.Spectrumology.com/Styles/switcher.js
And here is how I call it:
<script type="text/javascript" src="Styles/switcher.js"></script>
Sorry I don't know a thing about Javascript!
-- Gnarlie
http://www.Gnarlodious.com/Cogent/Cogent.html
<script type="text/javascript">
window.thePath = "../../../../";
</script>
<script src="Styles/switcher.js"></script>
In switcher.js you'd have something like:
var myPath = window.thePath;
and you'd substitute myPath wherever you want your specific path.
--
| Grant Wagner <gw*****@agricoreunited.com>
* Client-side Javascript and Netscape 4 DOM Reference available at:
*
http://devedge.netscape.com/library/...ce/frames.html
* Internet Explorer DOM Reference available at:
*
http://msdn.microsoft.com/workshop/a...ence_entry.asp
* Netscape 6/7 DOM Reference available at:
*
http://www.mozilla.org/docs/dom/domref/
* Tips for upgrading JavaScript for Netscape 7 / Mozilla
*
http://www.mozilla.org/docs/web-deve...upgrade_2.html