Function in javascript

Asked

Viewed 34 times

1

Colleagues.

I have a file called somar.js that I’m calling from on the page index that way:

 <script src="js/somar.js"></script>

The file exists and is correctly inside the folder on the server, but when I put the command below in the file add.js:

function soma(){
    alert('OK...vamos continuar');
.......

It doesn’t seem to work. I am calling this file as follows on the index page:

<select name="QtdAcomodacaoS" id="QtdAcomodacaoSingle" class="form-control" style="width:130px" onchange="soma()">

Is it because you are using bootstrap, could be generating some conflict? I put before the body.

1 answer

2


  • 1

    Thank you Diego. It worked.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.