So i went ahead and just put in the background color as a test, but I can't for the life of me get it to work. I don't know much javascript so that is probably why. I contacted Volusion and told them about my problem, but they said they don't provided custom coding. Which doesnt make any sense since they posted this right on their support page yet won't follow through. But if any one has any suggestions, it would be super helpful!
Thanks!
EDIT: Fixed it with this script:
<script> var appendStyle= function(css){
var code = document.createTextNode(css); var style = document.createElement('style'); style.type='text/css'; style.media='all'; style.appendChild(code); document.getElementsByTagName('head')[0].appendChild(style);
Each new line within the document.writeln would need to be escaped with a \ (back slash). For example:
<script type="text/javascript"> document.write("This text\ is written on\ multiple lines"); </script>
However, rather than creating an extra style element, you can use javascript to change css directly via the style object. In your case, you would probably want something like the following:
Alright i used your second suggestion, but i still can't seem to make it work. I put the script in the template_220.html file, if you want to take a look. Thanks!
Sorry to respond to this so late, but I would just like to suggest that scripts within the body should always be placed after any elements being affected by them. This should allow the element(s) to load first and ensure that the script won't attempt to operate on something that doesn't yet exist. (Most likely this was the problem you had with my script.)
Right before the body closing tag, </body>, (if possible) is the safest place.
I need to create specific styling for this page: http://dkurf.esxsb.servertrust.com/ProductDetails.asp?ProductCode=dfhs
I don't have access to the html for that page so i need to override the styles that are throughout the site only for that page.
This is the bit of javascript the company that hosts my ecommerce store provided (Volusion, p.s. don't ever use them they are a css nightmare!)
So i went ahead and just put in the background color as a test, but I can't for the life of me get it to work. I don't know much javascript so that is probably why. I contacted Volusion and told them about my problem, but they said they don't provided custom coding. Which doesnt make any sense since they posted this right on their support page yet won't follow through.
But if any one has any suggestions, it would be super helpful!
Thanks!
EDIT: Fixed it with this script:
However, rather than creating an extra style element, you can use javascript to change css directly via the style object. In your case, you would probably want something like the following:
Also, just be aware that the script (if unaltered) will only work if either /ProductDetails.asp, -p, or _p are in the URL's path name.
I put the script in right after the body tag, But i'm having the worst time getting it to work.
Right before the body closing tag, </body>, (if possible) is the safest place.