I have a profile file, below are the content <?php class user_system_specs extends z_module { function contents() { $content = $this->content; $html .= '<div class="' . $this->style['pmain2'] . '"><a href="' . $this->_zoints->url('blocks', 'cmd=editmod&modid=' . $this->linkid) . '">' . ($this->powner ? __('<b>Add/Edit</b>') : __('')) . '</a></div>'; $html .= ($content[country] ? '<div class="' . $this->switch_bg() . '"><strong>Country:</strong> ' . @htmlspecialchars($content[country]) . '</div>' : ''); $html .= ($content[university] ? '<div class="' . $this->switch_bg() . '"><strong>University:</strong> ' . @htmlspecialchars($content[university]) . '</div>' : ''); return $html; } function edit() { $content = $this->content; $html .= '<div class="pmain1">'; $html .= 'Country:<br /> <fieldset> <legend>Country Name</legend> <div> <select class="input" name="mod[content][country]"> <option value=""> </option> <option value="Argentina">Argentina</option> <option value="Brazil">Brazil</option> <option value="United Kingdom">United Kingdom/option> <option value="United States">United States</option> </select> </div> </fieldset><br />'; $html .= 'University:<br /> <fieldset> <legend>University Name</legend> <div> <select class="input" name="mod[content][university]"> <option value=""> </option> <option value="Cambridge">Cambridge</option> <option value="Harvard">Harvard</option> <option value="MIT">MIT</option> <option value="Princeton">Princeton</option> </select> </div> </fieldset><br />'; $html .= '</div>'; return $html; } function update($content) { return $content; } } ?> PHP: Here are the edit page screenshot normally, user choosing they Country and University the output screenshot normally, after user choosed the drop down, are like this Now, i want more specific Not only Country, but States too and Not only University, but the Faculty too i can put all of them in a page, but it will make the page are very heavy, there should be thousands drop down lines for States and Faculty list so maybe the solution is using sub dropdown onclick when choosing Country, it will opening all States from that country, and when choosing University, it will opening all Faculty from that university, for example like this the output example maybe you can use ajax or other thing, so user no need to load states and faculty that they dont need, so very less size page Nb. - The choosen line are saved in mysql, but for the list we can put it just in a file, like file above, or in few files - You must set selected too after that, so when user edit the profile again, the drop down are selected with the line that they choosed - $50 if you can do this, if needed i will give you ftp details
Why wouldn't you just lighten up your code and pull the results from a database. When using javascript the way you are it will turn into a very large file and unless you compress it then it will hurt your seo ratings. Pulling from the database may also be much quicker because it would use straight PHP rather then having to load hundreds of lines of javascript.