Jump to content
xt:Commerce Community Forum

Java Script in externe .js datei packen


Chris.Cross

Recommended Posts

Hallo zusammen!

Ich würde gerne den Java Script Code, der in der headers.php drin ist, in eine externe .js datei packen, bin mir aber nicht sicher, ob ich damit vielleicht irgendwas kaputt mache. Es handelt sich dabei um folgenden Script Code:

<script language="javascript"><!--
var selected;
<?php// GV Code Start following jscript function ICW ADDED FOR CREDIT CLASS SYSTEM
?>
var submitter = null;
function submitFunction() {
submitter = 1;
}
<?php // GV Code End END OF ICW ADDED FOR ORDER_TOTAL CREDIT SYSTEM
?>
function popupWindow(url) {
window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,left=150')
}
function selectRowEffect(object, buttonSelect) {
if (!selected) {
if (document.getElementById) {
selected = document.getElementById('defaultSelected');
} else {
selected = document.all['defaultSelected'];
}
}
if (selected) selected.className = 'moduleRow';
object.className = 'moduleRowSelected';
selected = object;
// one button is not an array
var FormRadioButtons = (document.checkout_address) ? document.checkout_address.address : ((document.checkout_payment) ? document.checkout_payment.payment : document.checkout_shipping.shipping);
if (FormRadioButtons[0]) {
FormRadioButtons[buttonSelect].checked=true;
} else {
FormRadioButtons.checked=true;
}
}
function rowOverEffect(object) {
if (object.className == 'moduleRow') object.className = 'moduleRowOver';
}
function rowOutEffect(object) {
if (object.className == 'moduleRowOver') object.className = 'moduleRow';
}
function checkBox(object) {
document.account_newsletter.elements[object].checked = !document.account_newsletter.elements[object].checked;
}
function popupImageWindow(url) {
window.open(url,'popupImageWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,left=150')
}
//--></script>[/PHP]

Kann ich das ohne Gefahr machen?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
  • Create New...