Interactive Buttons...

  • Thread starter Thread starter 116
  • Start date Start date
1

116

I have just introduced my self to interactive buttons. I like them but...I
have a few that after 'onclick' the button is inactive, and thus grays out.
The interactive does not. What would I have to do for this effect to
function?

Thanks
David
 
The site is internal only, but here is the button that grays out:
<button type="button" onclick="this.disabled = true, calcinc()">Click
Me</button>

and the IB that does not:
<img border="0" id="img1" src="images/buttons/clear3.gif" height="20"
width="50" alt="Clear" fp-style="fp-btn: Embossed Rectangle 5; fp-font:
Verdana; fp-font-size: 8; fp-transparent: 1; fp-proportional: 0"
fp-title="Clear"
onmouseover="FP_swapImg(1,0,/*id*/'img1',/*url*/'images/buttons/clear1.gif')"
onmouseout="FP_swapImg(0,0,/*id*/'img1',/*url*/'images/buttons/clear3.gif')"
onmousedown="FP_swapImg(1,0,/*id*/'img1',/*url*/'images/buttons/clear2.gif')"
onmouseup="FP_swapImg(0,0,/*id*/'img1',/*url*/'images/buttons/clear1.gif')"
onclick="this.disabled = true, FP_callJS('clrfields()'),
document.forms[0].Shop_Order.focus()">

David
 
The first button is a form element that can be disabled. Interactive
buttons are not form elements, and thus cannot be disabled - but they
can be hidden using a behaviour, if that helps?

--
Ron Symonds - Microsoft MVP (Expression)
Reply only to group - emails will be deleted unread.

http://www.rxs-enterprises.org/fp



The site is internal only, but here is the button that grays out:
<button type="button" onclick="this.disabled = true, calcinc()">Click
Me</button>

and the IB that does not:
<img border="0" id="img1" src="images/buttons/clear3.gif" height="20"
width="50" alt="Clear" fp-style="fp-btn: Embossed Rectangle 5; fp-font:
Verdana; fp-font-size: 8; fp-transparent: 1; fp-proportional: 0"
fp-title="Clear"
onmouseover="FP_swapImg(1,0,/*id*/'img1',/*url*/'images/buttons/clear1.gif')"
onmouseout="FP_swapImg(0,0,/*id*/'img1',/*url*/'images/buttons/clear3.gif')"
onmousedown="FP_swapImg(1,0,/*id*/'img1',/*url*/'images/buttons/clear2.gif')"
onmouseup="FP_swapImg(0,0,/*id*/'img1',/*url*/'images/buttons/clear1.gif')"
onclick="this.disabled = true, FP_callJS('clrfields()'),
document.forms[0].Shop_Order.focus()">

David

Ronx said:
Please post a link to a page with this problem. I have never seen an IB
"gray out"

--
Ron Symonds - Microsoft MVP (Expression)
Reply only to group - emails will be deleted unread.

http://www.rxs-enterprises.org/fp
 
They are actually disabling. I can click them once only. But the fact that
visually you can not notice that it disables is what I am looking for, just
like the form element button you referenced.

David

Ronx said:
The first button is a form element that can be disabled. Interactive
buttons are not form elements, and thus cannot be disabled - but they
can be hidden using a behaviour, if that helps?

--
Ron Symonds - Microsoft MVP (Expression)
Reply only to group - emails will be deleted unread.

http://www.rxs-enterprises.org/fp



The site is internal only, but here is the button that grays out:
<button type="button" onclick="this.disabled = true, calcinc()">Click
Me</button>

and the IB that does not:
<img border="0" id="img1" src="images/buttons/clear3.gif" height="20"
width="50" alt="Clear" fp-style="fp-btn: Embossed Rectangle 5; fp-font:
Verdana; fp-font-size: 8; fp-transparent: 1; fp-proportional: 0"
fp-title="Clear"
onmouseover="FP_swapImg(1,0,/*id*/'img1',/*url*/'images/buttons/clear1.gif')"
onmouseout="FP_swapImg(0,0,/*id*/'img1',/*url*/'images/buttons/clear3.gif')"
onmousedown="FP_swapImg(1,0,/*id*/'img1',/*url*/'images/buttons/clear2.gif')"
onmouseup="FP_swapImg(0,0,/*id*/'img1',/*url*/'images/buttons/clear1.gif')"
onclick="this.disabled = true, FP_callJS('clrfields()'),
document.forms[0].Shop_Order.focus()">

David

Ronx said:
Please post a link to a page with this problem. I have never seen an IB
"gray out"

--
Ron Symonds - Microsoft MVP (Expression)
Reply only to group - emails will be deleted unread.

http://www.rxs-enterprises.org/fp





I have just introduced my self to interactive buttons. I like them but...I
have a few that after 'onclick' the button is inactive, and thus grays out.
The interactive does not. What would I have to do for this effect to
function?

Thanks
David
 
Try this:
<p><img id="img1" alt="Clear" border="0" height="20"
onclick="this.disabled =
true;FP_swapImg(0,0,/*id*/'img1',/*url*/'clear2.gif');
FP_callJS('clrfields()'); document.forms[0].Shop_Order.focus()"
onmousedown="FP_swapImg(1,0,/*id*/'img1',/*url*/'clear2.gif')"
onmouseout="FP_swapImg(0,0,/*id*/'img1',/*url*/'clear3.gif')"
onmouseover="FP_swapImg(1,0,/*id*/'img1',/*url*/'clear1.gif')"
onmouseup="FP_swapImg(0,0,/*id*/'img1',/*url*/'clear1.gif')"
src="clear3.gif" width="50" /><!-- MSComment="ibutton" fp-style="fp-btn:
Embossed Rectangle 5; fp-font: Verdana; fp-font-size: 8;
fp-font-color-press: #808080; fp-transparent: 1; fp-proportional: 0"
fp-title="Clear" -->&nbsp; </p>

Notice the onclick event also changes the image, and the font colour is
changed on the pressed image - IB properties Font tag.

See http://www.rxs-enterprises.org/tests/pages/ibdisable-test.htm

However, this solution is not perfect. Although the button is disabled,
and greyed out, clicking on it again restores the original font colour.
--
Ron Symonds - Microsoft MVP (Expression)
Reply only to group - emails will be deleted unread.

http://www.rxs-enterprises.org/fp




They are actually disabling. I can click them once only. But the fact that
visually you can not notice that it disables is what I am looking for, just
like the form element button you referenced.

David

Ronx said:
The first button is a form element that can be disabled. Interactive
buttons are not form elements, and thus cannot be disabled - but they
can be hidden using a behaviour, if that helps?

--
Ron Symonds - Microsoft MVP (Expression)
Reply only to group - emails will be deleted unread.

http://www.rxs-enterprises.org/fp



The site is internal only, but here is the button that grays out:
<button type="button" onclick="this.disabled = true, calcinc()">Click
Me</button>

and the IB that does not:
<img border="0" id="img1" src="images/buttons/clear3.gif" height="20"
width="50" alt="Clear" fp-style="fp-btn: Embossed Rectangle 5; fp-font:
Verdana; fp-font-size: 8; fp-transparent: 1; fp-proportional: 0"
fp-title="Clear"
onmouseover="FP_swapImg(1,0,/*id*/'img1',/*url*/'images/buttons/clear1.gif')"
onmouseout="FP_swapImg(0,0,/*id*/'img1',/*url*/'images/buttons/clear3.gif')"
onmousedown="FP_swapImg(1,0,/*id*/'img1',/*url*/'images/buttons/clear2.gif')"
onmouseup="FP_swapImg(0,0,/*id*/'img1',/*url*/'images/buttons/clear1.gif')"
onclick="this.disabled = true, FP_callJS('clrfields()'),
document.forms[0].Shop_Order.focus()">

David

:

Please post a link to a page with this problem. I have never seen an IB
"gray out"

--
Ron Symonds - Microsoft MVP (Expression)
Reply only to group - emails will be deleted unread.

http://www.rxs-enterprises.org/fp





I have just introduced my self to interactive buttons. I like them but...I
have a few that after 'onclick' the button is inactive, and thus grays out.
The interactive does not. What would I have to do for this effect to
function?

Thanks
David
 
hey Ronx...I saw the demo and it lloked sweet until I accidently clicked on
it a second time. The original image came back. Also I can nnot get the
same results as you are getting on your test page.

David

Ronx said:
Try this:
<p><img id="img1" alt="Clear" border="0" height="20"
onclick="this.disabled =
true;FP_swapImg(0,0,/*id*/'img1',/*url*/'clear2.gif');
FP_callJS('clrfields()'); document.forms[0].Shop_Order.focus()"
onmousedown="FP_swapImg(1,0,/*id*/'img1',/*url*/'clear2.gif')"
onmouseout="FP_swapImg(0,0,/*id*/'img1',/*url*/'clear3.gif')"
onmouseover="FP_swapImg(1,0,/*id*/'img1',/*url*/'clear1.gif')"
onmouseup="FP_swapImg(0,0,/*id*/'img1',/*url*/'clear1.gif')"
src="clear3.gif" width="50" /><!-- MSComment="ibutton" fp-style="fp-btn:
Embossed Rectangle 5; fp-font: Verdana; fp-font-size: 8;
fp-font-color-press: #808080; fp-transparent: 1; fp-proportional: 0"
fp-title="Clear" --> </p>

Notice the onclick event also changes the image, and the font colour is
changed on the pressed image - IB properties Font tag.

See http://www.rxs-enterprises.org/tests/pages/ibdisable-test.htm

However, this solution is not perfect. Although the button is disabled,
and greyed out, clicking on it again restores the original font colour.
--
Ron Symonds - Microsoft MVP (Expression)
Reply only to group - emails will be deleted unread.

http://www.rxs-enterprises.org/fp




They are actually disabling. I can click them once only. But the fact that
visually you can not notice that it disables is what I am looking for, just
like the form element button you referenced.

David

Ronx said:
The first button is a form element that can be disabled. Interactive
buttons are not form elements, and thus cannot be disabled - but they
can be hidden using a behaviour, if that helps?

--
Ron Symonds - Microsoft MVP (Expression)
Reply only to group - emails will be deleted unread.

http://www.rxs-enterprises.org/fp




The site is internal only, but here is the button that grays out:
<button type="button" onclick="this.disabled = true, calcinc()">Click
Me</button>

and the IB that does not:
<img border="0" id="img1" src="images/buttons/clear3.gif" height="20"
width="50" alt="Clear" fp-style="fp-btn: Embossed Rectangle 5; fp-font:
Verdana; fp-font-size: 8; fp-transparent: 1; fp-proportional: 0"
fp-title="Clear"
onmouseover="FP_swapImg(1,0,/*id*/'img1',/*url*/'images/buttons/clear1.gif')"
onmouseout="FP_swapImg(0,0,/*id*/'img1',/*url*/'images/buttons/clear3.gif')"
onmousedown="FP_swapImg(1,0,/*id*/'img1',/*url*/'images/buttons/clear2.gif')"
onmouseup="FP_swapImg(0,0,/*id*/'img1',/*url*/'images/buttons/clear1.gif')"
onclick="this.disabled = true, FP_callJS('clrfields()'),
document.forms[0].Shop_Order.focus()">

David

:

Please post a link to a page with this problem. I have never seen an IB
"gray out"

--
Ron Symonds - Microsoft MVP (Expression)
Reply only to group - emails will be deleted unread.

http://www.rxs-enterprises.org/fp





I have just introduced my self to interactive buttons. I like them but...I
have a few that after 'onclick' the button is inactive, and thus grays out.
The interactive does not. What would I have to do for this effect to
function?

Thanks
David
 
Of course, disabling javascript causes it all to go out the window....

--
Murray
MVP Expression Web


116 said:
hey Ronx...I saw the demo and it lloked sweet until I accidently clicked
on
it a second time. The original image came back. Also I can nnot get the
same results as you are getting on your test page.

David

Ronx said:
Try this:
<p><img id="img1" alt="Clear" border="0" height="20"
onclick="this.disabled =
true;FP_swapImg(0,0,/*id*/'img1',/*url*/'clear2.gif');
FP_callJS('clrfields()'); document.forms[0].Shop_Order.focus()"
onmousedown="FP_swapImg(1,0,/*id*/'img1',/*url*/'clear2.gif')"
onmouseout="FP_swapImg(0,0,/*id*/'img1',/*url*/'clear3.gif')"
onmouseover="FP_swapImg(1,0,/*id*/'img1',/*url*/'clear1.gif')"
onmouseup="FP_swapImg(0,0,/*id*/'img1',/*url*/'clear1.gif')"
src="clear3.gif" width="50" /><!-- MSComment="ibutton" fp-style="fp-btn:
Embossed Rectangle 5; fp-font: Verdana; fp-font-size: 8;
fp-font-color-press: #808080; fp-transparent: 1; fp-proportional: 0"
fp-title="Clear" --> </p>

Notice the onclick event also changes the image, and the font colour is
changed on the pressed image - IB properties Font tag.

See http://www.rxs-enterprises.org/tests/pages/ibdisable-test.htm

However, this solution is not perfect. Although the button is disabled,
and greyed out, clicking on it again restores the original font colour.
--
Ron Symonds - Microsoft MVP (Expression)
Reply only to group - emails will be deleted unread.

http://www.rxs-enterprises.org/fp




They are actually disabling. I can click them once only. But the fact
that
visually you can not notice that it disables is what I am looking for,
just
like the form element button you referenced.

David

:

The first button is a form element that can be disabled. Interactive
buttons are not form elements, and thus cannot be disabled - but they
can be hidden using a behaviour, if that helps?

--
Ron Symonds - Microsoft MVP (Expression)
Reply only to group - emails will be deleted unread.

http://www.rxs-enterprises.org/fp




The site is internal only, but here is the button that grays out:
<button type="button" onclick="this.disabled = true,
calcinc()">Click
Me</button>

and the IB that does not:
<img border="0" id="img1" src="images/buttons/clear3.gif"
height="20"
width="50" alt="Clear" fp-style="fp-btn: Embossed Rectangle 5;
fp-font:
Verdana; fp-font-size: 8; fp-transparent: 1; fp-proportional: 0"
fp-title="Clear"
onmouseover="FP_swapImg(1,0,/*id*/'img1',/*url*/'images/buttons/clear1.gif')"
onmouseout="FP_swapImg(0,0,/*id*/'img1',/*url*/'images/buttons/clear3.gif')"
onmousedown="FP_swapImg(1,0,/*id*/'img1',/*url*/'images/buttons/clear2.gif')"
onmouseup="FP_swapImg(0,0,/*id*/'img1',/*url*/'images/buttons/clear1.gif')"
onclick="this.disabled = true, FP_callJS('clrfields()'),
document.forms[0].Shop_Order.focus()">

David

:

Please post a link to a page with this problem. I have never
seen an IB
"gray out"

--
Ron Symonds - Microsoft MVP (Expression)
Reply only to group - emails will be deleted unread.

http://www.rxs-enterprises.org/fp





I have just introduced my self to interactive buttons. I like
them but...I
have a few that after 'onclick' the button is inactive, and
thus grays out.
The interactive does not. What would I have to do for this
effect to
function?

Thanks
David
 
Back
Top