-
Static means "constant - never changing".
Dynamic is can be changed.
By hardcoding a static value like value="somevalue". The value will always be "somevalue". Where as using a language like PHP and setting the value to a variable (vary-able - the value can vary) you can have the value change depending on different conditions.
example.
Code:
if($day == 'monday') $somevariable = 'Today is Monday';
else $somevariable = 'Today is not Monday';
echo $somevariable;
lets say we have a variable called $day which returns the current day. If the value of $somevariable is monday, the above script will print 'Today is Monday' - If it is not Monday the above script will print out 'Today is not Monday'.
This is how we work dynamicaly. I hope that clears that up, if not i'll be happy to explain in yet more detail at a later time.
What you're refering to about popups and stuff sounds like the HTML attribute title="some title" <- Thus will give a sort of popup when hovered over saying some title. value="some value" has nothing to do with popups, but sets the default value of an element. Ever loaded a form up where some of the fields are already filled out? Edited a comment on here? The value attribute is what is used to preload the input value of the given field in the form. It's loaded dynamicaly from a database and stored in a variable. Similar to $eid.
-
Ya thats what I am saying .
SAy you have text box called empid ,then what is the utility
of having filled a textbox with value (variable or static) when u r going to overwrite it everytime with some other value?
I mean ,maybe i am not clear yet with basic html,but what is the use?
you people are not getting my point at all!! :rolleyes:
A value already filled inside a blank text box is of no use,coz ultimately you have to type something inside it a textbox and then u click submit button.
I cant get why u fill textbox with some value
-
If you want a default value for the textbox.
For example:
1. The user filled out the form, but had one error. You can leave the correct values, so they don't have to fill out the entire form again.
2. You are retrieving a database record and putting the values into the form so they can be edited. (I would imagine that this is what is going on in your original post.)
... lots of other possibilities. everyone's trying to help you here; just take a moment to clarify what it is you actually want to know.