I began to study JavaScript
, and this problem blocked me. Look at this:
<script>
$(function () {
$.connection.hub.start().done(function () {
});
});
</script>
<script type="text/javascript" gwd-events="handlers">
window.gwd = window.gwd || {};
gwd.boardSelectionChanged = function(event) {
var carousel = document.getElementById("mediaCarousel");
var index = carousel.currentIndex;
};
</script>
in the first script I'm trying to connect to the server. in the second script, the user can select an image.
I want to pass index
from the second script to a function inside the first to send it to the server.
How to define a function in the first and what to call it? thank.
source
share