+ Reply to Thread
Results 1 to 4 of 4

Thread: QUESTION regarding getting values on forms

  1. #1
    Learning Programmer hardinera is an unknown quantity at this point hardinera's Avatar
    Join Date
    Jul 2009
    Posts
    43

    Question QUESTION regarding getting values on forms

    QUESTION : is it possible to get data on a form without clicking a button? like auto get the value and auto checking the value inside it? i don't know the proper word for this.. like the check box.. if checked and unchecked -.-

    i just want to disable some fields based on he selected value... i'm using menu box by the way.

    thanks for anyone who can answer me...

  2. #2
    Speaks fluent binary zeroradius will become famous soon enough zeroradius's Avatar
    Join Date
    Feb 2008
    Location
    Ohio
    Posts
    1,004

    Re: QUESTION regarding getting values on forms

    yes it is. I have not done it myself but i can tell you that you will use javascript (posibly ajax which is a technique for javascript but id say you would probably be fine with regular javascript) you will want to use the onblur event, it trigers when you lose focus on a control (click out of it). If you have it run a function that checks the values of the filed that just lost focus (blured) and than hides or shows various controls based on the results using getElementById. Sorry that I can't be more help but i just started javascript.

  3. #3
    Programmer Bioshox is on a distinguished road
    Join Date
    Oct 2009
    Location
    Manchester, UK
    Posts
    143

    Re: QUESTION regarding getting values on forms

    You mean get the data from a database and automaticly insert it into the textbox/area?

    Code:
    <form action='updateabout.php' method='post'>
    <h3>Body:</h3> 
    <textarea name="content" rows="15" cols="50" ><?php echo stripslashes($row['body']); ?></textarea>
    <br>
    <input type='submit' name='submit' value='Edit Page' />
    </p>
    Make sure you already have the query running before this HTML but Basicly all you need to do is add this imbetween the textarea tags!

    Code:
    <?php echo stripslashes($row['body']); ?>

  4. #4
    Learning Programmer hardinera is an unknown quantity at this point hardinera's Avatar
    Join Date
    Jul 2009
    Posts
    43

    Re: QUESTION regarding getting values on forms

    QUESTION regarding getting values on forms-.jpg
    the form is kinda like this... and based on the selected date... the items inside the menu box will be disabled... is this possible or not?

    based on the dates selected and room... it will count how many reservations are.

    like in visual basic for example... can auto compute even without clicking any button.. kinda like that -.-
    Last edited by hardinera; 03-10-2010 at 11:49 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. Replies: 34
    Last Post: 10-08-2008, 04:03 AM
  2. Win Forms question
    By bogus in forum C# Programming
    Replies: 7
    Last Post: 09-03-2008, 10:48 AM
  3. attribute values question
    By skilletsteve in forum HTML Programming
    Replies: 1
    Last Post: 09-30-2006, 05:37 AM
  4. Using variables in different forms question
    By skilletsteve in forum Visual Basic Programming
    Replies: 2
    Last Post: 08-31-2006, 07:39 AM
  5. Windows Forms MDI question.
    By hoser2001 in forum C# Programming
    Replies: 10
    Last Post: 08-11-2006, 03:36 PM