PDA

View Full Version : [SOLVED]form strangeness in IE


NancyJ
09-07-2005, 01:18 PM
I have a seach box on my site and if you fill the form in and press the submit button it works fine. However if you press return it loads the index.asp page in ie, but not in FF.

I cant post a link because its on our internal dev server but this is the page html (form highlighted in red) and I know if probably has about 100 validation errors, I didnt do that part ;)

<!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>
<link rel="shortcut icon" HREF="/favicon.ico">
<title>Wigan Warriors - The Official Website</title>

<meta name="KEYWORDS" content="Wigan Warriors, Wigan, Warriors, Maurice Lindsay, Ian Millward, JJB Stadium, Andrew Farrell, Kris Radlinski, Rugby League, Sport, Ancient and Loyal, Super League, Sean O’Loughlin, Dave Whelan, Cherry and White">
<meta name="DESCRIPTION" content="Everything you ever wanted to know about Wigan Warriors Rugby League Football Club on the Official Website. Updated daily with the latest news, match reports, player profiles, photos, fun stuff, and interactive features. Buy tickets, merchandise and place a bet.">
<meta name="TITLE" content="Wigan Warriors - The Official Website">
<meta name="copyright" content="Copyright © 2005 Wigan Warriors RFL. All Rights Reserved">
<meta name="author" content="Simon Collinson">
<meta name="publisher" content="www.wiganwarriors.com">
<meta http-equiv="CONTENT-LANGUAGE" content="EN">
<meta name="robots" content="all">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="reply-to" content="info@wiganwarriors.com">
<meta http-equiv="pragma" content="no-cache">

<link rel="stylesheet" href="css/css1.css" media="screen" type="text/css">
<link rel="stylesheet" href="/store/css/store.css" media="screen" type="text/css">

<link rel="stylesheet" type="text/css" href="css/transmenu.css">
<link HREF="css/templateStyles.css" REL="STYLESHEET" TYPE="text/css">


<script LANGUAGE="javascript" SRC="/js/transmenuC.js"></script>
<script LANGUAGE="javascript" SRC="/js/_dropdown_initialize.js"></script>

<script language="Javascript">
<!--//
function expandWindow(website) {

var windowprops='width=100,height=100,scrollbars=yes,status=no,resizable=no,'
var heightspeed = 10; // vertical scrolling speed (higher = slower)
var widthspeed = 10; // horizontal scrolling speed (higher = slower)
var winwidth = 400; //change this to set window width
var winheight = 400; //change this to set window height
var leftdist = (screen.width/3)-(winwidth/3)-5; // distance to left edge of window
var topdist = (screen.height/2)-(winheight/2); // distance to top edge of window

if (window.resizeTo&&navigator.userAgent.indexOf("Opera")==-1)
{
var sizer = window.open("../buffer.htm","","left=" + leftdist + ",top=" + topdist +","+ windowprops);
for (sizeheight = 1; sizeheight < winheight; sizeheight += heightspeed)
sizer.resizeTo("1", sizeheight);
for (sizewidth = 1; sizewidth < winwidth; sizewidth += widthspeed)
sizer.resizeTo(sizewidth, sizeheight);
sizer.location = website;}
else
window.open(website,'mywindow');
}

function expandingWindow(website) {
for ( n = 0; n < document.frmPoll.PollVote.length; n++ )
{

// Isolate the n'th radio button
el = document.frmPoll.PollVote[n];

if (el.checked){
var radiochk = document.frmPoll.PollVote[n].value
}

}
website = website + '?id='
website = website + document.frmPoll.id.value
website = website + '&PollVote='
website = website + radiochk

var windowprops='width=100,height=100,scrollbars=yes,status=no,resizable=no,'
var heightspeed = 10; // vertical scrolling speed (higher = slower)
var widthspeed = 10; // horizontal scrolling speed (higher = slower)
var winwidth = 400; //change this to set window width
var winheight = 400; //change this to set window height
var leftdist = (screen.width/3)-(winwidth/3)-5; // distance to left edge of window
var topdist = (screen.height/2)-(winheight/2); // distance to top edge of window

if (window.resizeTo&&navigator.userAgent.indexOf("Opera")==-1)
{
var sizer = window.open("../buffer.htm","","left=" + leftdist + ",top=" + topdist +","+ windowprops);
for (sizeheight = 1; sizeheight < winheight; sizeheight += heightspeed)
sizer.resizeTo("1", sizeheight);
for (sizewidth = 1; sizewidth < winwidth; sizewidth += widthspeed)
sizer.resizeTo(sizewidth, sizeheight);
sizer.location = website;}
else
window.open(website,'mywindow');
}

function CreateLights(first) {

var newWin = window.open('','newWin', 'toolbar=no,width=520,height=400,top=10, left=50,directories=no,status=yes,scrollbars=yes,resizable=yes,menubar=no')

if (navigator.appVersion.indexOf("(X11") != -1 ||
navigator.appVersion.indexOf("(Mac") != -1)

newWin = window.open('','newWin', 'toolbar=yes,width=520, height=400, top=10, left=50,directories=no,status=yes,scrollbars=yes,resizable=yes,menubar=no')
{
newWin.location.href = first;
}
newWin.focus();
}

//-->
</script>
<script language="javascript" type="text/javascript">
function validate(obj) {
for (i=0; obj.elements[i]; i++) {
if(obj.elements[i].className == "exclude") {
continue;
}

if(obj.elements[i].value == ""){
alert("Please complete all the fields before submitting the form");
obj.elements[i].focus();
return false;
}
}
return true;
}
</script>
</head>


<body onload="init();">


<MAP NAME="mainheader_Map">
<AREA SHAPE="rect" ALT="" COORDS="723,0,774,33" HREF="/contact.asp">
<AREA SHAPE="rect" ALT="" COORDS="670,0,721,33" HREF="/privacy.asp">
<AREA SHAPE="rect" ALT="" COORDS="630,0,668,33" HREF="/index.asp">
</MAP>

<div class="innertile">
<div id="headimage"><img usemap="#mainheader_Map" src="/imagelibrary/mainheader.jpg" width="776" height="150" border="0"></div>
</div>

<div id="topnav">


<table align="center" style="border-bottom : 1px solid #FFFFFF;" cellspacing="0" border="0" width="776">
<tr>
<td class="navelement"><a href = "../index.asp">Main Site</a></td>
<td class="navelementdivide">|</td>
<td class="navelement"><a href = "index.asp">Home</a></td>
<td class="navelementdivide">|</td>

<td class="navelement"><a href = "viewcart.asp">Shopping Cart</a></td>
<td class="navelementdivide">|</td>

<td class="navelement"><a href = "security.asp">Security</a></td>
<td class="navelementdivide">|</td>

<td class="navelement"><a href = "howtoorder.asp">How to Order</a></td>
<td class="navelementdivide">|</td>

<td class="navelement"><a href = "login.asp">Login</a></td>
<td class="navelementdivide">|</td>



<td class="navelement"><a href = "helpdesk.asp">Help Desk</a></td>

</tr></table>





</div>

<div class="innertile">

<table cellspacing="0" class="main">
<tr>
<td width="164" valign="top">

<!-- Content left col -->


<div class="mpad">
<div><img src="/store/images/store/tab_search.gif" width="160" height="27" /></div>
<div class="mlborder1">
<div class="mlborder2">
<div class="mltext" style = "text-align:right;">
<form action = "products.asp" method = "post">
<input type = "text" name = "search" size = "22"/><br />
<input type = "submit" name = "action" value = "Search" />
</form>
</div>
</div>
</div>
<div><img src="/images/common/leftbase.gif" border="0" / WIDTH="160" HEIGHT="12"></div>
</div>

<div class="mpad">
<div><img src="/store/images/store/tab_products.gif" width="160" height="27" /></div>
<div class="mlborder1">
<div class="mlborder2">
<div class="mltext">
<ul class = "prodcats">
<li><a href = "products.asp?cat=8">Adult Clothing</a></li><li><a href = "products.asp?cat=3">Baby Wear</a></li><li><a href = "products.asp?cat=15">Bedroom Accessories</a></li><li><a href = "products.asp?cat=9">Childrens/Infant Wear</a></li><li><a href = "products.asp?cat=11">Collectors Items</a></li><li><a href = "products.asp?cat=4">Computer/Office Necessities</a></li><li><a href = "products.asp?cat=23">Game Day Merchandise</a></li><li><a href = "products.asp?cat=6">Gifts & Accessories</a></li><li><a href = "products.asp?cat=14">Great Gift Ideas</a></li><li><a href = "products.asp?cat=5">Hats & Scarves</a></li><li><a href = "products.asp?cat=24">Jewellery</a></li><li><a href = "products.asp?cat=1">Replica Kit</a></li><li><a href = "products.asp?cat=13">Sale Items</a></li><li><a href = "products.asp?cat=2">Team Wear</a></li>
</ul>
</div>
</div>
</div>
<div><img src="/images/common/leftbase.gif" border="0" / WIDTH="160" HEIGHT="12"></div>
</div>


<!-- end left col -->

</td>


<td width="410" valign="top">

<div class="tabpackspacer"></div>


<table class="main" cellspacing="0">
<tbody>
<tr>
<td><img height="28" src="/store/images/store/featured.gif" width="410" border="0" /></td>
</tr>
</tbody>
</table>

<div class="tabpack1">
<div class="tabpack2">
<div class="tptext">
<table width = "390" >
<tr><th colspan = "2"><span style="font-size:14px;color:#cc0000;">Ladies Hooded Top</span></th></tr>
<tr><td><a href="products.asp?cat=29&pid=4"><img style="margin-right: 4px;" src="/imagelibrary/4.jpg" border="0"></a></td>
<td><span style="line-height:14px;color:#000;"> A White Ladies Hooded Top with pouch pocket and "BULLS" written across the front.Side panelhas black and amber panel and the inide of the hood is lined with black. <br>
<p><strong>£25.00</strong></p><p><a href="products.asp?cat=29&pid=4">[buy]</a></p></span></td></tr>
</table>
<!--tptext ends--></div>
<!--tabpack2 ends--></div>
<!--tabpack1 ends--></div>



<div class="spacer4"></div>

<table class="main" cellspacing="0">
<tbody>
<tr>
<td><img height="28" src="/store/images/store/latest.gif" width="410" border="0" /></td>
</tr>
</tbody>
</table>

<div class="tabpack1">
<div class="tabpack2">

<table width="390" cellpadding="3">
<tr>
<td>
<a href="products.asp?cat=29&pid=5"><img style="margin-right: 4px;" src="/imagelibrary/5_th.jpg" border="0"></a></td>
<td valign="top">
<span style="font-size:14px;color:#cc0000;"><b>Ladies Rugby Shirt</b></span>
<br>
<span style="line-height:14px;">100% Cotton long sleeved, ladies fit Rugby Shirt with the red/ black and amber stripe running across the middle. <a href="products.asp?cat=29&pid=5">[buy]</a></span></td>
</tr>
</table>

<table width="390" cellpadding="3">
<tr>
<td>
<a href="products.asp?cat=25&pid=2"><img style="margin-right: 4px;" src="/imagelibrary/2_th.jpg" border="0"></a></td>
<td valign="top">
<span style="font-size:14px;color:#cc0000;"><b>Mens PJs</b></span>
<br>
<span style="line-height:14px;">Mens black shorts pyjama's with the Bull logo on the front. <a href="products.asp?cat=25&pid=2">[buy]</a></span></td>
</tr>
</table>

<table width="390" cellpadding="3">
<tr>
<td>
<a href="products.asp?cat=25&pid=1"><img style="margin-right: 4px;" src="/imagelibrary/1_th.jpg" border="0"></a></td>
<td valign="top">
<span style="font-size:14px;color:#cc0000;"><b>Ladies PJs</b></span>
<br>
<span style="line-height:14px;">Ladies pyjama's, a pink v necked cotton top with the bulls logo on the left breast and the bottoms are pink and white checked. <a href="products.asp?cat=25&pid=1">[buy]</a></span></td>
</tr>
</table>


<!--tabpack2 ends--></div>

<!--tabpack1 ends--></div>


<div class="spacer4"></div>

<table class="main" cellspacing="0">
<tbody>
<tr>
<td><img height="28" src="/store/images/store/topsellers.gif" width="410" border="0" /></td>
</tr>
</tbody>
</table>
<div class="well1">
<div class="well2b">
<table cellspacing="0" width="400">
<tr>
<td>
<!-- begin bottom slot -->
<div class="hmctr">
<table width="390" cellpadding="3">

<tr>
<td valign="top"><a href="products.asp?cat=32&pid=6"><span style="color:#cc0000;"><b>Gents Boxer Shorts</b></span> [buy]</a></td>
</tr>

<tr>
<td valign="top"><a href="products.asp?cat=32&pid=7"><span style="color:#cc0000;"><b>Mens Socks</b></span> [buy]</a></td>
</tr>

</table>
</div>
<!-- end bottom slot -->
</td>
</tr>
</table>

</div> <!--well2b ends-->
</div> <!--well1 ends-->
<div class="spacer4"></div>
</td>
<td width="190" valign="top">
<!-- begin rightcolumn -->
<div class="mrpad">
<div class="mrevent"><div id="mreventtext">Free Delivery!</div></div>
<div class="mhrborder1">
<div class="mhrborder2">
<table cellspacing="0" width="176" border="0">
<tr>
<td width="5" rowspan="4"><img height="5" src="/images/common/spacer.gif" width="5" border="0" /></td>
<td class="mhrtext" style = "text-align:center;">
<img src = "images/store/freedelivery.gif" align = "right"/>Free Delivery on all orders within the UK placed before the end of September!!<br /></tr></table></div></div><div><img src="/images/common/rightbase.gif" border="0" /></div>
</div><div class="mrpad">
<div class="mrevent"><div id="mreventtext">Pre-Orders!</div></div>
<div class="mhrborder1">
<div class="mhrborder2">
<table cellspacing="0" width="176" border="0">
<tr>
<td width="5" rowspan="4"><img height="5" src="/images/common/spacer.gif" width="5" border="0" /></td>
<td class="mhrtext" style = "text-align:center;">
PreOrder this product and get it before anyone else!<br /><img src = "/imagelibrary/1_th.jpg" /><br /><a href = "products.asp?cat=25&amp;pid=1">Click here to Pre-Order</a></tr></table></div></div><div><img src="/images/common/rightbase.gif" border="0" /></div>
</div><div class="mrpad">
<div class="mrevent"><div id="mreventtext">Limited Edition Tops</div></div>
<div class="mhrborder1">
<div class="mhrborder2">
<table cellspacing="0" width="176" border="0">
<tr>
<td width="5" rowspan="4"><img height="5" src="/images/common/spacer.gif" width="5" border="0" /></td>
<td class="mhrtext" style = "text-align:center;">
Get them while stocks last! Only 97 left!<br /><img src = "/imagelibrary/4_th.jpg" /><br /><a href = "products.asp?cat=29&amp;pid=4">Click here to buy now!</a></tr></table></div></div><div><img src="/images/common/rightbase.gif" border="0" /></div>
</div>
<!-- end right column -->
</td>
</tr>
</table>
<table>
<tr><td>
<div id="fixturebar"><div id="fixture"><span class="mhrtext"><a href="fixture_full.asp?fixtureid=239"><img src="/imagelibrary/saints_trans_30.gif" width="30" height="30"><br>09/09 [H]</a></span></div>
<div id="fixture"><span class="mhrtext"><a href="fixture_full.asp?fixtureid=240"><img src="/imagelibrary/huddersfield_trans_30.gif" width="30" height="30"><br>18/09 [A]</a></span></div>
</div>
</td></tr>
</table>

<br>&nbsp;<br>

</div><!--end of inner tile-->


<!--footer begins-->

<div class="footer1">

<div class="footer2"><div style="padding: 3px; color:white;">


<div id="sponsorbox">
<a href="adredirector.asp?type=sp&adid=2&surl=http://www.jjbsports.com" target="_new"><img hspace="4" border="0" src="/imagelibrary/JJB140.jpg"></a><img hspace="4" border="0" src="/imagelibrary/Patrick140.jpg"><a href="adredirector.asp?type=sp&adid=4&surl=http://www.tesco.com" target="_new"><img hspace="4" border="0" src="/imagelibrary/Tesco140.jpg"></a><a href="adredirector.asp?type=sp&adid=6&surl=http://www.rockfm.co.uk" target="_new"><img hspace="4" border="0" src="/imagelibrary/RockFM140.jpg"></a><a href="adredirector.asp?type=sp&adid=5&surl=http://www.totesport.com/?AID=350&SID=697" target="_new"><img hspace="4" border="0" src="/imagelibrary/Totesport140.jpg"></a><br><br></div>


<b>

</b><br>
<div class="spacer2"></div>
©2005 <a href="/index.asp">Wigan Warriors</a>. All rights reserved.
<div class="spacer2"></div>
</div></div>
</div>


<!--footer ends-->


<!--far begins-->

<div id="farRight">
<a href="adredirector.asp?type=ad&adid=4&surl=http%3A%2F%2Fwww%2Etotesport%2Ecom%2F%3FAID%3D350%26SID%3D697" target="_new"><img src="/imagelibrary/tote_bet.gif" border="0"></a><br><br>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" height="108" width="120">
<param name="movie" value="/imagelibrary/chal_cup_banner-NON-157C40.swf" />
<param name="quality" value="high" />
<embed src="/imagelibrary/chal_cup_banner-NON-157C40.swf" pluginspage="http://www.macromedia.com/go/getflashplayer" quality="high" height="108" width="120" type="application/x-shockwave-flash"></embed>
</object>
<br><br>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" height="" width="120">
<param name="movie" value="/imagelibrary/grand_final_banner-NON-SL.swf" />
<param name="quality" value="high" />
<embed src="/imagelibrary/grand_final_banner-NON-SL.swf" pluginspage="http://www.macromedia.com/go/getflashplayer" quality="high" height="" width="120" type="application/x-shockwave-flash"></embed>
</object>
<br><br>


</div>



<!--far right ends-->




</body>
</html>

NancyJ
09-07-2005, 01:45 PM
found the problem, ie doesnt pass the value of the submit button with the form if you press enter and only have 1 input box or something along those lines, so my page that tests if it has form input first was failing and kicking it back to the index page.