Quantcast
Channel: Moodle for mobile
Viewing all articles
Browse latest Browse all 8344

Re: How underscore works for dropdown?

$
0
0
by Nitu Dhaka.  

Hi,

Ok I got your point. I don't need to call the route, I can also call the function by event only. But I already told you this framework is new to work for me. Can you please tell me where I need to attach this event? Actually I tried at my end I attach this event in main.js of forumrating. Below is the description of my directory structure

forum/

discussionposts.html  (here I am creating the dynamic dropdown. This template is displaying link of reply after click that a pop up opened for posting a reply.)

discussions.html (This template is displaying the list of discussions in a particular forum)

forums.html (This template is displaying the list of forum)

main.js (This js calling the web services for displaying the list of forum and the discussions)

 

forumpost/

main.js (This js is calling the web services for updating the database for new posted reply)

forumrating/

main.js (This js is calling the web service for updating the database for new rate on a particular post)

 

Here forumrating/main.js I am writing the event. I got attached but its not working. I firstly write an alert within event function. and no alert is coming out. Is there any template or protocol to call this event.?

Yet  I got the template of everything eg for posting the reply I used the send a message template. But for rating there is no template to follow. And that is why I am blank here. Please guide me here. Is there anything that I can follow else tell me atleast how should I do it? And also share some documentation which can help me to work out.

 

This is to code that I write in main.js for a event. In main.js I commented the route and replace with event. Is it the write process to do?
$(".rate").on('change', function() {

alert('this is to check');
});

 


Viewing all articles
Browse latest Browse all 8344

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>