>bryant, sorry if I came across like I was being disrespectful or something.
No you werent. I was confused.(as usual)
I am a below novice programmer that has been subjected to a project right in the middle. I am expected to pretty much take off where the project was left off. But unfortunatley I know nothing about asp or interdev. Without your guys' help I would be stuck. I appreciate all the assistance you can give me. (I know you have to dummy it up for me). Hopefully I will get up to speed soon and wont have to ask so many dumb questions.
Anyway you are right the submit is not being executed in the image onclick event handler. the image name is being passed fine becuase I can output it in an alert within the handler. But I have put an alert after the submit and it does not execute so I don't think the submit is working.
But the reason it is not working is because of some other factor. I put the code into a simple asp page like this:
<%@ Language=VBScript %>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<script language="javascript">
function img_onclick(me) {
document.all("fldImgClicked"

.value = me;
alert (me);
document.sw.submit();
alert (me);
}
</script>
</HEAD>
<BODY>
<form name=sw>
<input type=hidden name=fldImgClicked value="">
<%
dim imgclicked
imgclicked = Request("fldImgClicked"

Response.Write "<h2>" & imgclicked & " not</h2>"
%>
<img src="../images/menu-main-off.gif" width=44 height=25 name="main" alt="Main" border="0" onclick="img_onclick(this.name)">
</body>
</form>
</HTML>
This works fine but when I put it into the page where it is supposed to work it will not work and I think it has something to do with scripting object model being enabled. I dont know much but It looks to me like its creating its own form.
It doesnt work on this page
<%@ Language=VBScript %>
<% Option Explicit
Response.Buffer=True
%>
<script id="DebugDirectives" runat="server" language="javascript">
// Set these to true to enable debugging or tracing
@set @debug=false
@set @trace=false
</script>
<% ' VI 6.0 Scripting Object Model Enabled %>
<!--#include file="../_ScriptLibrary/pm.asp"-->
<% if StartPageProcessing() Then Response.End() %>
<FORM name=thisForm METHOD=post>
<html>
<head>
<title></title>
<meta name="VI60_defaultClientScript" content=JavaScript>
<meta NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<link rel="stylesheet" type="text/css" href="../FormFormats.css">
<script language="javascript">
function img_onclick(me) {
document.all("fldImgClicked"

.value = me;
alert (me);
document.sw.submit();
alert (me);
}
</script>
</head>
<body >
<form name=sw>
<input type=hidden name=fldImgClicked value="">
<%
dim imgclicked
imgclicked = Request("fldImgClicked"

Response.Write "<h2>" & imgclicked & " not</h2>"
%>
<img
src="../images/menu-main-off.gif"
width=44 height=25
name="main"
alt="Main" border="0" onclick="img_onclick(this.name)">
</form>
</body>
<% ' VI 6.0 Scripting Object Model Enabled %>
<% EndPageProcessing() %>
</FORM>
I assume I need all of this extra stuff in here because the programmer before me has it in here. But hopefully you guys will know whats up
</html>