Click to See Complete Forum and Search --> : CSS IE Bug with Form Button style


pizzaluva
05-25-2005, 01:12 AM
I'm getting a weird bug on IE with a form submit button i applied a style to.

You can see it in action here:
http://www.welovewinter.com/bug/edituser.html (http://http://www.welovewinter.com/bug/edituser.html)

basically a black border shows up around the button.

Oddly, it doesnt show up on this page, where I use the same form button style:

http://www.welovewinter.com/bug/renderlogin.html


any clues??

I'm using IE6, bug does not show up in Firefox.


btw, how do you post code in here?

Fang
05-25-2005, 02:19 AM
It's not a bug, you have focused on a form element which also 'highlights' the form's submit button. On the 2nd page there is no focus set.

Adding code: use the php code button for colored code or code tags
[code] code goes here [/code]

pizzaluva
05-25-2005, 03:37 AM
actually the code for both pages is the same:

first page:

<input onFocus="this.blur();"
class="formbut"
style="cursor:pointer;"
onmouseover="this.className='formbutover'"
onmouseout="this.className='formbut'"
type="submit" value="Add New Commission Split" />


second page:

<input onFocus="this.blur();"
class="formbut"
style="cursor:pointer;"
onmouseover="this.className='formbutover'"
onmouseout="this.className='formbut'"
type="submit" value="Login" />

Fang
05-25-2005, 03:48 AM
No, this:
<script type="text/javascript" language="JavaScript">
<!--
var focusControl = document.forms["commissionSplitForm"].elements["threshold"];

if (focusControl.type != "hidden" && !focusControl.disabled) {
focusControl.focus();
}
// -->
</script>

pizzaluva
05-25-2005, 11:37 AM
any idea what that bit of javascript does?
is that soemthing i can do without perhaps? or is it more functional that aesthetic?

i didn't even notice that before, thats something that the developers placed in there. I'm just adding styles and layout around their code.

Fang
05-25-2005, 02:57 PM
It places the focus on the element named threshold if it's not hidden or disabled.