Posts

Showing posts from December, 2017

Upload Image in Meteor

Image
Hi, Check this post, if you want to know how to upload image in metoer... JS On Client import { Template } from 'meteor/templating'; import { ReactiveVar } from 'meteor/reactive-var'; import Images from '/lib/images.collection.js'; import './main.html'; Template.uploadedFiles.helpers({   uploadedFiles: function () {     return Images.find();   } }); Template.uploadForm.onCreated(function () {   this.currentUpload = new ReactiveVar(false); }); Template.uploadForm.helpers({   currentUpload: function () {     return Template.instance().currentUpload.get();   } }); Template.uploadForm.events({   'change #fileInput': function (e, template) {     if (e.currentTarget.files && e.currentTarget.files[0]) {       // We upload only one file, in case       // there was multiple files selected       var file = e.currentTarget.files[0];       if (file) {         var uploadInstance = Images.insert({           file: file,

Blaze selected attribute not working - Alternative Solution

Image
In this post, I will guide you through an alternative solution for the issue we all had faced at least once with DROPDOWNS. Being an newbee I would like to show what I did then Problem is concerned with make a particular item selected in dropdown when dropdown shows up, We are using Meteor with Blaze What We Tried Step : Creating Helpers. <select id="last_used_edit">        <option value="" disabled selected>Year</option>  <option value="1"  selected="{{option3Selected 'Option 1'}}"  >Option 1</option>  <option value="2"  selected="{{option3Selected 'Option 2'}}"  >Option 2</option>  <option value="3" selected="{{option3Selected 'Option 3'}}"  >Option 3</option>  <option value="4" selected="{{option3Selected 'Option 4'}}" >Option 34</option>   </select> Step

Capture click event on Checkbox

Image
 'click #check_education_edu_2':function(){     if(document.getElementById("check_education_edu_2").checked){     alert("Checked");     }else{     alert("UnChecked"); q     }

Semantic UI dropdown not working Meteor

Image
< select id= "edit_start_month" > < option value disabled selected > --Select Month-- </ option > < option value= 'Jan' {{ start_date_month_one }} > Jan </ option > < option value= 'Feb' {{ start_date_month_two }} > Feb </ option > < option value= 'Mar' {{ start_date_month_three }} > Mar </ option > < option value= 'Apr' {{ start_date_month_four }} > Apr </ option > < option value= 'May' {{ start_date_month_five }} > May </ option > < option value= 'Jun' {{ start_date_month_six }} > Jun </ option > < option value= 'Jul' {{ start_date_month_seven }} > Jul </ option > < option value= 'Aug' {{ start_date_month_eight }} > Aug </ option > < option value= 'Sep' {{ start_date_month_nine }} > Sep </ option > < option value= 'Oct' {{ start_date_month_ten }}