Question : use javascript to submit a form

On my page I have a custom rollover button and I want to use onclick to submit a form. Here is what i have:

<a href="" class="button" onclick="enrAdSubmit()" ></a>

<script type="text/javascript">
function enrAdSubmit() {
document['enrAd'].submit();
}
</script>

but this doesn't seem to be working. Any ideas what I'm doing wrong here?

Thanks
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Product Spotlight Submission</TITLE>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>

	<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
    
<!-- CKEditor include files -->
	<script type="text/javascript" src="ckeditor/ckeditor.js"></script>
	<link href="ckeditor/_sample/sample.css" rel="stylesheet" type="text/css"/>
<!-- End CKEditor include files -->
    
<script type="text/javascript">
//function CKeditor_OnComplete() {
  //  iframes = document.getElementsByTagName("iframe");
    //if ( window.addEventListener ) // FireFox and other browsers of the type
      //  iframes[0].contentWindow.addEventListener('keypress', makePreviewBody, false);
   // else if ( window.attachEvent ) // The root of all evil (IE)
     //   iframes[0].contentWindow.document.body.attachEvent('onkeypress', makePreviewBody);
//}
</script>
    
    <!-- create title preview -->
<script type="text/javascript">
	function makePreview(divId,txtField){
	document.getElementById( divId ).innerHTML=document.enrAd[txtField].value;
	}
</script>
	<!-- end create title preview -->
    
        <!-- create body preview -->
<script type="text/javascript">
	function makePreviewBody(){
	document.getElementById('preview_body').innerHTML=CKEDITOR.instances.editor1.getData();
	}
</script>
	<!-- end create body preview -->
    
<script type="text/javascript">

</script>
    
<script type="text/javascript" charset="utf-8">
    $(document).ready(function(){
        $('#submit').hover(
            function(){ // Change the input image's source when we "roll on"
                $(this).attr({ src : 'product_images/submit_button_on.jpg'});
            },
            function(){ // Change the input image's source back to the default on "roll off"
                $(this).attr({ src : 'product_images/submit_button_off.jpg'});             }
        );
    });
</script>


<style type="text/css">
<!--
.title_overlay {
	background-image: url(product_images/title_field.jpg);
	height: 26px;
	width: 290px;
	overflow: hidden;
	z-index: 1000;
	padding-top: 4px;
	background-repeat: no-repeat;
	padding-left: 10px;
}
.title_field {
	font-size: 14px;
	font-weight: bold;
	width: 280px;
	border: none;
	background: none;
	background-image: none;
}
.body_field {
	border: none;
	background: none;
	background-image: none;
	font-size: 14px;
	font-weight: normal;
	width: 360px;
}
.body_overlay {
	background-image: url(product_images/text_field.jpg);
	background-repeat: no-repeat;
	height: 180px;
	width: 280px;
	padding-top: 10px;
	padding-right: 11px;
	padding-bottom: 10px;
	padding-left: 9px;
}
.cke_contents {
height: 150px !important;
width: 300px !important;
}
.center_n_justify {
	padding-right: 5%;
	padding-left: 5%;
	padding-top: 10px;
	padding-bottom: 15px;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 11px;
	font-weight: normal;
	color: #000000;
	text-decoration: none;
	width: 250px;
	text-align: justify;
}
.preview_title {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 11px;
	font-style: normal;
	font-weight: bold;
	color: #000000;
	text-decoration: none;
	text-align: left;
	margin: 0px;
	clear: both;
	line-height: normal;
	padding-top: 8px;
	padding-right: 0px;
	padding-bottom: 0px;
	padding-left: 0px;
}
.center_entrybox {
	padding-top: 10px;
	padding-right: 5px;
	padding-bottom: 10px;
	padding-left: 5px;
}
.preview_body {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 11px;
	font-weight: normal;
	color: #000000;
	margin: 0px;
	padding: 0px;
	clear: both;
	line-height: normal;
}
p {
	margin: 0px;
	padding: 0px;
}
a.button {
display: block;
width: 185px;
height: 30px;
padding: 0px 0px 0px 0px;
color:#666666;
text-decoration: none;
background:url(product_images/submit_button.jpg) no-repeat 0px 0px;
}
a.button:hover {
color:#333333;
background:url(product_images/submit_button.jpg) no-repeat 0px -30px;
}
-->
</style>
</head>

<body>

  <table width="595" border="1" cellspacing="0" cellpadding="0" onClick="makePreviewBody();makePreview('preview_title','title_field');">
    <tr>
      <td width="307" height="200">
      <div class="center_entrybox">
      <form id="enrAd" name="enrAd" method="post" action="email_sender.asp">
  <div class="title_overlay">
    <div>
      <label>
      <input name="title_field" type="text" class="title_field" id="title_field" onChange="makePreviewBody();makePreview('preview_title','title_field');"/>

      </label>
    </div>
  </div><br>

  <textarea class="ckeditor" cols="30" id="editor1" name="editor1" rows="10" onKeyUp="makePreviewBody();" >Enter the body text of your ad here.</textarea>
    <br>
    <br>
    <input type="image" name="submit" id="submit" src="product_images/submit_button_off.jpg">
    <a href="" class="button" onclick="enrAdSubmit()" ></a>

    <br />
  <br />
</form>      </td>
      <td width="282" valign="top"><div class="center_n_justify">
        <p><img src="product_images/line_break.jpg" width="250" height="3" /><br />
        <div class="preview_title" id="preview_title"></div>
        <div class="preview_body" id="preview_body"></div>
        <br />
          <img src="product_images/line_break.jpg" alt="" width="250" height="3" /></p>
      </div>
    </div>
      </td>
    </tr>
</table>

<script type="text/javascript">
function enrAdSubmit() {
document['enrAd'].submit();
}
</script>

</body>
</html>

Answer : use javascript to submit a form

Most Core 2 Duo processors will work, but I would start with Dell's Support Site.  They do not appear to have any compatible processors for sale on the site, but go to support.dell.com, enter your Service Tag, click link on the left for Warranty Status, then change tab to Original Configuration.  See what the part number is for the CPU that it shipped with.  Start by searching for that part number.  Post it here if you want more suggestions.
Random Solutions  
 
programming4us programming4us