Skip to main content

Thread: Javascript dropdown text


ok, first off javascript knowledge minimal @ best trying learn. here problem:

running dropdown menu options this
code:
<select name="menu" style="font-family:'arial';color:#0066cc;background-color:#ffffff;font-size:10pt;"> <option value="">choose one-</option> <option value="guarantee.tpl">our guarantee</option> <option value="green.tpl">green</option> <option value="packaging.tpl>packaging</option> <option value="card.tpl">gift cards</option> </select> <input type="button" onclick???????? value="go!"> </form>
what want have template files load below dropdown menu is. way, can have single page contains content selected drop down menu.

problem having things have found have content load in new page/tab. ideas on how this.

.tpl files html templates used
code:
{include file="template.tpl"}

if using scripting language php, can like;

php code:
$selectoptions file_get_contents(/path/to/your/tpl/file.tpl); 
and in html:

php code:
<select>
     <option></option>
     <?php print $selectoptions?>
</select>


Forum The Ubuntu Forum Community Ubuntu Specialised Support Development & Programming Programming Talk Javascript dropdown text


Ubuntu

Comments