Advertisement

06.12.2008 at 04:46AM PDT, ID: 23479051
[x]
Attachment Details

Writing Javascript to a specific <td> tag.

Asked by agulaid in JavaScript, Hypertext Markup Language (HTML), Dynamic HTML (DHTML)

Tags: Javascript

I would like to write the Javascript error to id"tel" <td> tag, on the same page. How would i go about doing this?Start Free Trial
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:
<html>
<head>
<script type="text/javascript">
function validate_required(field,alerttxt)
{
with (field)
{
if (value==null||value=="")
  {document.write(alerttxt);return false;}
else {return true}
}
}function validate_form(thisform)
{
with (thisform)
{
if (validate_required(email,"Email must be filled out!", 'tel')==false)
  {email.focus();return false;}
}
}
</script>
</head><body>
<form action="submitpage.htm"
onsubmit="return validate_form(this)"
method="post">
Email: <input type="text" name="email" size="30">
<input type="submit" value="Submit"> 
</form><table width="200" border="1">
  <tr>
    <td id="tel">&nbsp;</td>
  </tr>
</table>
 
</body></html>
[+][-]06.12.2008 at 04:56AM PDT, ID: 21768381

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: JavaScript, Hypertext Markup Language (HTML), Dynamic HTML (DHTML)
Tags: Javascript
Sign Up Now!
Solution Provided By: JohnSixkiller
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628