How to keep Content inside Image Map Area - image

So here's what I'm working with: http://shaneboland.com/ms2/contact.html
but this is what I want: http://shaneboland.com/ms2/test.jpg
I have one div that contains my form:
<div id="wrapper">
<div id="content-pad">
<div id="mid-col-wide">
<form name="contactform" method="post" action="contact/send_form_email.php">
<table width="450px">
<tr>
<td valign="top">
<label for="first_name">Full Name *</label>
</td>
<td valign="top">
<input type="text" name="full_name" maxlength="50" size="30">
</td>
</tr>
<tr>
<td valign="top">
<label for="email">Email Address *</label>
</td>
<td valign="top">
<input type="text" name="email" maxlength="80" size="30">
</td>
</tr>
<tr>
<td valign="top">
<label for="comments">Message *</label>
</td>
<td valign="top">
<textarea name="comments" maxlength="1000" cols="25" rows="6"></textarea>
</td>
</tr>
<tr>
<td colspan="2" style="text-align:center">
<input type="submit" value="Submit">
</td>
</tr>
</table>
</form>
</div><!-- //mid-col -->
</div><!-- //content-pad -->
</div><!-- //wrapper -->
and then I have a separate div that contains an image map with multiple links:
<div align="center">
<img name="emp" src="contact/main.jpg" usemap="#ep" alt="Mammal Swag" width="940" height="801" border="0"/>
<map name="ep">
<area shape="poly" coords="20,144,176,159,183,222,42,223,20,144" href="about.html" onMouseOver="changeabout()" onMouseOut="changemain()"/>
<area shape="poly" coords="49,228,184,228,192,289,118,315,36,265,49,228" href="index.html" onMouseOver="changecontact()" onMouseOut="changemain()"/>
<area shape="poly" coords="675,639,692,607,773,607,754,713,693,712,675,639" href="http://www.facebook.com/MammalSwag" onMouseOver="changefacebook()" onMouseOut="changemain()"/>
<area shape="poly" coords="185,159,370,149,320,243,199,285,185,159" href="index.html" onMouseOver="changehome()" onMouseOut="changemain()"/>
<area shape="poly" coords="821,536,877,626,766,694,779,606,821,536" href="http://www.twitter.com/MammalSwag" onMouseOver="changetwitter()" onMouseOut="changemain()"/>
</map>
</div>
I want to make it so that my contact form div, stays positioned inside that big green space. So when the window is resized, the contact form div, is still in the same spot INSIDE of the green space.
How do I make my contact form div resize with my image map?

Related

Serenity BDD (Selenium, JUnit, Maven, IEDriver64): Checking a checkbox doesn't enable the underlying options

This is not really a Serenity question but close to Selenium.
When the test run it checks the checkbox, visible on the page and the functionality expects underlying options to be visible once the checkbox is checked.
However, the test run does check the checkbox, however, the underlying options remain invisible.
When I put a breakpoint on it and do it manually, it does work perfectly, as expected.
Also, interestingly, if the automation script checks the checkbox and I again uncheck the checkbox using the script debugger, the underlying option becomes visible with checkbox unchecked - weird, isn't it?
What could be the possible reason?
Any help would be appreciated.
Code Block:
Case.chkbxNewPolicy.click(); //Here it selects the checkbox
Case.selectEntityType.selectByVisibleText(param.get("CaseType").toString()); //Here it is expected to enable the underlying objects
Case.editNewPolicyNum.type(param.get("PolicyNo").toString());
Case.editAdviserId.type(param.get("AdviserId").toString());
//HTML
</div>
<div id="createNewContainer" G360ComponentSpec="type:AdjustableContainer;fs:f;dc:f;cl:f;ic:f;" G360LayoutSpec="l:4;lip:t;lif:f;t:28;tip:t;tif:f;r:142;riw:t;rip:t;rif:f;ra:+-;b:23;bih:t;bip:t;bif:f;ba:+-;o:auto;lbpx:4;tbpx:28;wbpx:142;hbpx:23;efwpx:0;"
style="position:absolute; left:4px; top:28px; width:142px; height:23px; overflow:auto;">
<div id="component_25" G360ComponentSpec="type:FieldComponent;dt:1;format:input;fh:CheckBox;" G360LayoutSpec="l:0;lip:t;lif:f;t:2;tip:t;tif:f;r:135;riw:t;rip:t;rif:t;ra:+-;b:20;bih:t;bip:t;bif:t;ba:+-;o:hidden;lbpx:0;tbpx:2;wbpx:135;hbpx:20;efwpx:0;"
style="position:absolute; left:0px; top:2px; width:135px; height:20px; overflow:hidden;"><span class="fielderror" id="IS_NEWPOLICYerror"></span>
<input name="IS_NEWPOLICY" id="IS_NEWPOLICY" type="checkbox" value="true" onclick="displayPolicyEntry(this)" onchange="setDirtyFlag(true,this);">Create New Policy
<input type="hidden" name="IS_NEWPOLICYoriginal" id="IS_NEWPOLICYoriginal" value="false" />
<input type="hidden" name="IS_NEWPOLICYsemaphore" id="IS_NEWPOLICYsemaphore" value="write" />
<input type="hidden" name="IS_NEWPOLICYformatter" id="IS_NEWPOLICYformatter" value="Check Box:label=Create New Policy" />
</div>
</div>
<div id="SELECT_POLICY_DETAILS" G360ComponentSpec="type:AdjustableContainer;fs:f;dc:f;cl:f;ic:f;" G360LayoutSpec="l:9;lip:t;lif:f;t:50;tip:t;tif:f;r:762;riw:t;rip:t;rif:f;ra:+-;b:62;bih:t;bip:t;bif:f;ba:+-;o:auto;lbpx:9;tbpx:50;wbpx:762;hbpx:62;efwpx:0;"
style="position:absolute; left:9px; top:50px; width:762px; height:62px; overflow:auto;">
<div id="component_18" G360ComponentSpec="type:HtmlTextComponent;" G360LayoutSpec="l:25;lip:t;lif:f;t:5;tip:t;tif:f;r:94;riw:t;rip:t;rif:t;ra:+-;b:16;bih:t;bip:t;bif:t;ba:+-;o:hidden;lbpx:25;tbpx:5;wbpx:94;hbpx:16;efwpx:0;" style="background-color:#E6E6E6; position:absolute; left:25px; top:5px; width:94px; height:16px; overflow:hidden;">
<label for="">Policy Number</label>
</div>
<div id="component_19" G360ComponentSpec="type:HtmlTextComponent;" G360LayoutSpec="l:260;lip:t;lif:f;t:5;tip:t;tif:f;r:75;riw:t;rip:t;rif:t;ra:+-;b:16;bih:t;bip:t;bif:t;ba:+-;o:hidden;lbpx:260;tbpx:5;wbpx:75;hbpx:16;efwpx:0;" style="background-color:#E6E6E6; position:absolute; left:260px; top:5px; width:75px; height:16px; overflow:hidden;">
<label for="">Adviser ID</label>
</div>
<div id="component_20" G360ComponentSpec="type:HtmlTextComponent;" G360LayoutSpec="l:350;lip:t;lif:f;t:5;tip:t;tif:f;r:90;riw:t;rip:t;rif:t;ra:+-;b:16;bih:t;bip:t;bif:t;ba:+-;o:hidden;lbpx:350;tbpx:5;wbpx:90;hbpx:16;efwpx:0;" style="background-color:#E6E6E6; position:absolute; left:350px; top:5px; width:90px; height:16px; overflow:hidden;">
<label for="">Adviser Name</label>
</div>
<div id="component_107" G360ComponentSpec="type:HtmlTextComponent;" G360LayoutSpec="l:474;lip:t;lif:f;t:5;tip:t;tif:f;r:70;riw:t;rip:t;rif:t;ra:+-;b:16;bih:t;bip:t;bif:t;ba:+-;o:hidden;lbpx:474;tbpx:5;wbpx:70;hbpx:16;efwpx:0;" style="background-color:#E6E6E6; position:absolute; left:474px; top:5px; width:70px; height:16px; overflow:hidden;">
<label for="">Partner ID</label>
</div>
<div id="component_41" G360ComponentSpec="type:HtmlTextComponent;" G360LayoutSpec="l:565;lip:t;lif:f;t:5;tip:t;tif:f;r:80;riw:t;rip:t;rif:t;ra:+-;b:16;bih:t;bip:t;bif:t;ba:+-;o:hidden;lbpx:565;tbpx:5;wbpx:80;hbpx:16;efwpx:0;" style="background-color:#E6E6E6; position:absolute; left:565px; top:5px; width:80px; height:16px; overflow:hidden;">
<label for="">MP Number</label>
</div>
<div id="component_42" G360ComponentSpec="type:HtmlTextComponent;" G360LayoutSpec="l:654;lip:t;lif:f;t:5;tip:t;tif:f;r:102;riw:t;rip:t;rif:t;ra:+-;b:16;bih:t;bip:t;bif:t;ba:+-;o:hidden;lbpx:654;tbpx:5;wbpx:102;hbpx:16;efwpx:1;" style="background-color:#E6E6E6; position:absolute; left:654px; top:5px; width:102px; height:16px; overflow:hidden;">
<label for="">Fund Member ID</label>
</div>
<div id="container_18" G360ComponentSpec="type:XmlNodeContainer;fs:f;dc:f;cl:f;ic:f;" G360LayoutSpec="l:4;lip:t;lif:f;t:22;tip:t;tif:f;r:753;riw:t;rip:t;rif:f;ra:+-;b:33;bih:t;bip:t;bif:f;ba:+-;o:auto;lbpx:4;tbpx:22;wbpx:753;hbpx:33;efwpx:0;" style="position:absolute; left:4px; top:22px; width:753px; height:33px; overflow:auto;">
</div>
</div>
<div id="NEW_POLICY_DETAILS" G360ComponentSpec="type:AdjustableContainer;fs:f;dc:f;cl:f;ic:f;" G360LayoutSpec="l:4;lip:t;lif:f;t:53;tip:t;tif:f;r:732;riw:t;rip:t;rif:f;ra:+-;b:59;bih:t;bip:t;bif:f;ba:+-;o:auto;lbpx:4;tbpx:53;wbpx:732;hbpx:59;efwpx:35;"
style="position:absolute; left:4px; top:53px; width:732px; height:59px; overflow:auto;">
<div id="component_51" G360ComponentSpec="type:FieldNameComponent;" G360LayoutSpec="l:2;lip:t;lif:t;t:9;tip:t;tif:t;r:72;riw:t;rip:t;rif:t;ra:+-;b:16;bih:t;bip:t;bif:t;ba:+-;o:hidden;lbpx:2;tbpx:9;wbpx:72;hbpx:16;efwpx:46;" style="padding:1px; position:absolute; left:2px; top:9px; width:72px; height:16px; overflow:hidden;">
<label for="ENTITY_TYPE" style="margin-left:1px;margin-right:1px;">Entity Type</label>
</div>
<div id="component_23" G360ComponentSpec="type:FieldNameComponent;" G360LayoutSpec="l:122;lip:t;lif:t;t:9;tip:t;tif:t;r:93;riw:t;rip:t;rif:t;ra:+-;b:16;bih:t;bip:t;bif:t;ba:+-;o:hidden;lbpx:122;tbpx:9;wbpx:93;hbpx:16;efwpx:109;" style="padding:1px; position:absolute; left:122px; top:9px; width:93px; height:16px; overflow:hidden;">
<label for="POLICY_NUM" style="margin-left:1px;margin-right:1px;">Policy Number</label>
</div>
<div id="component_21" G360ComponentSpec="type:FieldNameComponent;" G360LayoutSpec="l:327;lip:t;lif:t;t:9;tip:t;tif:t;r:68;riw:t;rip:t;rif:t;ra:+-;b:16;bih:t;bip:t;bif:t;ba:+-;o:hidden;lbpx:327;tbpx:9;wbpx:68;hbpx:16;efwpx:24;" style="padding:1px; position:absolute; left:327px; top:9px; width:68px; height:16px; overflow:hidden;">
<label for="ADVISER_ID" style="margin-left:1px;margin-right:1px;">Adviser ID</label>
</div>
<div id="component_101" G360ComponentSpec="type:FieldNameComponent;" G360LayoutSpec="l:424;lip:t;lif:f;t:9;tip:t;tif:f;r:68;riw:t;rip:t;rif:t;ra:+-;b:17;bih:t;bip:t;bif:t;ba:+-;o:hidden;lbpx:424;tbpx:9;wbpx:68;hbpx:17;efwpx:116;" style="padding:1px; position:absolute; left:424px; top:9px; width:68px; height:17px; overflow:hidden;">
<label for="PARTNER_ID" style="margin-left:1px;margin-right:1px;">Partner ID</label>
</div>
<div id="component_53" G360ComponentSpec="type:FieldNameComponent;" G360LayoutSpec="l:426;lip:t;lif:t;t:9;tip:t;tif:t;r:173;riw:t;rip:t;rif:t;ra:+-;b:16;bih:t;bip:t;bif:t;ba:+-;o:hidden;lbpx:426;tbpx:9;wbpx:173;hbpx:16;efwpx:9;" style="padding:1px; position:absolute; left:426px; top:9px; width:173px; height:16px; overflow:hidden;">
<label for="FUND_ID" style="margin-left:1px;margin-right:1px;">MP Number</label>
</div>
<div id="component_55" G360ComponentSpec="type:FieldNameComponent;" G360LayoutSpec="l:618;lip:t;lif:t;t:9;tip:t;tif:t;r:102;riw:t;rip:t;rif:t;ra:+-;b:16;bih:t;bip:t;bif:t;ba:+-;o:hidden;lbpx:618;tbpx:9;wbpx:102;hbpx:16;efwpx:11;" style="padding:1px; position:absolute; left:618px; top:9px; width:102px; height:16px; overflow:hidden;">
<label for="FUND_MEMBER_ID" style="margin-left:1px;margin-right:1px;">Fund Member ID</label>
</div>
<div id="component_102" G360ComponentSpec="type:FieldComponent;dt:4;format:input;fh:none;" G360LayoutSpec="l:426;lip:t;lif:f;t:29;tip:t;tif:f;r:94;riw:t;rip:t;rif:t;ra:+-;b:22;bih:t;bip:t;bif:t;ba:+-;o:hidden;lbpx:426;tbpx:29;wbpx:94;hbpx:22;efwpx:88;"
style="position:absolute; left:426px; top:29px; width:94px; height:22px; overflow:hidden;">
<table width="100%" cellspacing="0px" cellpadding="0px">
<colgroup>
<col width="*" />
<col width="18px" />
</colgroup>
<tr>
<td>
<input type="text" value="" name="PARTNER_ID" id="PARTNER_ID" style="width:70px;height:15px;" onchange="TextValidate(this,null,128,null);" />
<input type="hidden" name="PARTNER_IDsemaphore" id="PARTNER_IDsemaphore" value="write" />
<input type="hidden" name="PARTNER_IDformatter" id="PARTNER_IDformatter" value="none" />
</td>
<td>
<div class="anchorNoLink" style="width:18px;position:relative;top:1px;">
<a id="PARTNER_IDerrora" href="javascript:alert('');" style="display:none;">
<img id="PARTNER_IDerrorimg" src="Images/fielderror.gif" alt="" title="" />
</a>
</div>
</td>
</tr>
</table>
</div>
<div id="component_52" G360ComponentSpec="type:FieldComponent;dt:4;format:input;fh:none;" G360LayoutSpec="l:3;lip:t;lif:t;t:30;tip:t;tif:t;r:117;riw:t;rip:t;rif:t;ra:+-;b:22;bih:t;bip:t;bif:t;ba:+-;o:hidden;lbpx:3;tbpx:30;wbpx:117;hbpx:22;efwpx:0;" style="position:absolute; left:3px; top:30px; width:117px; height:22px; overflow:hidden;">
<table width="100%" cellspacing="0px" cellpadding="0px">
<colgroup>
<col width="*" />
<col width="18px" />
</colgroup>
<tr>
<td>
<select name="ENTITY_TYPE" id="ENTITY_TYPE" style="width:99px;" tabindex="1" onchange="setDirtyFlag(true,this);policyTypeSelected();">
<option selected value="NA">--Please Select --</option>
<option value="C">Retail Life Insured</option>
<option value="M">Group Life Insured</option>
<option value="A">Adviser</option>
<option value="F">Fund</option>
<option value="P">Partner</option>
<option value="S">Special Member</option>
<option value="U">Function</option>
</select>
<input type="hidden" name="ENTITY_TYPEoriginal" id="ENTITY_TYPEoriginal" value="TkE*" />
<input type="hidden" name="ENTITY_TYPEsemaphore" id="ENTITY_TYPEsemaphore" value="write" />
<input type="hidden" name="ENTITY_TYPEformatter" id="ENTITY_TYPEformatter" value="none" />
</td>
<td>
<div class="anchorNoLink" style="width:18px;position:relative;top:1px;">
<a id="ENTITY_TYPEerrora" href="javascript:alert('');" style="display:none;">
<img id="ENTITY_TYPEerrorimg" src="Images/fielderror.gif" alt="" title="" />
</a>
</div>
</td>
</tr>
</table>
</div>
<div id="component_24" G360ComponentSpec="type:FieldComponent;dt:4;format:input;fh:none;" G360LayoutSpec="l:124;lip:t;lif:t;t:30;tip:t;tif:t;r:200;riw:t;rip:t;rif:t;ra:+-;b:22;bih:t;bip:t;bif:t;ba:+-;o:hidden;lbpx:124;tbpx:30;wbpx:200;hbpx:22;efwpx:0;"
style="position:absolute; left:124px; top:30px; width:200px; height:22px; overflow:hidden;">
<table width="100%" cellspacing="0px" cellpadding="0px">
<colgroup>
<col width="*" />
<col width="18px" />
</colgroup>
<tr>
<td>
<input type="text" value="" name="POLICY_NUM" id="POLICY_NUM" style="width:176px;height:15px;" tabindex="2" maxlength="30" onchange="TextValidate(this,null,30,null);" />
<input type="hidden" name="POLICY_NUMsemaphore" id="POLICY_NUMsemaphore" value="write" />
<input type="hidden" name="POLICY_NUMformatter" id="POLICY_NUMformatter" value="none" />
</td>
<td>
<div class="anchorNoLink" style="width:18px;position:relative;top:1px;">
<a id="POLICY_NUMerrora" href="javascript:alert('');" style="display:none;">
<img id="POLICY_NUMerrorimg" src="Images/fielderror.gif" alt="" title="" />
</a>
</div>
</td>
</tr>
</table>
</div>
<div id="component_22" G360ComponentSpec="type:FieldComponent;dt:4;format:input;fh:none;" G360LayoutSpec="l:329;lip:t;lif:t;t:30;tip:t;tif:t;r:90;riw:t;rip:t;rif:t;ra:+-;b:22;bih:t;bip:t;bif:t;ba:+-;o:hidden;lbpx:329;tbpx:30;wbpx:90;hbpx:22;efwpx:0;"
style="position:absolute; left:329px; top:30px; width:90px; height:22px; overflow:hidden;">
<table width="100%" cellspacing="0px" cellpadding="0px">
<colgroup>
<col width="*" />
<col width="18px" />
</colgroup>
<tr>
<td>
<input type="text" value="" name="ADVISER_ID" id="ADVISER_ID" style="width:66px;height:15px;" tabindex="3" maxlength="9" onchange="TextValidate(this,null,9,null);" />
<input type="hidden" name="ADVISER_IDsemaphore" id="ADVISER_IDsemaphore" value="write" />
<input type="hidden" name="ADVISER_IDformatter" id="ADVISER_IDformatter" value="none" />
</td>
<td>
<div class="anchorNoLink" style="width:18px;position:relative;top:1px;">
<a id="ADVISER_IDerrora" href="javascript:alert('');" style="display:none;">
<img id="ADVISER_IDerrorimg" src="Images/fielderror.gif" alt="" title="" />
</a>
</div>
</td>
</tr>
</table>
</div>
<div id="component_54" G360ComponentSpec="type:FieldComponent;dt:4;format:input;fh:none;" G360LayoutSpec="l:428;lip:t;lif:t;t:30;tip:t;tif:t;r:180;riw:t;rip:t;rif:t;ra:+-;b:22;bih:t;bip:t;bif:t;ba:+-;o:hidden;lbpx:428;tbpx:30;wbpx:180;hbpx:22;efwpx:0;"
style="position:absolute; left:428px; top:30px; width:180px; height:22px; overflow:hidden;">
<table width="100%" cellspacing="0px" cellpadding="0px">
<colgroup>
<col width="*" />
<col width="18px" />
</colgroup>
<tr>
<td>
<input type="text" value="" name="FUND_ID" id="FUND_ID" style="width:156px;height:15px;" tabindex="4" maxlength="8" onchange="TextValidate(this,null,8,null);" />
<input type="hidden" name="FUND_IDsemaphore" id="FUND_IDsemaphore" value="write" />
<input type="hidden" name="FUND_IDformatter" id="FUND_IDformatter" value="none" />
</td>
<td>
<div class="anchorNoLink" style="width:18px;position:relative;top:1px;">
<a id="FUND_IDerrora" href="javascript:alert('');" style="display:none;">
<img id="FUND_IDerrorimg" src="Images/fielderror.gif" alt="" title="" />
</a>
</div>
</td>
</tr>
</table>
</div>
<div id="component_56" G360ComponentSpec="type:FieldComponent;dt:4;format:input;fh:none;" G360LayoutSpec="l:617;lip:t;lif:t;t:30;tip:t;tif:t;r:114;riw:t;rip:t;rif:t;ra:+-;b:22;bih:t;bip:t;bif:t;ba:+-;o:hidden;lbpx:617;tbpx:30;wbpx:114;hbpx:22;efwpx:0;"
style="position:absolute; left:617px; top:30px; width:114px; height:22px; overflow:hidden;">
<table width="100%" cellspacing="0px" cellpadding="0px">
<colgroup>
<col width="*" />
<col width="18px" />
</colgroup>
<tr>
<td>
<input type="text" value="" name="FUND_MEMBER_ID" id="FUND_MEMBER_ID" style="width:90px;height:15px;" tabindex="5" maxlength="60" onchange="TextValidate(this,null,60,null);" />
<input type="hidden" name="FUND_MEMBER_IDsemaphore" id="FUND_MEMBER_IDsemaphore" value="write" />
<input type="hidden" name="FUND_MEMBER_IDformatter" id="FUND_MEMBER_IDformatter" value="none" />
</td>
<td>
<div class="anchorNoLink" style="width:18px;position:relative;top:1px;">
<a id="FUND_MEMBER_IDerrora" href="javascript:alert('');" style="display:none;">
<img id="FUND_MEMBER_IDerrorimg" src="Images/fielderror.gif" alt="" title="" />
</a>
</div>
</td>
</tr>
</table>
</div>
</div>
Two possible reason, either there are javascript errors while rendering the underlying options which can be viewed on jconsole, or you are not waiting for the underlying options to appear.

jquery Validate Plugin Hide Error Message

I have a basic table with radio buttons. I have an onclick even in the "td" that checks the radio when the "td" is clicked. The error message does not hide when the "td" is clicked. It only hides when the actual button is clicked. Here's my code. Any ideas? I have the jquery files stored locally.
<html>
<head>
<script src="jquery-latest.js"></script>
<script type="text/javascript" src="jquery.validate.js"></script>
<script>
$(document).ready(function(){
$("#myform").validate({
errorPlacement: function(error, element) {
error.appendTo(element.parent("td").prev("td") );
},
debug:true
})
});
</script>
</head>
<body>
<form id="myform" action="/login" method="post">
<table border="1">
<tr>
<td width="30%">Attribute 1<br /></td>
<td width="10%" onclick="$(this).find('input:radio').attr('checked','checked');" /><INPUT type="radio" id="22121GRID" name="SPGRID_1" value="5" class="required" /></td>
<td width="10%" onclick="$(this).find('input:radio').attr('checked','checked');" /><INPUT type="radio" id="22121GRID" name="SPGRID_1" value="4" class="required" /></td>
<td width="10%" onclick="$(this).find('input:radio').attr('checked','checked');" /><INPUT type="radio" id="22121GRID" name="SPGRID_1" value="3" class="required" /></td>
<td width="10%" onclick="$(this).find('input:radio').attr('checked','checked');" /><INPUT type="radio" id="22121GRID" name="SPGRID_1" value="2" class="required" /></td>
<td width="10%" onclick="$(this).find('input:radio').attr('checked','checked');" /><INPUT type="radio" id="22121GRID" name="SPGRID_1" value="1" class="required" /></td>
</tr>
<tr><td><input type="submit" value="Submit" /></td></tr>
</table>
</form>
</body>
</html>
Since you changing the checked through javascript, call .valid() method of validator.
You can use the following
<td width="10%" onclick="$(this).find('input:radio').attr('checked','checked').valid();" /> <INPUT type="radio" id="22121GRID" name="SPGRID_1" value="5" class="required" /> </td>
or
$('td').click(function(){
$(this).find('radio').attr('checked','checked').valid();
});

Dummy image when the datalist column is empty

Am using a datalist to show the product details. In this time i want to show the image, but it displayed when the image filed having the image path, otherwise it's empty. I want to show the dummy image when the field is empty..
Here is my code:
<asp:DataList ID="DataList1" CaptionAlign="Right" runat="server" Width="100%" Visible="true" >
<ItemTemplate>
<table width="100%" border="0" cellspacing="5" cellpadding="0">
<tr>
<td width="2%">
</td>
<td>
<div class="Curved_box">
<div class="curved_Top">
<div class="curved_TopLft">
</div>
<div class="curved_TopRft">
</div>
</div>
<div class="CurvedContent">
<a href="#">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td style="width: 14px; height: 65px;">
</td>
<td style="width: 113px; height: 65px;">
<asp:Image ID="Image1" Style="border: solid 1px #eaeaea; background: " runat="server"
Height="60px" Width="60px" ImageUrl='<%#Bind("fldpic") %>' />
</td>
<td width="80%" align="right" style="height: 65px">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="2" style="height: 20px" align="left">
<asp:Label ID="lbl_name" runat="server" Font-Bold="true" Text='<%#Bind("name") %>'></asp:Label>
</td>
</tr>
<tr>
<td style="width: 247px; height: 20px;" align="left">
<asp:Label ID="lblProd_Keywd" runat="server" Text='<%# Bind("Desig") %>' Font-Bold="True"></asp:Label>
</td>
<td align="left" style="height: 20px">
<asp:Label ID="lblProd_Code" runat="server" Text='<%# Bind("fldempid") %>'
Font-Bold="True"></asp:Label>
</td>
</tr>
<tr>
</tr>
</table>
</td>
</tr>
</table>
</a>
</div>
<div class="curved_Btm">
<div class="curved_BtmLft">
</div>
<div class="curved_BtmRft">
</div>
</div>
</div>
</td>
<td width="2%">
</td>
</tr>
</table>
</ItemTemplate>
<FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<HeaderStyle BackColor="#507CD1" Font-Bold="True" HorizontalAlign="Left" ForeColor="White" />
</asp:DataList>
add onerror attribute on <asp:Image> tag like onerror="this.src = 'url of dummy image'"
change this mark up
<asp:Image ID="Image1" Style="border: solid 1px #eaeaea; background: "
runat="server" Height="60px" Width="60px" ImageUrl='<%#Bind("fldpic") %>' />
to
<asp:Image ID="Image1" Style="border: solid 1px #eaeaea; background: "
runat="server" Height="60px" Width="60px" ImageUrl='<%#Bind("fldpic") %>'
onerror="this.src = 'url of dummy image'" />

Images in an email is not displaying in IE

I have created an HTML email for a client, who then asked me to post it to their server for viewing on the web. It is a basic table layout with images and some links.
Everything appears to work in all major email clients, as well as Chrome, Safari, and Firefox. However, All versions of IE simply do not display the images. You can see the site here.
http://poweredbyprofessionals.com/email/2012-10-MRF/
I verified that the images are RGB and not CMYK, as well as ran it through a validator. Nothing seems to fix the issue. Any ideas?
Solution
Replace width="auto" and height="auto" by the real width and height.
Demo
http://jsfiddle.net/yrVsL/1/
Code modified
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<table style="border-collapse: collapse;" align="center" border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2" align="center">
<font color="#005697" style="font-family:Arial, Helvetica, sans-serif; font-size:18px; line-height:36px;">
<strong> Join Us!! <br/></strong>
</font>
<font color="#008754" style="font-family:Arial, Helvetica, sans-serif; font-size:14px; line-height:20px;">
<strong>Wings of Hope for Melanoma</strong><br />
a fundraising gala to benefit the <br />
Melanoma Research Foundation<br /><br />
</font>
<font color="#000" style="font-family:Arial, Helvetica, sans-serif; font-size:14px; line-height:20px;">
<strong> Thursday, October 11, 2012<br/>
6:00 PM to 10:00 PM<br />
Gotham Hall <br />
1356 Broadway, New York<br /><br />
</strong>
<strong>Click here for more information, to purchase tickets or make a donation!</strong>
</font>
</td>
</tr>
<tr>
<td>
<a href="http://www.poweredbyprofessionals.com/melanoma/Purchase.html" target="_blank">
<img style="display: block;" src="http://poweredbyprofessionals.com/email/2012-10-MRF/images/Slice-1.jpg" alt="Slice-1" width="550" height="257" />
</a>
</td>
</tr>
<tr>
<td>
<img style="display: block;" src="http://poweredbyprofessionals.com/email/2012-10-MRF/images/Slice-2.jpg" alt="Slice-2" width="550" height="446" />
</td>
</tr>
<tr>
<td>
<table style="border-collapse: collapse;" align="center" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<img style="display: block;" src="http://poweredbyprofessionals.com/email/2012-10-MRF/images/Slice-4.jpg" alt="Slice-4" width="275" height="99" />
</td>
<td>
<a href="http://www.poweredbyprofessionals.com/melanoma/Purchase.html" target="_blank">
<img style="display: block;" src="http://poweredbyprofessionals.com/email/2012-10-MRF/images/Slice-3.jpg" alt="Slice-3" width="275" height="99" />
</a>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<img style="display: block;" src="http://poweredbyprofessionals.com/email/2012-10-MRF/images/Slice-5.jpg" alt="Slice-5" width="550" height="319" />
</td>
</tr>
<tr>
<td>
<img style="display: block;" src="http://poweredbyprofessionals.com/email/2012-10-MRF/images/Slice-6.jpg" alt="Slice-2" width="550" height="99" />
</td>
</tr>
<tr>
<td>
<a href="http://www.poweredbyprofessionals.com/melanoma/Purchase.html" target="_blank">
<img style="display: block;" src="http://poweredbyprofessionals.com/email/2012-10-MRF/images/Slice-7.jpg" alt="Slice-1" width="550" height="99" />
</a>
</td>
</tr>
<tr>
<td>
<table style="border-collapse: collapse;" align="center" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<a href="http://www.poweredbyprofessionals.com" target="_blank">
<img style="display: block;" src="http://poweredbyprofessionals.com/email/2012-10-MRF/images/Slice-8.jpg" alt="Slice-3" width="180" height="87" />
</a> </td>
<td>
<a href="http://www.melanoma.org" target="_blank">
<img style="display: block;" src="http://poweredbyprofessionals.com/email/2012-10-MRF/images/Slice-9.jpg" alt="Slice-3" width="180" height="87" />
</a>
</td>
<td>
<a href="http://www.stanadler.com" target="_blank">
<img style="display: block;" src="http://poweredbyprofessionals.com/email/2012-10-MRF/images/Slice-10.jpg" alt="Slice-3" width="180" height="87" />
</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>

How to make data remain after success validation?

I have jsp using struts bean tag library:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
<link rel="stylesheet" type="text/css" href="css/stylesheet.css">
</head>
<body>
<p><a class="colorGrey" href="Welcome.do">
<bean:message key="menu.label" />
</a> >><bean:message key="menu.link.addnews" /> </p>
<p><br>
</p>
<html:form action="/NewsSave">
<table width="100%" border="0">
<tr>
<td class="colorGrey" width="164" height="35">
<bean:message key="body.news.title" /> </td>
<td width="577">
<html:text property="newsTitle" size="40" value=""/> </td>
</tr>
<tr>
<td colspan="2">
<html:errors property="newstitle" />
</td>
</tr>
<tr>
<td class="colorGrey">
<bean:message key="body.news.date" /> </td>
<td>
<html:text property="newsDate" size="10" value=""/> </td>
</tr>
<tr>
<td height="21" colspan="2" valign="top">
<html:errors property="newsdate" />
</td>
</tr>
<tr>
<td class="colorGrey" height="61" valign="top">
<bean:message key="body.news.brief" /> </td>
<td valign="top">
<html:textarea property="brief" cols="40" rows="6" value=""/>
</td>
</tr>
<tr>
<td height="23" colspan="2" valign="top"><html:errors property="brief" /></td>
</tr>
<tr>
<td class="colorGrey" height="100" valign="top">
<bean:message key="body.news.content" />
</td>
<td valign="top">
<html:textarea property="content" cols="40" rows="12" value=""/>
</td>
</tr>
<tr>
<td height="23" colspan="2" valign="top">
<html:errors property="content" />
</td>
</tr>
</table>
<html:submit value="SAVE"/>
</html:form>
<form method="POST"
action="Link.do?method=newsList"
onsubmit="return confirm('<bean:message key="body.onsubmit.cancel" />')">
<input type="submit" value="CANCEL">
</form>
And I use validator plugin, which means that after receiving incorrect info it gives message bellow text field telling what's wrong. But problem is that everything disappear after submiting. So it no info in text or text-areatags. I know that it happens because of value="". But I have another page with the same fields for adding info, which should be clear from the beginning. And if I remove value="", the info from this fields will be displayed on that page after forwarding. So
What should I do to clear info from forms after forwarding to
another page?
How to make info remain after success validation?
As you mentioned, you should remove value="" as this is setting the fields to empty. If you want to clear the values then you should do this in the Action class in which your Form bean is populated.
If you are finding that your Form beans are retaining their values between requests then check that they are request scope: the scope attribute of the action element should be "request" in struts.config

Resources