I’m very happy that a lot of developers have found my cvLinkSelect class and found it useful. cvLinkSelect is a simple Mootools 1.2 class that links form select elements based on the previous value via JSON requests. The php part was very basic though and a visitor pointed me to write the php part better, shorter and more functional. And here we are, just a simple 10 line php function.
In most cases you’ll get the data from a SQL database or something like that and in therefore it’s an array.
/* $arr = array from the database */
$arr = array(//array(id,name),
array(15,'15 inch'),
array(17,'17 inch'),
array(19,'19 inch')
);
Continue Reading »
A while ago I was figuring out how to rewrite GET variables for a wordpress plugin. For example:
http://mysite.com/mypage/?myvar=test
rewriting to
http://mysite.com/mypage/test
After a long search on the WordPress forums and the whole internet I’ve found this topic: using an extra parameter in an URL but it wasn’t very sufficient in my opinion. So that’s why I’ll explain the use of multiple parameters in the url.
Continue Reading »
Yesterday I’ve published the first version of the cvLinkSelect class for Mootools 1.2. Today I’ve released the new version of this nifty little class. I’ve completed the class with several finishing touches!
View example Download file
Changes
- Multiple GET variables in the request url.
- After a page refresh the script checks if the first linked selectbox option is not empty. If it isn’t empty the first request fires.
- If the request is empty it’s the last item in the linked selectboxes range. In this case we have to fire the isLast function.
Read more about the usage on the original post for the cvLinkSelect class!
Enjoy!