I have a small issue. I created a select box on my index page, where users should be able to select a link to go to an external website. This external url should not open in another tab, but inside my project. The values in this select box are pulled out of a database dynamically (that works fine). The issue I am facing now is when I click on the link name inside the select box, the redirect fails and shows that that method does not exist in my controller.
My code so far in my index :
<label for="externallink" class="control-label">External Links</label>
<select id="externallink" name="externallink" onchange="this.options[this.selectedIndex].value && (window.location = this.options[this.selectedIndex].value);">
<option value="0">-Select Link-</option>
</select>
How it looks when I open the source of my page :
<select id="externallink" name="externallink" class="form-control form-control-sm" onchange="this.options[this.selectedIndex].value && (window.location = this.options[this.selectedIndex].value);"><option value="">-Select Link-</option><option value="www.google.de">google</option><option value="www.youtube.com">Youtube</option></select>
Does anyone have an idea how to fix this, please ? Any help is much appreciated !
Kind regards