CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> General/Other

 [resolved - Iexplorer 8.0 & enabled/disabled input text boxes]

Print topic Send  topic

Author Message
CodeChargeMVP

Posts: 473
Posted: 06/03/2011, 3:28 AM

Hi,

I�ve release than when trying to disabled/enabled an input text box on Iexplorer 8.0 this way:

<span onmouseout="this.firstChild.disabled='';">

<input id="justgastoJGNum" onmouseover="this.disabled=true;" onmouseout="this.disabled=' ';" value="{JGNum}" readonly maxlength="10" size="10" name="{JGNum_Name}">

</span>

Seems than works fine, when your mouse over the input it gets disabled an on mouse out it gets enabled, but if you mouse over the input and do click with mouse, then you can write inside the input, so it�s not really disabled,so the questions is:

�any suggestion to avoid it?

Thank you very much in advance.
_________________
Best Regards
Entrepeneur | NT Consultant
View profile  Send private message
cleyan


Posts: 136
Posted: 06/07/2011, 4:13 PM

maybe using jquery?

try:
   
  
<span onmouseout="$('#justgastoJGNum').removeAttr('disabled');">  
  
<input id="justgastoJGNum" onmouseover="$('#justgastoJGNum').attr('disabled','disabled');" onmouseout="$('#justgastoJGNum').removeAttr('disabled');" value="{JGNum}" readonly maxlength="10" size="10" name="{JGNum_Name}">  
  
</span>  
  

include jquery using:

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
_________________
**************************************************
Carlos Leyan B.
Temuco, Chile
www.leytec.net
View profile  Send private message
CodeChargeMVP

Posts: 473
Posted: 06/15/2011, 2:56 AM

Hi,

I use :

<script language="JavaScript" src="../template/funciones/jquery-1.6.1.min.js" type="text/javascript"></script>

on my projects, may you shall update to last version.

I ´ll try that.

The first example than I wrote has another bug, if you moveover and mouseout very quickly over the input object or button it´ll return an horrible javascript error message:

"firstChild is null or is not an object".


Quote cleyan:
maybe using jquery?

try:
   
  
<span onmouseout="$('#justgastoJGNum').removeAttr('disabled');">  
  
<input id="justgastoJGNum" onmouseover="$('#justgastoJGNum').attr('disabled','disabled');" onmouseout="$('#justgastoJGNum').removeAttr('disabled');" value="{JGNum}" readonly maxlength="10" size="10" name="{JGNum_Name}">  
  
</span>  
  

include jquery using:

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>

_________________
Best Regards
Entrepeneur | NT Consultant
View profile  Send private message
CodeChargeMVP

Posts: 473
Posted: 06/15/2011, 3:21 AM

Hi,

JQuery Solved the second bug over a button,gotta try over an input object.

Jquery didn´t solved the first bug, the user still able to write words or numbers when the input object seems than it´s disabled, the readonly property from CCS confused me.

I think I´ll have to develop a function which erase every word or number than the user writes on the input object when is disabled.

Thank you very much :-D

Greets.


_________________
Best Regards
Entrepeneur | NT Consultant
View profile  Send private message
CodeChargeMVP

Posts: 473
Posted: 06/16/2011, 5:36 AM

well finally solved deleting the events on mouse over and on mouse out and working with on focus event.


_________________
Best Regards
Entrepeneur | NT Consultant
View profile  Send private message
CodeChargeMVP

Posts: 473
Posted: 10/24/2011, 10:20 AM

the issue is resolved and works great as I wished using advanced javascript and jquery.
_________________
Best Regards
Entrepeneur | NT Consultant
View profile  Send private message
dragoon


Posts: 173
Posted: 10/24/2011, 2:17 PM

Hi there,

don't bother with onmouseover/out

use this instead:
 onkeydown="return false;" oncut="return false;" onpaste="return false;"
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.