Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

div problem

Status
Not open for further replies.

rkoya

IS-IT--Management
Jul 12, 2004
57
GB
Hi,

I have got a table which asks the user to input the driver title, name and surname. If their input is incorrect/blank then a red X is displayed next to the field on submit However, I want to insert the error messages at the top of the section above the part where it asks them for information. I cannot get the div to work.

HTML
<table>
<tr bgcolor="#eeeeee">
<td><strong>1.</strong>
<select id="fldMainDriverTitle" name="fldMainDriverTitle" >
<option value=","></option>
<option value="Mr">Mr</option>
<option value="Mrs">Mrs</option>
<option value="Miss">Miss</option>
<option value="Ms">Ms</option>
<option value="Dr">Dr</option>
<option value="Prof">Prof</option>
<option value="Rev">Rev</option>
<option value="Sir">Sir</option>
<option value="Lady">Lady</option>
<option value="Lord">Lord</option>
</select>

<span class="price">&nbsp;*</span><span id="error_fldMainDriverTitle" class="errormessage"></span>
</td>
<td>
<input name="fldMainDriverFirstName" type="text" id="fldMainDriverFirstName" value="(MAINDRIVER_FIRSTNAME)" size="15">
<span class="price">*</span>
<span id="error_fldMainDriverFirstName" class="errormessage"></span> </td>
<td>
<input name="fldMainDriverLastName" type="text" id="fldMainDriverLastName" value="(MAINDRIVER_LASTNAME)" size="25">
<span class="price">*</span>
<span id="error_fldMainDriverLastName" class="errormessage"></span></td>
</tr>
</table>


DIV and span tags for error message:

<div id="object1" style="position:absolute; visibility:show; z-index:2">
<table width=315 border=0 cellspacing=10 cellpadding=0>
<tr>
<td><span id="error1_fldMainDriverTitle" class="price"></span><br>
<span id="error1_fldMainDriverFirstName" class="price"></span><br>
<span id="error1_fldMainDriverLastName" class="price"></span></td>
</tr>
</table>
</div>

can anyone help??

Thanks
 
thanks I have tried that but doesnt seem to work, it is just putting the text over the other text. If i try position:relative then it creates a gap which i don't want.

which display feature do you think is most appropriate.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top