I never had this kind of issue before and it is completely surprising. I have a usercontrol where I need 2 forms to make 1 form. When I have only 1 form it submits the page to itself. I have spent hours on this and couldn't find the solutions, thats why I have to come with a hack. I have two forms, I made the first form invisible and let the second form visible.This form is for google custom search engine. I also tried with other test forms, but still I need to have 2 forms to make 1 form work in this user control. Name of the user control is header.ascx (in case the name got anything to do with this weird issue).
But this kind of issue doesn't happen in another user control where I have different form and it works normally. Anyone had this kind of issue before??
Code:
<span style="visibility:hidden;position:absolute;left:0px;">
<form id="cse-search-box" action="search.aspx" onsubmit="return validateSearch();" visible="false">
<div class="searchSpan">
<input name="cx" type="hidden" value="002116985177671925771:cz5fh8mpenw" />
<input name="cof" type="hidden" value="FORID:11" />
<input name="ie" type="hidden" value="UTF-8" />
<input id="q" name="q" size="22" value="test"/>
<input name="sa" id="searchSubmit" type="submit" value="Search" />
<script src="http://www.google.com/jsapi" type="text/javascript"></script>
<script type="text/javascript">google.load("elements", "1", {packages: "transliteration"});</script>
<script src="http://www.google.com/coop/cse/t13n?form=cse-search-box&t13n_langs=en" type="text/javascript"></script>
<script src="http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en" type="text/javascript"></script>
</div>
</form></span>
<form id="cse-search-box" action="search.aspx" onsubmit="return validateSearch();">
<div class="searchSpan">
<input name="cx" type="hidden" value="002116985177671925771:cz5fh8mpenw" />
<input name="cof" type="hidden" value="FORID:11" />
<input name="ie" type="hidden" value="UTF-8" />
<input id="Text1" name="q" size="22"/>
<input name="sa" id="Submit1" type="submit" value="Search" />
<script src="http://www.google.com/jsapi" type="text/javascript"></script>
<script type="text/javascript">google.load("elements", "1", { packages: "transliteration" });</script>
<script src="http://www.google.com/coop/cse/t13n?form=cse-search-box&t13n_langs=en" type="text/javascript"></script>
<script src="http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en" type="text/javascript"></script>
</div>
</form>
Comment