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...:love:
QUESTION regarding getting values on forms
Started by hardinera, Mar 08 2010 10:03 PM
3 replies to this topic
#1
Posted 08 March 2010 - 10:03 PM
|
|
|
#2
Posted 09 March 2010 - 12:07 AM
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
Posted 09 March 2010 - 02:33 AM
You mean get the data from a database and automaticly insert it into the textbox/area?
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!
<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!
<?php echo stripslashes($row['body']); ?>
#4
Posted 09 March 2010 - 05:43 PM
weeeeeee..jpg 45.53K
15 downloadsthe 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 -.-
Edited by hardinera, 10 March 2010 - 11:49 PM.


Sign In
Create Account


Back to top









