Someone - **please, please, please** help :-( .js problem

Someone - **please, please, please** help :-( .js problem

Post by milkywa » Tue, 18 Jan 2005 01:11:28


Hi Fred,



form.FDependSocialSecurityNumber.value,
The function "addRowToTable" is in the .js file "row_functions.js". I
thought that by referencing this file in my HTML file, that it would be
imported here and work - am I wrong?

rid of
technique.


I have paired it down to the following. I still get the error. But
here, no .js files are used and I still get the same error on:

<INPUT onClick="working();" type="button" value=" Add "
name="Add">

I don't see what is wrong .... :-(

--------- PAIRED DOWN CODE BELOW ----------------------------

!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<META http-equiv=Content-Type content="text/html;
charset=windows-1252">
</HEAD>

<SCRIPT language="JavaScript" TYPE="application/x-javascript">

function working()
{
alert("got in here");
}

</SCRIPT>


<BODY>
<FORM name=FrmX >
<TABLE width=388>
<TBODY>
<TR>
<TD width=113>
<INPUT onClick="working();" type="button" value=" Add "
name="Add">
</TD>
</TR>
</TBODY>
</TABLE>
</FORM>

<FORM name=FrmTabX action="#">
</FORM>
</BODY>
</HTML>




I have made the replacements but I don't think the processing gets that
far to access these values. I have paired the code down though - please
see above.

Kindest Regards.
 
 
 

Someone - **please, please, please** help :-( .js problem

Post by milkywa » Tue, 18 Jan 2005 01:14:39

Hi Jeff,



the

My code is currently not on a website. I am doing some tests without
one. Is there a way to use the .js files even though they are located
on your hard drive? If so, how?

Kindest Regards.

 
 
 

Someone - **please, please, please** help :-( .js problem

Post by milkywa » Tue, 18 Jan 2005 01:42:20

Hello all,

Thank you for your help :-) I think the reason for the problem has
changed. Basically, if someone can tell me how to include a .js file
that is on the hard drive, then all will be OK --- I think ...
How does one do this?

TIA
 
 
 

Someone - **please, please, please** help :-( .js problem

Post by Mick Whit » Tue, 18 Jan 2005 02:01:34


This should not present a problem at all.
Mick
 
 
 

Someone - **please, please, please** help :-( .js problem

Post by Fred O » Tue, 18 Jan 2005 07:41:02


[...]

I don't get any errors, however:


You are missing the opening "<", but I'll assume that is just an error
in copy/paste.

[...]

Language is depreciated, the correct type is:

<script type="text/javascript">


Quote attributes:

... name="FrmX">


And here:

... width="388">

et cetera

[...]

If you want no action, use:

<FORM name="FrmTabX" action="">


The only thing that might stop your code from working is the incorrect
type, but even that was tollerated by Firefox.

--
Fred
 
 
 

Someone - **please, please, please** help :-( .js problem

Post by RobG » Tue, 18 Jan 2005 07:50:49


Your original file path was:

<script language="javascript" TYPE="application/x-javascript"
src="file:///C|Documents and Settings\Desktop\BASE
PAGE\row_functions.js" >

The use of pipe "|" is illegal in a file name/path.

All paths should use forward slash "/", not backward "\".

For development, put your .js files in the same directory as your web
page or in a sub-directory and reference with a relative path.

e.g. create a sub-directory where your HTML is called "scripts", then
reference your script file as:

<script type="text/javascript"
src="scripts/row_functions.js">
</script>

--
Rob
 
 
 

Someone - **please, please, please** help :-( .js problem

Post by Stephen Po » Wed, 19 Jan 2005 03:45:38


In both those cases the quotation marks are optional.

--
Stephen Poley

http://www.yqcomputer.com/ ~sbpoley/webmatters/