473,387 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

javascript troubleshoot--SimpleswapSetup is not defined???

Hi,

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.

Here's some code:
Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
  3.  
  4. <head>
  5.  
  6.     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  7.     <title>
  8.         Biography &raquo; GrobanWire.com    </title><!--???-->
  9.     <meta name="Keywords" content="" />
  10.     <meta name="Description" content= "" /> 
  11.  
  12.     <link rel="stylesheet" type="text/css" href="/layout4/css/main.css" media="screen" />
  13.     <link rel="stylesheet" type="text/css" href="/layout4/css/sifr_print.css" media="print" />
  14.  
  15.     <link rel="icon" type="image/ico" href="/layout4/images/layout/favicon_6.ico" />
  16.  
  17.     <!-- compliance patch for microsoft browsers -->
  18.     <!--[if lt IE 7]>
  19.         <script src="ie7/ie7-standard-p.js" type="text/javascript"></script>
  20.     <![endif]-->
  21.     <!--this must be BEFORE simpleswap.js-->
  22.     <script type="text/javascript" src="/layout4/js/sifr.js"></script><!--sIFR 2.0.2; Latin I embedded in swf-->
  23.     <script type="text/javascript" src="/layout4/js/simpleswap.js"></script>
  24.  
  25. </head>
  26.  
  27. <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!
May 31 '07 #1
3 1503
acoder
16,027 Expert Mod 8TB
You need to change the src attribute when including simpleswap.js.

If it's not in the same directory, make sure the url points to the correct place.
May 31 '07 #2
You need to change the src attribute when including simpleswap.js.

If it's not in the same directory, make sure the url points to the correct place.
Hey acode,

Thanks for your reply. I checked the src attribute, and it is indeed correct. It's an absolute link too, so I don't really know what's goin' on. Also, although the error occurs, the JS does what it's supposed to do (ie. swap images on mouse over). So...what do you think?

Thanks!
Jun 5 '07 #3
acoder
16,027 Expert Mod 8TB
Hey acode,

Thanks for your reply. I checked the src attribute, and it is indeed correct. It's an absolute link too, so I don't really know what's goin' on. Also, although the error occurs, the JS does what it's supposed to do (ie. swap images on mouse over). So...what do you think?

Thanks!
So, for example, the file would be in a lower directory or what?
Jun 6 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Corey | last post by:
I recently received a Javascript error, "'WebForm_PostBackOptions' is undefined" from an application I'm working on. It occurs during the PostBack from a DropDownList. I've created a project...
6
by: x muzuo | last post by:
Hi guys, I have got a prob of javascript form validation which just doesnt work with my ASP code. Can any one help me out please. Here is the code: ...
10
by: Bishoy George | last post by:
// I wrote the following code but it is not working. // Any help please? // ------------------------------------------------ using System; using System.Collections; using System.ComponentModel;...
3
by: Angus Comber | last post by:
Hello Can javascript call/reference COM object. VBScript can do this (as it is from Microsoft). Can javascript? If so how? Angus
7
by: Wm.M.Thompson | last post by:
For a computer programmer JavaScript is not difficult. It is pretty easy to look at some code for the first time and figure out what is going on. This is especially true if you have gratuated...
5
by: Priya | last post by:
Hey all, I have some values in the database which has to retrieved and then passed on to some functions in the javascript. The javascript file is a separate file. I have included it in the aspx...
3
by: marcofabian | last post by:
Hi: I've ben looking for a long time for an answer to mi problem. The thing is that I'm uin httprequest object to load files inside div tags. It works ok. My problem is that any javascript code...
5
by: makthar | last post by:
Hi I need to call a javascript function defined in a html file from a javascript function defined in an external javascript file(.js). Can anyone suggest me how do i do/acheive this...
4
by: sjkothenbeutel | last post by:
I've been reading through quite a bit regarding this topic but am finding myself confused. Here is the scenario: I have a javascript class defined with methods whereas each has references to...
2
bilibytes
by: bilibytes | last post by:
hi, i am getting an error with this script: "oCk is not defined onclick(click clientX=0, clientY=0)" //widget functions //1. //when the mouse is over a star, we want to change all...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.