Editbox problem

Issues related to forms.
Post Reply
FRANCISCO2020
 
 
Posts: 10
Joined: Fri Nov 20, 2020 11:13 am

Editbox problem

Post by FRANCISCO2020 »

I have a problem with a numeric type editbox, with a default value of 0 and a range between 0 and 100.

If the box is manipulated from the up and down buttons, it works within the margins, but if you stand on it and type, it can write 999 for example and when it loses focus, the wrong value is not corrected. How can I do so that if you write an amount, for example 200, I set it to zero for example.

a greeting
Francisco
User avatar
Pablo
 
Posts: 23404
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Editbox problem

Post by Pablo »

Do you mean in the workspace?
Can you please be more specific?
Do you have a demo project?
FRANCISCO2020
 
 
Posts: 10
Joined: Fri Nov 20, 2020 11:13 am

Re: Editbox problem

Post by FRANCISCO2020 »

Once the editbox is created and configured, I launch it to the browser and from the browser it behaves as I told you.

Code: Select all

<!doctype html>
<html lang="es">
<head>
<meta charset="utf-8">
<title>Página sin título</title>
<meta name="generator" content="DOELECTRIC">
<link href="css/index.css" rel="stylesheet">
<script src="js/jquery-1.12.4.min.js"></script>
<script>
$(document).ready(function()
{
   $("#Editbox1").change(function()
   {
      if ($('#Editbox1').val().length == 0)
      {
         $('#Editbox1').val(0);
      }
      if ($('#Editbox1').val() > 65000 && $('#Editbox1').val() < -1)
      {
         $('#Editbox1').val(0);
      }
      $('#Editbox1').trigger('change');
   });
   $("#Editbox1").trigger('change');
});
</script>
</head>
<body>
<div id="Layer2" style="position:absolute;text-align:left;left:20px;top:232px;width:935px;height:749px;z-index:2;" title="dsdsdsdsd">
<label for="" id="Label15" style="position:absolute;left:110px;top:215px;width:309px;height:18px;line-height:22px;z-index:0;" title="Dejar en 0 si no se utiliza">Tiempo en Segundos a la Conexion</label>
<input type="number" id="Editbox1" style="position:absolute;left:110px;top:245px;width:311px;height:23px;z-index:1;" name="Editbox1" value="0" maxlength="5" spellcheck="false" required min="0" max="65000">
</div>
</body>
</html>
User avatar
Pablo
 
Posts: 23404
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Editbox problem

Post by Pablo »

The edit box functionality is implemented in the browser, so the behavior is not controlled by WWB
When you select 'numeric' as type then the only thing that WWB does is add 'type="number' to the code. The rest is up to the browser.
Each browser has it own implementation so it may work different in another browser.
FRANCISCO2020
 
 
Posts: 10
Joined: Fri Nov 20, 2020 11:13 am

Re: Editbox problem

Post by FRANCISCO2020 »

Hello, I have tried it in firefox and chrome and it does not go in any. How can it be done so that you do not allow larger numbers to be entered than programmed?
User avatar
Pablo
 
Posts: 23404
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Editbox problem

Post by Pablo »

With real-time validation you can set the range. This adds a script to the page.
Note that when using 'numeric' the browser may override this functionality. So, when using validation make sure to select 'text' mode.
FRANCISCO2020
 
 
Posts: 10
Joined: Fri Nov 20, 2020 11:13 am

Re: Editbox problem

Post by FRANCISCO2020 »

Ok thanks I'll see how I solve it.
I have a question, how do I have to make a project x web builder save all the necessary data of that web project, in a folder, since it will be run on a server without internet connection.
User avatar
Pablo
 
Posts: 23404
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Editbox problem

Post by Pablo »

You can also publish the website locally and then copy the generated files to the server.
https://wysiwygwebbuilder.com/publish.html
FRANCISCO2020
 
 
Posts: 10
Joined: Fri Nov 20, 2020 11:13 am

Re: Editbox problem

Post by FRANCISCO2020 »

Then, when publishing locally, it saves all the information related to the page in the local folder images, css, text sources ... etc.
User avatar
Pablo
 
Posts: 23404
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Editbox problem

Post by Pablo »

Correct
FRANCISCO2020
 
 
Posts: 10
Joined: Fri Nov 20, 2020 11:13 am

Re: Editbox problem

Post by FRANCISCO2020 »

OK thanks. By the way, very good application.
And Spanish, encouragement.
Post Reply