View Full Version : javascript troubleshoot--SimpleswapSetup is not defined???

06-05-2007, 10:56 AM

I'm working on a website and I keep getting this error "SimpleswapSetup is not defined". I'm not really fluent in JS, so I haven't a clue what's going on.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">


<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Language" content="en, it, es, fr" />

<title>Oceano &raquo; GrobanWire.com</title><!--???-->

<meta name="keywords" content="" />

<meta name="description" content= "" />
<meta name="author" content= "Pristine Ong @ GrobanWire.com" />

<link rel="stylesheet" type="text/css" href="/layout4/css/main.css" media="screen" />
<link rel="stylesheet" type="text/css" href="/layout4/css/sifr_print.css" media="print" />
<link rel="icon" type="image/ico" href="/layout4/images/layout/favicon.ico" />

<!-- compliance patch for microsoft browsers -->
<!--[if lt IE 7]>
<script src="ie7/ie7-standard-p.js" type="text/javascript"></script>
<!--this must be BEFORE simpleswap.js-->

<script type="text/javascript" src="/layout4/js/sifr.js"></script><!--sIFR 2.0.2; Latin I embedded in swf-->
<script type="text/javascript" src="/layout4/js/simpleswap.js"></script><!-- an alternative? -->


<body onload="SimpleswapSetup()"><!--invalid???-->

The error occurs at just about this point. The function refers to an included JS file called simpleswap.js that is stored in js/simpleswap.js. Now, when the file containing above code is in the same directory as the folder js, the error doesn't occur; the error occurs when the file isn't in the same directory. What am I missing?

Thanks in advance!

06-05-2007, 04:23 PM
Is the path to the js correct? Put an alert inside the simpleswap.js file to verify that the file is loaded properly. You may need to delete the browser cache to ensure the latest file is loaded.