Page 1 of 1
Runtime Validation
Posted: Wed Oct 10, 2007 6:23 am
by ashrafzia
Hi Gurus!
I wana do some runtime validation. For example, i have a form with some check boxes.
like :
Select Toys Cat : Airoplanes checkbox1, Cars checkbox2
if someone checks airoplanes then
all different types of airoplanes names should come in a multiple selection listbox below in the following format.
Suppose:
Selected toys : fighter plane
resuce plane
passenger plane etc.....
Any idea! How can i do this thing.
If this thing was to be done in a software like Vb.net etc then it was a piece of cake, i m wondering how can i do such thing in php???
Posted: Wed Oct 10, 2007 8:46 am
by Stryks
Runtime? You mean, without page reload?
Take a gander at
this thread
Posted: Wed Oct 10, 2007 9:00 am
by aceconcepts
If you dont mind using a page reload method then you could use pure PHP in order to display sub cats.
Create a query based on the selected value form a <select> list. Then run a loop to get the associated sub categories.
If you don't want to have to 'click' a button to get the sub cats then you're gonna have to use js etc...
Posted: Wed Oct 10, 2007 1:33 pm
by ashrafzia
Stryks wrote:Runtime? You mean, without page reload?
Take a gander at
this thread
Yes, i do mean, without page reload, THanks for the link, i have tried it, but its for list box and i want to use a check box instead of list box.
2ndly its ajax and i want to use pure PHP for it.
Posted: Wed Oct 10, 2007 1:35 pm
by ashrafzia
aceconcepts wrote:If you dont mind using a page reload method then you could use pure PHP in order to display sub cats.
Create a query based on the selected value form a <select> list. Then run a loop to get the associated sub categories.
If you don't want to have to 'click' a button to get the sub cats then you're gonna have to use js etc...
Yes, thats what i want. If you don't mind, Could [s]u[/s]
you [s]plz[/s]
please gimme an example or code for it ?
Thanks in Advance
[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1 wrote:11. Please use proper, complete spelling when posting in the forums. AOL Speak, leet speak and other abbreviated wording can confuse those that are trying to help you (or those that you are trying to help). Please keep in mind that there are many people from many countries that use our forums to read, post and learn. They do not always speak English as well as some of us, nor do they know these aberrant abbreviations. Therefore, use as few abbreviations as possible, especially when using such simple words.
Some examples of what not to do are ne1, any1 (anyone); u (you); ur (your or you're); 2 (to too); prolly (probably); afaik (as far as I know); etc.
Posted: Wed Oct 10, 2007 1:48 pm
by John Cartwright
You said you wanted it without a page reload (Ajax), then your next post you said you wanted it with a page reload.. which one is it?
Posted: Thu Oct 11, 2007 4:19 am
by ashrafzia
Jcart wrote:You said you wanted it without a page reload (Ajax), then your next post you said you wanted it with a page reload.. which one is it?
Sorry, i wanted it without a page reload (Ajax). My apologies.