X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Add a css class to this javascript (https://forum.x-cart.com/showthread.php?t=57269)

mmoskva 12-28-2010 07:15 PM

Add a css class to this javascript
 
Q. What script do I need to add so this javaScript will use a css class?

Quote:


This is the .css class:
INPUT.large {
BORDER-BOTTOM: #b3b3b3 1px solid; BORDER-LEFT: #b3b3b3 1px solid; PADDING-LEFT: 2px; PADDING-TOP:2px;
BACKGROUND: url(images/custom/Ibg.gif) repeat-x left bottom; HEIGHT: 19px; WIDTH: 258px; COLOR: #000000; BORDER-TOP: #b3b3b3 1px solid; BORDER-RIGHT: #b3b3b3 1px solid;


This is the Javascript that I currently have
<script language="javascript">
{literal}

function clear_border(form_name) {
form = document.getElementById(form_name);
for(i in form.elements) {
if (form.elements[i]) {
type = form.elements[i].type;
if (type == 'text') {
form.elements[i].style.border = '1px solid #b3b3b3'; <!-- Input Boarder -->
form.elements[i].style.background = '#FFFFFF';
el = document.getElementById(form.elements[i].name+'_label');
if (el) {
el.style.fontSize = '12px';
el.style.color = '#656565';
}
}
}
}
el = document.getElementById('card_expire_border');
if (el) {
el.style.fontSize = '12px';
el.style.border = '0px solid #FFFFFF';
el.style.background = '#FFFFFF';
}
el = document.getElementById('card_expire_label');
if (el) {
el.style.fontSize = '12px';
el.style.color = '#000000';
}

el = document.getElementById('error_messages');
if (el) el.style.display = 'none';
}
{/literal}
</script>



All times are GMT -8. The time now is 11:29 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.