SO fiddle

Test Fiddle mainly for SO Questions

by Nick Craver

HTML

<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.4/themes/overcast/jquery-ui.css">
<form action="telecallerinfo.php?action=modify&id=<1" method="post" enctype="multipart/form-data" name="myform" 
onsubmit="return validate_form ( );">
    <table class="panel1">
        <tr>
            <td align="center">Caller Name:&nbsp;
                <input name="tele_caller" type="text" size="15" value="" /></td>
        </tr>
        <tr>
            <td align="right">
                <input name="submit" id="submit" type="image" src="images/submit.gif" width="60"/>
                <a href="telecallerinfo.php"><img src="images/cancel.gif" height="25" width="70"/></a>
            </td>
        </tr>
    </table>
</form>

JavaScript

function validate_form() {


    if (document.myform.tele_caller.value == "") {
        alert("Please insert the Name");
        return false;
    }
    else {
        return true;
    }
}