baseportal
Start

baseportal message board

Welcome to the baseportal message board...

Please read the FAQ.

 
 Selected message: To the list 
    Message from MIKE on 12/2 2003, 12:04 +00:00

    Re: ...Is IT POSSIBLE?


      I TRIED TO USE THIS CODE,BUT NO ENTRY WAS ADDED INTO MY DATABASE..<perl>

      if(%_put)
      {

      get "Id==#";
      if($_put{firstname} eq $firstname && $_put{lastname} eq $lastname)
      {
          out "Your entry is already in the database... Pls do not send it again...";
          $_get{cmd}="";
        }


      }
      </perl>


      <do action=input>

      <form action="/baseportal/alexis/Directory/Template" method="post" enctype="multipart/form-data">
      <input type="hidden"name="cmd="value="add">
      <input type="hidden"name="htx=" value="/alexis/Directory/Template">
      Please enter your first name: <input type="text" name="firstname:="><p>
      Please enter your last name: <input type="text" name="lastname:="><p>

      <input type="submit" value="send">
      </form>
      <center>

    Your reply:

    Name: EMail: WWW:
    Subject:
    Text:
    Timezone:

    Post a new message


 All messages from this thread: To the list 
    Message from MIKE on 11/29 2003, 12:21 +08:00
    EMail: amboy.mep@eudoramail.com

    ...Is IT POSSIBLE?


      Dear Master Chris,

      iS it possible to limit the number of characters in a textbox to prevent the user to paste millions of characters or letters?

      Is it also possible to lock the send button after the clicked it? I mean, he cant send again...just lock it.

      When I tried to click the send button even without filling the entries it is still added in the database...empty!..Can we restrict the user that he should fill all te entry required?

      tanks and more power.This portal is really a great help to us all...keep up the good service.

      Mike
     Post a reply

    Message from Christoph Bergmann on 11/29 2003, 18:57 +01:00
    EMail: info@baseportal.com

    Re: ...Is IT POSSIBLE? - everything is possible with baseportal ;-)


      1. Insert before your <do action=all ...>:

      <perl>
      if(%_put)
      {
      $_put{Fieldname}=substr($_put{Fieldname},0,123);
      }
      </perl>

      To limit the possible number of chars in the field "Fieldname" to 123.

      2. Really "locking" would only be possible with some javascript code which isn't a real 100% waterproof solution, because the user doesnt necessarily use javascript.

      What you can do is compare the entry which should be added with the last entry. Looks like this:

      <perl>
      if(%_put)
      {
      get "Id==#";
      if($_put{Fieldname1} eq $Fieldname1 && $_put{Fieldname2} eq $Fieldname2)
        {
          out "Your entry is already in the database... Pls do not send it again...";
          $_get{cmd}="";
        }

      }
      </perl>

      You should insert this before your <do action=all> on the page...


      3. You can check the new entry before it is added to the database with the following code:

      <perl>
      if(%_put}
      {
      if($_put{Fieldname1} eq "") { out "Fieldname1 is empty. Pls insert something!<br>"; $_get{cmd}=""; }
      if($_put{Fieldname2} eq "") { out "Fieldname2 is empty. Pls insert something!<br>"; $_get{cmd}=""; }

      }
      </perl>


      ok? ;-)

     Post a reply

    Message from MIKE on 12/2 2003, 12:04 +00:00

    Re: ...Is IT POSSIBLE?


      I TRIED TO USE THIS CODE,BUT NO ENTRY WAS ADDED INTO MY DATABASE..<perl>

      if(%_put)
      {

      get "Id==#";
      if($_put{firstname} eq $firstname && $_put{lastname} eq $lastname)
      {
          out "Your entry is already in the database... Pls do not send it again...";
          $_get{cmd}="";
        }


      }
      </perl>


      <do action=input>

      <form action="/baseportal/alexis/Directory/Template" method="post" enctype="multipart/form-data">
      <input type="hidden"name="cmd="value="add">
      <input type="hidden"name="htx=" value="/alexis/Directory/Template">
      Please enter your first name: <input type="text" name="firstname:="><p>
      Please enter your last name: <input type="text" name="lastname:="><p>

      <input type="submit" value="send">
      </form>
      <center>

     Post a reply
     

 Messages from 3000 to 3150: To the input form 
<< Newest messages | < Newer messages | To the input form | Older messages > | Oldest messages >>


Back to the homepage

© baseportal.com. All rights reserved. Terms of use



baseportal.com