I have a form that opens a modal just fun but if i try to use
<a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage
('btnSearch','','../images/search_on.png',1)"
onclick="document.frmSearch.submit()
" id="click" class="nyroModal"><img src="../images/search_off.png"
alt="Submit" name="btnSearch" width="64" height="19" border="0"
id="btnSearch" /></a>
The form doesnt open in a modal, it opens in the page. I tried a few
different manual calls based on some other issues on this site but can't
get anything to work.
Any ideas?
Thanks,
John
Try with using the <input type="image" first, it could be better. Then you could add your rollover state with jQuery using the hover function for example. Otherwise, if you prefer use your code, you could simply remove the onlick and the class attribute of your anchor. Add an id="frmSearch" to your form. Finally: $(function() { $('#click').click(function(e) { e.preventDefault(); $('#frmSearch').submit(); }); });Labels: -Type-Defect Type-Other