Can someone explain what this is and how it works.Code:<script language="javascript" type="text/javascript"> function root_path() {return('../../');} </script>
Thanks,
Bud
Can someone explain what this is and how it works.Code:<script language="javascript" type="text/javascript"> function root_path() {return('../../');} </script>
Thanks,
Bud
Thanks,
Bud
All this function does is return a string.
For example:
Would alert: ../../styles/images.Code:alert(root_path()+"styles/images");
This should really be kept in a variable like so:
And then you would have to go around changing all the places that it uses it as a function.Code:var root_path = "../../";
The function was probably made so that the programmer could access the root path (the root directory) faster without having to type ../../ everytime.
Jeremy | jfein.net
Is is a different way of using base href?
Code:<head> <base href="http://www.w3schools.com/images/" target="_blank" /> </head>
Thanks,
Bud
I don't think there is.
Bookmarks