My page looks and acts weired in Mozilla!!

eramgarden

Contributor
Joined
Mar 8, 2004
Messages
579
I have a book from Mike Gunderloy that talks about ASP.Net's compatibility with different browsers....

These are the strange things:

1. Validator doesnt work in Mozilla. For example, on login page, I have 2 texts with validator for each. If they're blank, the validator displays the msg to enter values. In Mozilla seems like the validator is disabled and page is directed to next page which then fails.

2. I have buttons that have background color of Blue. In Mozilla , they're all grey!

3. In [mozilla], the buttons are not close to eachother and not the same size!!

I have checked these

A. Checked project properties/designer defaults and the dropdown is jscript not vbscript.

B. I do NOT have Smart Navigation.

What's going on??
 
Different browsers support different things. Consider yourself lucky that these are your only problems.

The following works just fine in Mozilla:

Code:
<html>
	<head>
		<title>Mozilla Test</title>
	</head>
	<body>
		<form>
			<p><input type="button" value="Mozilla Test" style="color: white; background-color: blue;" /></p>
		</form>
	</body>
</html>
 
I've never noticed validators not working in mozilla before.
If scripting is disabled in mozilla then this will prevent the validators firing client side - on the server side button click you need to check Page.IsValid to ensure there are no problems.
What version of mozilla are you using? Would it be possible to post your code to see if anyone can duplicate your problem?
Also what OS are you running on?
 
Last edited:
Thanks SO much for helping...

I added "Page.IsValid" and now the validators work in Mozilla...

But still have 2 more questions

1. Where can I enable scripting in Mozilla?

2. Howcome my buttons in Mozilla dont display the background color, gets rid of the size of the buttons and puts spaces between them??

This is the .Net code with the colors/size
Code:
<TABLE id="Table1" cellSpacing="0" cellPadding="0" width="200" border="0">
	<TR>
		<TD align="middle" colSpan="1" height="50" rowSpan="1"><asp:button id="btnHome" Width="150px" Font-Bold="True" BackColor="LightSlateGray" runat="server" Text="Home" Height="50px"></asp:button></TD>
	</TR>
	<TR>
		<TD align="middle" height="50"><asp:button id="btnSite" Width="150px" Font-Bold="True" BackColor="LightSlateGray" runat="server" Text="Site" Height="50px"></asp:button></TD>
	</TR>
	<TR>
		<TD align="middle" height="50"><asp:button id="btnIncident" Width="150px" Font-Bold="True" BackColor="LightSlateGray" runat="server" Text="Incident" Height="50px"></asp:button></TD>
	</TR>
	<TR>
		<TD align="middle" height="50"><asp:button id="btnContact" Width="150px" Font-Bold="True" BackColor="LightSlateGray" runat="server" Text="Contact" Height="50px"></asp:button></TD>
	</TR>
	<TR>
		<TD align="middle" height="50"><asp:button id="btnMyESP" Width="150px" Font-Bold="True" BackColor="LightSlateGray" runat="server" Text="MY ESP" Height="50px"></asp:button></TD>
	</TR>
	<TR>
		<TD align="middle" height="50"><asp:button id="btnLogOut" Width="150px" Font-Bold="True" BackColor="LightSlateGray" runat="server" Text="Logout" Height="50px"></asp:button></TD>
	</TR>
	</TABLE>


This is how Mozilla displays it..gets rid of color and size!!

Code:
<TABLE id="Table1" cellSpacing="0" cellPadding="0" width="200" border="0">

	<TR>
		<TD align="middle" colSpan="1" height="50" rowSpan="1"><input type="submit" name="SideMenu1:btnHome" value="Home" id="SideMenu1_btnHome" /></TD>
	</TR>
	<TR>
		<TD align="middle" height="50"><input type="submit" name="SideMenu1:btnSite" value="Site" id="SideMenu1_btnSite" /></TD>
	</TR>
	<TR>
		<TD align="middle" height="50"><input type="submit" name="SideMenu1:btnIncident" value="Incident" id="SideMenu1_btnIncident" /></TD>
	</TR>

	<TR>
		<TD align="middle" height="50"><input type="submit" name="SideMenu1:btnContact" value="Contact" id="SideMenu1_btnContact" /></TD>
	</TR>
	<TR>
		<TD align="middle" height="50"><input type="submit" name="SideMenu1:btnMyESP" value="MY ESP" id="SideMenu1_btnMyESP" /></TD>
	</TR>
	<TR>
		<TD align="middle" height="50"><input type="submit" name="SideMenu1:btnLogOut" value="Logout" id="SideMenu1_btnLogOut" /></TD>
	</TR>

	</TABLE>
 
Odd, just cut and pasted your code into a new web app and tested it with both IE an mozilla - IE looked fine, mozilla didn't.
Saved the HTML source from IE - opened that in mozilla and it looked just like the IE version.
If you move the colour, height and width into a CSS file as class and set the buttons up that way they look fine in IE and mozilla but not in the IDE.
 
Last edited:
Back
Top