Rockonmetal
10-01-2007, 10:59 PM
Ok, just to put it out there. I am awful at javascript... seriously...
I have this form where users can create a new page...
This is where the user selects what type of page he would like to create.
<p>
<label for="pType">Page Type:</label>
<select name="pType">
<option value="HTML">HTML</option>
<option value="PHP">PHP</option>
</select>
</p>
I would like to have it so when the user selects HTML it adds .html where .ext is:
<p>
<label for="pName">Page Name:</label>
<input type="text" name="pName" />.ext
</p>
If user selects PHP then it adds .php to the same place.
I don't know how todo this at all as I mentioned at top...
I haven't used javascript in a long time, like 5 months, and I didn't even really know it then...
Thanks to all who help!
I have this form where users can create a new page...
This is where the user selects what type of page he would like to create.
<p>
<label for="pType">Page Type:</label>
<select name="pType">
<option value="HTML">HTML</option>
<option value="PHP">PHP</option>
</select>
</p>
I would like to have it so when the user selects HTML it adds .html where .ext is:
<p>
<label for="pName">Page Name:</label>
<input type="text" name="pName" />.ext
</p>
If user selects PHP then it adds .php to the same place.
I don't know how todo this at all as I mentioned at top...
I haven't used javascript in a long time, like 5 months, and I didn't even really know it then...
Thanks to all who help!