0

I am trying to call a function from another file (they are however placed in the same folder), but it doesn't work, I get the error messege "four_sprint_selection is not a function". I don't know why?

Heres my code in the first file:

<div class="select">
        <table>
            <tr>
                <td>4Sprint</td>
                <td>
                    <select id="four_sprint_selection" onchange="four_sprint_selection(value)">
                        <option>Select</option>
                        <option value = next>Next</option>
                </td>
            </tr>
        <table>
    </div>

In the other file (functions.js), i have this code:

function four_sprint_selection(val){
    if (val = "next" ){document.write(This is next big sprint)}

}

If i use require it just prints out the code in text.

e.klara.k
  • 369
  • 1
  • 6
  • 17

0 Answers0