Easy Application; A great code]Ok, this is my first proper code! Hope you like it!
What it does: Makes filling in applications really easy!
PREVIEW: Here ( just go to auto application, then click new topic)
First add this to where ever you want the application form to go:
- Quote:
-
<div id="applic">
<div class="tableborder">
<div class="maintitle">Application Form</div>
<table width="100%" cellspacing="1" cellpadding="0" border="1" bordercolor="#424A51">
<tr class="row2">
<td width="35%">Name:
<td><input type="text" id="rname">
<tr class="row2">
<td>Age:
<td><input type="text" id="age">
<tr class="row2">
<td>Combat Level:
<td><input type="text" id="cblvl">
<tr class="row2">
<td>Total Level:
<td><input type="text" id="ttllvl">
<tr class="row2">
<td>Combat Type:
<td><select id="cbtyp">
<option value="Melee">Melee</option>
<option value="Mage">Mage</option>
<option value="Range">Range</option>
<option value="All Rounder">All Rounder</option>
<tr class="row2">
<td>Member:
<td><select id="mem">
<option value="No">No</option>
<option value="Yes">Yes</option></select>
<tr class="row2">
<td>Gender:
<td><select id="gend">
<option value="Male">Male</option>
<option value="Female">Female</option></select>
<tr class="row2">
<td>Favourite Skill:
<td><input type="text" id="skillf">
<tr class="row2">
<td>Highest Skill:
<td><input type="text" id="skillh">
<tr class="row2">
<td>Will you come the events?
<td><select id="attend">
<option value="I will">Yes</option>
<option value="I will not">No</option></select>
<tr class="row2">
<td>Runescape History:<br><i>Eg, when you started, why you started, etc</i>
<td><textarea cols="40" rows="5" id="hist"></textarea>
<tr class="row2">
<td>Other accounts:<br><i>Name and skill please, one per line</i>
<td><textarea cols="40" rows="5" id="accs"></textarea>
<tr class="row2">
<td>Orange word from rules:
<td><input type="text" id="second">
<tr class="row2">
<td colspan="2" align="center"><input type="button" onclick="frog()" value="Post my Application">
</table>
<script>
applic.style.display="none";
if (location.href.match("act=Post&CODE=00&f=4")) {
applic.style.display="block";
}
</script>
</div>
</div>
Then this to the footers:
- Quote:
-
<script>
function frog() {
var userlinks = document.getElementById('userlinks');
var user = userlinks.getElementsByTagName('A')[0].innerHTML;
if(userlinks.innerHTML.match(/Guest/)){
namet = "Guest";
}
else if(userlinks.innerHTML.match(/Logged/)){
namet = user ;
}
var k = "\n";
forms=document.forms['REPLIER'];
forms.TopicTitle.value = "Application: " + namet; forms.Post.value = "Real Name: " + rname.value + k + "Age: " + age.value + k + "Combat level: " + cblvl.value + k + "Total level: " + ttllvl.value + k + "Combat type: " + cbtyp.value + k + "Gender: " + gend.value + k + "Favourite Skill: " + skillf.value + k + "Highest Skill: " + skillh.value + k + k + attend.value + " attend the events." + k + k + "History: " + k + hist.value + k + k + "Other accounts:" + k + accs.value + k + k + second.value;
forms.submit.click() ;
}
</script>
Now change the stuff in
purple to the the names you want them to have
Change the words in
red to the title you want to give the application form
Change the value in
blue to the bored color you want for you application form, a made it fit with style sheet as much as possible.
Change the number in
orange to the page you want the application to be shown on
All you do now is fill it in and click on Post my application and it posts for you!
You can change all the types of input (check boxes, textarea etc) if you want, and i know this is not a noob friendly guide! I will update it when i have time!
EDIT: Small type-o now fixed, when you clicked post, combat level came up undefinded, and something stupid came up for favourite skill, NOW FIXED!