html drop down, split java, url links

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP


html drop down, split java, url links



I have been using drop down menu in a form and the data is split up and presented.
only 1 data point given and where it says stats I amy what to put URL's.



however I want to do the same sort of think but with URL links.



My drop down list would be neighbourhoods, the data will then be split into boxes.


<form id="form1" name="form1" method="post" action="none" >
<table width="96%">
<tr>
<th colspan="4"> <input type="hidden" name="base" id="base" value="System 1">
<h1>Neighbourhood Crime Links</h1>
</th>
</tr>
<tr>
<td class="calc_dropbox" colspan="2">Select Option</td>
<td class="calc_dropbox" colspan="2"> <select name="starterkit" id="starterkit" class="dropdown" onChange="calc(1);">
<option value="0|Please Select|||||||start">Please Select Option</option>
<option value="1|2|stats|stats1|stats2|stats4|stats5|neighbourhood">option1</option>

</select> </td>
</tr>

<tr id="kit" class="kit" style="display:">
<th class="Panel" colspan="1">Neighbourhood:</th>
<th class="Panelname" colspan="2"><span id ="Neighbourhood"></span></th>
<th class="Panelprice" colspan="1"><span id="Neighbourhood1"></span></th>
</tr>
<tr id="kit" class="kit" style="display:">
<td class="items">Link 1:</td>
<td class="items2"><span id ="Neighbourhood2"></span></td>
<td class="items">Link 2:</td>
<td class="items2"><span id ="Neighbourhood3"></span></td>
</tr>
<tr id="kit" class="kit" style="display:">
<td class="items">Link 3:</td>
<td class="items2"><span id ="Neighbourhood4"></span></td>
<td class="items">Link 4:</td>
<td class="items2"><span id ="Neighbourhood5"></span></td>
</tr>
<tr id="kit" class="kit" style="display:">
<td class="items">Link 5:</td>
<td class="items2"><span id ="Neighbourhood6"></span></td>
<td class="items">Link 6:</td>
<td class="items2"><span id ="Neighbourhood7"></span></td>
</tr>
<tr>
<td>
<!-- <input type="submit" name="Submit" value="Order Now" /> -->
</td>
</tr>
</table>
</form>

//java:-

calc = function (e) {
var t = document.getElementById ("starterkit").value.split("|");

n += t[0] * 1;

document.getElementById("Neighbourhood").innerHTML = "" + t[0];
document.getElementById("Neighbourhood1").innerHTML = "" + t[0];
document.getElementById("Neighbourhood2").innerHTML = "" + t[1];
document.getElementById("Neighbourhood3").innerHTML = "" + t[2];
document.getElementById("Neighbourhood4").innerHTML = "" + t[3];
document.getElementById("Neighbourhood5").innerHTML = "" + t[4];
document.getElementById("Neighbourhood6").innerHTML = "" + t[5];
document.getElementById("Neighbourhood7").innerHTML = "" + t[6];
document.getElementById("Neighbourhood8").innerHTML = "" + t[7];

if (t[8] == "start") {

var r = document.getElementsByClassName("Neighbourhood");
for (var i = 0; i < r.length; i++) {
r[i].style.display = ""
}
}


if (t[8] == "Neighbourhood") {

var r = document.getElementsByClassName("kit");
for (var i = 0; i < r.length; i++) {
r[i].style.display = ""
}
}

}





The problem is the data doesn't display at all, so its not been taken split and pulled back in. just not sure what I am missing or where I should start looking on this one.
– MadWayne
12 mins ago




1 Answer
1



I think you split the values from dropdown.
you can loop it and use split function






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Makefile test if variable is not empty

Will Oldham

'Series' object is not callable Error / Statsmodels illegal variable name