this.value is easier.
Have you checked that sub_cat_selector.php is being invoked? With the right ID? And is correctly doing whatever it's supposed to be doing?
And actually that may be the problem...
<select name="top_cat<?php echo $r['product_id'];?>" id="top_cat<?php echo $r['product_id'];?>" class="top_cat">
MyAjaxRequest(this.id.replace(/top_cat/, "sub_cat_selector"), "sub_cat_selector.php?id=" + this.value);
Edited by requinix, 05 February 2013 - 08:37 PM.
Monkeys on typewriters may have a hard time writing Shakespeare, but they sure had no problem writing IP.Board.