Chapter:

web-page-designing-html-important-questions

Where do you place tag in HTML ? </div> </h1> <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-2458190087035040" crossorigin="anonymous"></script> <!-- ads sagar --> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-2458190087035040" data-ad-slot="3064636059" data-ad-format="auto" data-full-width-responsive="true"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> <!-- more and less answer portion starts--> <div class="collapse show" id="chapter146340" style="margin-left: -15px;"> <p class="mb-0"> <form> <div class="form-group"> <div class="custom-switches-stacked mt-2"> <label class="custom-switch"> <input type="radio" name="option146340" value="a" class="custom-switch-input" oninput="selec(this.value,'c','146340')"> <span class="custom-switch-indicator" id="option1indicator146340"></span> <span class="custom-switch-indicator" id="option1indicatorerror146340" style="display: none;background-color:red;"></span> <span class="custom-switch-description">Base</span> </label> <label class="custom-switch"> <input type="radio" name="option146340" value="b" class="custom-switch-input" oninput="selec(this.value,'c','146340')"> <span class="custom-switch-indicator" id="option2indicator146340"></span> <span class="custom-switch-indicator" id="option2indicatorerror146340" style="display: none;background-color:red;"></span> <span class="custom-switch-description">Body</span> </label> <label class="custom-switch"> <input type="radio" name="option146340" value="c" class="custom-switch-input" oninput="selec(this.value,'c','146340')"> <span class="custom-switch-indicator" id="option3indicator146340"></span> <span class="custom-switch-indicator" id="option3indicatorerror146340" style="display: none;background-color:red;"></span> <span class="custom-switch-description">Head</span> </label> <label class="custom-switch"> <input type="radio" name="option146340" value="d" class="custom-switch-input" oninput="selec(this.value,'c','146340')"> <span class="custom-switch-indicator" id="option4indicator146340"></span> <span class="custom-switch-indicator" id="option4indicatorerror146340" style="display: none;background-color:red;"></span> <span class="custom-switch-description">a and c</span> </label> </div><br> <h5 class="mb-0" id="answer146340" style="display: none;"> Head</h5> <div id="hint146340" style="display: none;"> <p></p> </div> <div class="buttons"> <a href="#" class="btn btn-dark" onclick="return ShowAnswer(146340)">Answer</a> </div> </div> </form> </p> </div> <div class="card"> <!-- js code inside here to display questions required as per user--> <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-2458190087035040" crossorigin="anonymous"></script> <ins class="adsbygoogle" style="display:block; text-align:center;" data-ad-layout="in-article" data-ad-format="fluid" data-ad-client="ca-pub-2458190087035040" data-ad-slot="9808846991"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> <div class="col-12 col-md-12 col-lg-12"> <div class="card" style="margin-left: -30px;"> <div class="card-header"> <a href="/question.php?id=62a9d8fa50798" class="btn btn-icon icon-left btn-primary"><i class="fa fa-arrow"></i> Previous Question</a> <div class="card-header-action"> <a href="/question.php?id=62a9d8fa5093c" style="position: absolute; right:2px;top:20px;" class="btn btn-icon icon-left btn-primary">Next Question</a> </div> </div> </div> </div> </div> <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-2458190087035040" crossorigin="anonymous"></script> <!-- vertical ads --> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-2458190087035040" data-ad-slot="3759864844" data-ad-format="auto" data-full-width-responsive="true"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> </div> <div class="col-md-4"> <div class="card card-hero"> <div class="card-header"> <div class="card-icon"> <i class="fa fa-question-circle"></i> </div> <h4>All Chapters</h4> <div class="card-description">View all Chapter and number of question available From each chapter from Basic-Computer </div> </div> <div class="card-body p-0"> <div class="tickets-list" id="show_course_in_syllabus"> <a href="/chapter.php?course=Basic-Computer&&chapter=Basic-Computer-mcqs&&id=6205c5fb62f31" class="ticket-item"> <div class="ticket-title"> <h4>Basic Computer mcqs</h4> </div> <div class="ticket-info"> <div></div> <div class="bullet"></div> <div class="text-primary">Basic Computer mcqs</div> </div> </a><a href="/chapter.php?course=Basic-Computer&&chapter=Basic-Computer-mcqs&&id=62a9cd91c96a4"><a href="/chapter.php?course=Basic-Computer&&chapter=computer-fundamentals-mcq&&id=62a9ccd684696" class="ticket-item"> <div class="ticket-title"> <h4>computer-fundamentals-mcq</h4> </div> <div class="ticket-info"> <div></div> <div class="bullet"></div> <div class="text-primary">computer-fundamentals-mcq</div> </div> </a><a href="/chapter.php?course=Basic-Computer&&chapter=computer-fundamentals-mcq&&id=62a9cd91c96a4"><a href="/chapter.php?course=Basic-Computer&&chapter=windows-operating-system-mcq&&id=62a9cceddeddb" class="ticket-item"> <div class="ticket-title"> <h4>windows-operating-system-mcq</h4> </div> <div class="ticket-info"> <div></div> <div class="bullet"></div> <div class="text-primary">windows-operating-system-mcq</div> </div> </a><a href="/chapter.php?course=Basic-Computer&&chapter=windows-operating-system-mcq&&id=62a9cd91c96a4"><a href="/chapter.php?course=Basic-Computer&&chapter=microsoft-word-important-questions&&id=62a9cd023bc81" class="ticket-item"> <div class="ticket-title"> <h4>microsoft-word-important-questions</h4> </div> <div class="ticket-info"> <div></div> <div class="bullet"></div> <div class="text-primary">microsoft-word-important-questions</div> </div> </a><a href="/chapter.php?course=Basic-Computer&&chapter=microsoft-word-important-questions&&id=62a9cd91c96a4"><a href="/chapter.php?course=Basic-Computer&&chapter=spreadsheet-excel-imp-mcq&&id=62a9cd1b5b228" class="ticket-item"> <div class="ticket-title"> <h4>spreadsheet-excel-imp-mcq</h4> </div> <div class="ticket-info"> <div></div> <div class="bullet"></div> <div class="text-primary">spreadsheet-excel-imp-mcq</div> </div> </a><a href="/chapter.php?course=Basic-Computer&&chapter=spreadsheet-excel-imp-mcq&&id=62a9cd91c96a4"><a href="/chapter.php?course=Basic-Computer&&chapter=presentation-system-power-point-mcq&&id=62a9cd74da8c7" class="ticket-item"> <div class="ticket-title"> <h4>presentation-system-power-point-mcq</h4> </div> <div class="ticket-info"> <div></div> <div class="bullet"></div> <div class="text-primary">presentation-system-power-point-mcq</div> </div> </a><a href="/chapter.php?course=Basic-Computer&&chapter=presentation-system-power-point-mcq&&id=62a9cd91c96a4"><a href="/chapter.php?course=Basic-Computer&&chapter=web-page-designing-html-important-questions&&id=62a9cd91c96a4" class="ticket-item"> <div class="ticket-title"> <h4>web-page-designing-html-important-questions</h4> </div> <div class="ticket-info"> <div></div> <div class="bullet"></div> <div class="text-primary">web-page-designing-html-important-questions</div> </div> </a><a href="/chapter.php?course=Basic-Computer&&chapter=web-page-designing-html-important-questions&&id=62a9cd91c96a4"><a href="/chapter.php?course=Basic-Computer&&chapter=database-system-very-important-mcq&&id=62a9cdb046e13" class="ticket-item"> <div class="ticket-title"> <h4>database-system-very-important-mcq</h4> </div> <div class="ticket-info"> <div></div> <div class="bullet"></div> <div class="text-primary">database-system-very-important-mcq</div> </div> </a><a href="/chapter.php?course=Basic-Computer&&chapter=database-system-very-important-mcq&&id=62a9cd91c96a4"><a href="/chapter.php?course=Basic-Computer&&chapter=Computer-Abbreviations&&id=668e023077935" class="ticket-item"> <div class="ticket-title"> <h4>Computer Abbreviations</h4> </div> <div class="ticket-info"> <div></div> <div class="bullet"></div> <div class="text-primary">Computer Abbreviations</div> </div> </a><a href="/chapter.php?course=Basic-Computer&&chapter=Computer-Abbreviations&&id=62a9cd91c96a4"><a href="/chapter.php?course=Basic-Computer&&chapter=Ms-Office&&id=668e024d00770" class="ticket-item"> <div class="ticket-title"> <h4>Ms Office</h4> </div> <div class="ticket-info"> <div></div> <div class="bullet"></div> <div class="text-primary">Ms Office</div> </div> </a><a href="/chapter.php?course=Basic-Computer&&chapter=Ms-Office&&id=62a9cd91c96a4"><a href="/chapter.php?course=Basic-Computer&&chapter=Hardware-and-Software&&id=668e02650a51e" class="ticket-item"> <div class="ticket-title"> <h4>Hardware and Software</h4> </div> <div class="ticket-info"> <div></div> <div class="bullet"></div> <div class="text-primary">Hardware and Software</div> </div> </a><a href="/chapter.php?course=Basic-Computer&&chapter=Hardware-and-Software&&id=62a9cd91c96a4"><a href="/chapter.php?course=Basic-Computer&&chapter=Basic-security-concepts&&id=668e028ae314a" class="ticket-item"> <div class="ticket-title"> <h4>Basic security concepts</h4> </div> <div class="ticket-info"> <div></div> <div class="bullet"></div> <div class="text-primary">Basic security concepts</div> </div> </a><a href="/chapter.php?course=Basic-Computer&&chapter=Basic-security-concepts&&id=62a9cd91c96a4"> </div> </div> </div> <div class="card card-hero"> <div class="card-header"> <div class="card-icon"> <i class="fa fa-question-circle"></i> </div> <h4>Similar Question</h4> <div class="card-description">This Chapter web-page-designing-html-important-questions consists of the following topics </div> </div> <div class="card-body p-0"> <div class="tickets-list"> <a href="#" onclick="return false;" class="ticket-item"> <div class="ticket-title"> <h4 > The <A> tag acts almost like the ?</h4> </div> </a> <a href="#" onclick="return false;" class="ticket-item"> <div class="ticket-title"> <h4> Where do you place <title> tag in HTML ? </h4> </div> </a> <a href="#" onclick="return false;" class="ticket-item"> <div class="ticket-title"> <h4> The tags which are required for every HTML page you create ? </h4> </div> </a> <a href="# Where do you place the <title> tag in HTML ?" onclick="return false;" class="ticket-item"> <div class="ticket-title"> <h4 id=" Where do you place the <title> tag in HTML ?"> Where do you place the <title> tag in HTML ?</h4> </div> </a><a href="#web-page-designing-html-important-questions" onclick="return false;" class="ticket-item"> <div class="ticket-title"> <h4 id="web-page-designing-html-important-questions">web-page-designing-html-important-questions</h4> </div> </a><a href="#Basic-Computer" onclick="return false;" class="ticket-item"> <div class="ticket-title"> <h4 id="Basic-Computer">Basic-Computer</h4> </div> </a> </div> </div> </div> </div> </section> </div> </div> </div> <div class="card" id="show_success_course_create" style="display:none;"> <div class="card-body text-center"> <div class="mb-2"></div> <button class="btn btn-primary" id="swal-2"></button> </div> </div> <div class="card" id="show_error_course_create" style="display:none;"> <div class="card-body text-center"> <div class="mb-2"></div> <button class="btn btn-primary" id="swal-3"></button> </div> </div> <div class="card" id="show_success_chapter_create" style="display:none;"> <div class="card-body text-center"> <div class="mb-2"></div> <button class="btn btn-primary" id="swal-4"></button> </div> </div> <div class="card" id="show_error_chapter_create" style="display:none;"> <div class="card-body text-center"> <div class="mb-2"></div> <button class="btn btn-primary" id="swal-5"></button> </div> </div> <div class="card" id="show_success_content_create" style="display:none;"> <div class="card-body text-center"> <div class="mb-2"></div> <button class="btn btn-success" id="swal-6"></button> </div> </div> <div class="card" id="show_error_content_create" style="display:none;"> <div class="card-body text-center"> <div class="mb-2"></div> <button class="btn btn-success" id="swal-7"></button> </div> </div> <div class="card" id="show_success_edit" style="display:none;"> <div class="card-body text-center"> <div class="mb-2"></div> <button class="btn btn-success" id="swal-8"></button> </div> </div> <div class="card" id="show_error_edit" style="display:none;"> <div class="card-body text-center"> <div class="mb-2"></div> <button class="btn btn-success" id="swal-9"></button> </div> </div> <div class="card" style="display:none;"> <div class="card-body text-center"> <div class="mb-2">Info Message</div> <button class="btn btn-primary" id="toastr-1">Launch</button> </div> </div> <div class="card" id="toastr-2-ok" style="display:none;"> <div class="card-body text-center"> <div class="mb-2"></div> <button class="btn btn-primary" id="toastr-2"></button> </div> </div> <!-- General JS Scripts --> <script src="/assets/bundles/lib.vendor.bundle.js"></script> <!-- JS Libraies --> <script src="/assets/modules/jquery.sparkline.min.js"></script> <script src="/assets/modules/owlcarousel2/dist/owl.carousel.min.js"></script> <script src="/assets/modules/summernote/summernote-bs4.js"></script> <script src="/assets/modules/chocolat/dist/js/jquery.chocolat.min.js"></script> <!-- Page Specific JS File --> <script src="/assets/modules/sweetalert/sweetalert.min.js"></script> <!-- Template JS File --> <script src="/js1/scripts.js"></script> <script src="/js1/custom.js"></script> <script src="/js/chapter1.js"></script> <script> $("#swal-2").click(function() { swal('Congratulations', 'Exam Submitted Successfully', 'success'); }); $("#swal-3").click(function() { swal('Sorry', 'Could not submit Now!!', 'error'); }); $("#swal-4").click(function() { swal('Congratulations', 'Chapter Inserted Successfully', 'success'); }); $("#swal-5").click(function() { swal('Sorry', 'Could not Insert Chapter Now!!', 'error'); }); $("#swal-6").click(function() { iziToast.info({ title: 'Congratulations!', message: 'Content added Successfully', position: 'topRight' }); }); $("#swal-7").click(function() { swal('Sorry', 'Could not Insert Content Now!!', 'error'); }); $("#swal-8").click(function() { swal('Superb-- Majja aagaya', 'Content Edited Successfully', 'success'); }); $("#swal-9").click(function() { swal('Sorry', 'Could not Edit Content Now!!', 'error'); }); $("#toastr-1").click(function() { iziToast.info({ title: 'Congratulations!', message: 'Course Created Successfully', position: 'topRight' }); }); $("#toastr-2").click(function() { iziToast.info({ title: 'Congratulations!', message: 'Exam Submitted Successfully. You can view the results from result section', position: 'topRight' }); }); function showoptions() { $('#op1').show(); $('#op2').show(); $('#op3').show(); $('#op4').show(); } function hideoptions() { $('#op1').hide(); $('#op2').hide(); $('#op3').hide(); $('#op4').hide(); } function addfriend(member_id, id) { var req1 = new XMLHttpRequest(); req1.open("GET", "/todo/add_friend_request.php?id=" + member_id, true); req1.send(); req1.onreadystatechange = function() { if (req1.readyState == 4 && req1.status == 200) { document.getElementById(id).innerHTML = req1.responseText; return false; } } } function games() { var req1 = new XMLHttpRequest(); req1.open("GET", "/todo/add_games.php", true); req1.send(); req1.onreadystatechange = function() { if (req1.readyState == 4 && req1.status == 200) { document.getElementById('refresh_content_theory').innerHTML = req1.responseText; var content = document.getElementById('refresh_content_theory'); //getting the content into mathform of certain div MathJax.Hub.Queue( ["Typeset", MathJax.Hub, content]); } } } function friends() { var loader = '<h2 class="h4"></h2><div class="ph-item"><div class="ph-col-12"><div class="ph-picture"></div><div class="ph-row"><div class="ph-col-6 big"></div><div class="ph-col-4 empty big"></div><div class="ph-col-2 big"></div><div class="ph-col-4"></div><div class="ph-col-8 empty"></div><div class="ph-col-6"></div><div class="ph-col-6 empty"></div><div class="ph-col-12"></div></div></div></div><h2 class="h4"></h2><div class="ph-item"><div class="ph-col-12"><div class="ph-picture"></div><div class="ph-row"><div class="ph-col-6 big"></div><div class="ph-col-4 empty big"></div><div class="ph-col-2 big"></div><div class="ph-col-4"></div><div class="ph-col-8 empty"></div><div class="ph-col-6"></div><div class="ph-col-6 empty"></div><div class="ph-col-12"></div></div></div></div>'; document.getElementById('refresh_content_theory').innerHTML = loader; var req1 = new XMLHttpRequest(); req1.open("GET", "/todo/friends.php", true); req1.send(); req1.onreadystatechange = function() { if (req1.readyState == 4 && req1.status == 200) { document.getElementById('refresh_content_theory').innerHTML = req1.responseText; var content = document.getElementById('refresh_content_theory'); } } } function show_chapter(course_id) { //alert('ok'); var req1 = new XMLHttpRequest(); req1.open("GET", "/todo/add_games_data.php?course_id=" + course_id, true); req1.send(); req1.onreadystatechange = function() { if (req1.readyState == 4 && req1.status == 200) { var data = req1.responseText; window.location.replace('/games.php?id=' + data); } } } function show_all_asked_question(chapter_id) { var loader = '<h2 class="h4"></h2><div class="ph-item"><div class="ph-col-12"><div class="ph-picture"></div><div class="ph-row"><div class="ph-col-6 big"></div><div class="ph-col-4 empty big"></div><div class="ph-col-2 big"></div><div class="ph-col-4"></div><div class="ph-col-8 empty"></div><div class="ph-col-6"></div><div class="ph-col-6 empty"></div><div class="ph-col-12"></div></div></div></div><h2 class="h4"></h2><div class="ph-item"><div class="ph-col-12"><div class="ph-picture"></div><div class="ph-row"><div class="ph-col-6 big"></div><div class="ph-col-4 empty big"></div><div class="ph-col-2 big"></div><div class="ph-col-4"></div><div class="ph-col-8 empty"></div><div class="ph-col-6"></div><div class="ph-col-6 empty"></div><div class="ph-col-12"></div></div></div></div>'; document.getElementById('refresh_content_theory').innerHTML = loader; var req1 = new XMLHttpRequest(); req1.open("GET", "/todo/show_chapterwise_asked_questions.php?chapter_id=" + chapter_id, true); req1.send(); req1.onreadystatechange = function() { if (req1.readyState == 4 && req1.status == 200) { document.getElementById('refresh_content_theory').innerHTML = req1.responseText; var content = document.getElementById('refresh_content_theory'); //getting the content into mathform of certain div MathJax.Hub.Queue( ["Typeset", MathJax.Hub, content]); } } } function ask_question_user() { var form_data = new FormData(); $.ajax({ url: '/todo/ask_question_insert.php', type: 'POST', data: new FormData(document.getElementById('ask_question_by_student')), cache: false, contentType: false, processData: false, dataType: 'json' }) .done(function(data) { $('#btn_ask_question_by_student').html('<img src="/ajax-loader.gif" />  Inserting...').prop('disabled', true); $('input[type=text],input[type=email],input[type=password],input[type=url],input[type=file]').prop('disabled', true); $("textarea").prop('disabled', true); setTimeout(function() { if (data.status === 'success') { $('#error1m').slideDown('fast', function() { $('#error1m').html('<div class="alert alert-success">' + data.message + '</div>'); $("#ask_question_by_student").trigger('reset'); $('input[type=text]').prop('disabled', false); $("textarea").prop('disabled', false); $('#btn_ask_question_by_student').html('Insert').prop('disabled', false); //$('#summernoteaskquestion').summernote('enable',true); }) .delay(2000).slideUp('fast'); } else { $('#error1m').slideDown('fast', function() { $('#error1m').html('<div class="alert alert-danger">' + data.message + '</div>'); $("#insert_theory_new").trigger('reset'); $('input[type=text],input[type=email],input[type=password],input[type=url],input[type=file]').prop('disabled', false); $("textarea").prop('disabled', false); $('#insert_theory_button').html('Insert').prop('disabled', false); // $('#summernoteaskquestion').summernote('enable',true); $('#summernoteaskquestion').summernote('reset'); }) .delay(2000).slideUp('fast'); } }, 1000); }) .fail(function() { $('#error1m').html('<div class="alert alert-danger">An Unknown error occurs</div>'); $("textarea").prop('disabled', false); $('#insert_theory_button').html('Try again').prop('disabled', false); //$('#summernoteaskquestion').summernote('enable',true); }); return false; } function show_searched_question(th_id) { var loader = '<h2 class="h4"></h2><div class="ph-item"><div class="ph-col-12"><div class="ph-picture"></div><div class="ph-row"><div class="ph-col-6 big"></div><div class="ph-col-4 empty big"></div><div class="ph-col-2 big"></div><div class="ph-col-4"></div><div class="ph-col-8 empty"></div><div class="ph-col-6"></div><div class="ph-col-6 empty"></div><div class="ph-col-12"></div></div></div></div><h2 class="h4"></h2><div class="ph-item"><div class="ph-col-12"><div class="ph-picture"></div><div class="ph-row"><div class="ph-col-6 big"></div><div class="ph-col-4 empty big"></div><div class="ph-col-2 big"></div><div class="ph-col-4"></div><div class="ph-col-8 empty"></div><div class="ph-col-6"></div><div class="ph-col-6 empty"></div><div class="ph-col-12"></div></div></div></div>'; document.getElementById('refresh_content_theory').innerHTML = loader; var req1 = new XMLHttpRequest(); req1.open("GET", "/todo/show_question_Searched.php?th_id=" + th_id, true); req1.send(); req1.onreadystatechange = function() { if (req1.readyState == 4 && req1.status == 200) { document.getElementById('refresh_content_theory').innerHTML = req1.responseText; var content = document.getElementById('refresh_content_theory'); //getting the content into mathform of certain div MathJax.Hub.Queue( ["Typeset", MathJax.Hub, content]); } } } function show_search_data(detail) { var loader = '<div class="ph-item"><div class="ph-col-12"><div class="ph-picture"></div><div class="ph-row"><div class="ph-col-6 big"></div><div class="ph-col-4 empty big"></div><div class="ph-col-2 big"></div><div class="ph-col-4"></div><div class="ph-col-8 empty"></div><div class="ph-col-6"></div><div class="ph-col-6 empty"></div><div class="ph-col-12"></div></div></div></div>'; document.getElementById('search_show_data').innerHTML = loader; var req1 = new XMLHttpRequest(); req1.open("GET", "/todo/show_search_detail.php?search=" + detail, true); req1.send(); req1.onreadystatechange = function() { if (req1.readyState == 4 && req1.status == 200) { document.getElementById('search_show_data').innerHTML = req1.responseText; var content = document.getElementById('search_show_data'); //getting the content into mathform of certain div MathJax.Hub.Queue( ["Typeset", MathJax.Hub, content]); } } } function showcontenttodays(initial, course_id, chapter_id, page) { var loader = '<h2 class="h4"></h2><div class="ph-item"><div class="ph-col-12"><div class="ph-picture"></div><div class="ph-row"><div class="ph-col-6 big"></div><div class="ph-col-4 empty big"></div><div class="ph-col-2 big"></div><div class="ph-col-4"></div><div class="ph-col-8 empty"></div><div class="ph-col-6"></div><div class="ph-col-6 empty"></div><div class="ph-col-12"></div></div></div></div><h2 class="h4"></h2><div class="ph-item"><div class="ph-col-12"><div class="ph-picture"></div><div class="ph-row"><div class="ph-col-6 big"></div><div class="ph-col-4 empty big"></div><div class="ph-col-2 big"></div><div class="ph-col-4"></div><div class="ph-col-8 empty"></div><div class="ph-col-6"></div><div class="ph-col-6 empty"></div><div class="ph-col-12"></div></div></div></div>'; document.getElementById('refresh_content_theory').innerHTML = loader; var req1 = new XMLHttpRequest(); req1.open("GET", "/todo/show_question_to_students_today.php", true); req1.send(); req1.onreadystatechange = function() { if (req1.readyState == 4 && req1.status == 200) { document.getElementById('refresh_content_theory').innerHTML = req1.responseText; var content = document.getElementById('refresh_content_theory'); //getting the content into mathform of certain div MathJax.Hub.Queue( ["Typeset", MathJax.Hub, content]); } } } function shownayacontent(theory_id) { //alert('naya'); var loader = '<h2 class="h4"></h2><div class="ph-item"><div class="ph-col-12"><div class="ph-picture"></div><div class="ph-row"><div class="ph-col-6 big"></div><div class="ph-col-4 empty big"></div><div class="ph-col-2 big"></div><div class="ph-col-4"></div><div class="ph-col-8 empty"></div><div class="ph-col-6"></div><div class="ph-col-6 empty"></div><div class="ph-col-12"></div></div></div></div><h2 class="h4"></h2><div class="ph-item"><div class="ph-col-12"><div class="ph-picture"></div><div class="ph-row"><div class="ph-col-6 big"></div><div class="ph-col-4 empty big"></div><div class="ph-col-2 big"></div><div class="ph-col-4"></div><div class="ph-col-8 empty"></div><div class="ph-col-6"></div><div class="ph-col-6 empty"></div><div class="ph-col-12"></div></div></div></div>'; document.getElementById('refresh_content_theory').innerHTML = loader; var req1 = new XMLHttpRequest(); req1.open("GET", "/question_inner.php?th_id=" + theory_id, true); req1.send(); req1.onreadystatechange = function() { if (req1.readyState == 4 && req1.status == 200) { document.getElementById('refresh_content_theory').innerHTML = req1.responseText; var content = document.getElementById('refresh_content_theory'); //getting the content into mathform of certain div MathJax.Hub.Queue( ["Typeset", MathJax.Hub, content]); document.getElementById('refresh_content_theory').scrollIntoView(); } } } function showcontent(initial, course_id, chapter_id, page) { var loader = '<h2 class="h4"></h2><div class="ph-item"><div class="ph-col-12"><div class="ph-picture"></div><div class="ph-row"><div class="ph-col-6 big"></div><div class="ph-col-4 empty big"></div><div class="ph-col-2 big"></div><div class="ph-col-4"></div><div class="ph-col-8 empty"></div><div class="ph-col-6"></div><div class="ph-col-6 empty"></div><div class="ph-col-12"></div></div></div></div><h2 class="h4"></h2><div class="ph-item"><div class="ph-col-12"><div class="ph-picture"></div><div class="ph-row"><div class="ph-col-6 big"></div><div class="ph-col-4 empty big"></div><div class="ph-col-2 big"></div><div class="ph-col-4"></div><div class="ph-col-8 empty"></div><div class="ph-col-6"></div><div class="ph-col-6 empty"></div><div class="ph-col-12"></div></div></div></div>'; document.getElementById('refresh_content_theory').innerHTML = loader; var req1 = new XMLHttpRequest(); req1.open("GET", "/chapter_inner.php?course_id=" + course_id + "&&chapter_id=" + chapter_id + "&&page=" + page, true); req1.send(); req1.onreadystatechange = function() { if (req1.readyState == 4 && req1.status == 200) { document.getElementById('refresh_content_theory').innerHTML = req1.responseText; var content = document.getElementById('refresh_content_theory'); //getting the content into mathform of certain div MathJax.Hub.Queue( ["Typeset", MathJax.Hub, content]); } } if (initial == 1) { var loader1 = '<div class="ph-item"><div class="ph-col-12"><div class="ph-picture"></div><div class="ph-row"><div class="ph-col-4"></div><div class="ph-col-8 empty"></div><div class="ph-col-12"></div></div></div><div class="ph-col-2"><div class="ph-avatar"></div></div><div><div class="ph-row"><div class="ph-col-12"></div><div class="ph-col-2"></div><div class="ph-col-10 empty"></div><div class="ph-col-8 big"></div><div class="ph-col-4 big empty"></div></div></div></div>'; /* document.getElementById('show_course_in_syllabus').innerHTML = loader1; var req2 = new XMLHttpRequest(); req2.open("GET", "todo/show_syllabus.php", true); req2.send(); req2.onreadystatechange = function() { if (req2.readyState == 4 && req2.status == 200) { document.getElementById('show_course_in_syllabus').innerHTML = req2.responseText; } } */ var req3 = new XMLHttpRequest(); req3.open("GET", "/todo/show_previous_data.php", true); req3.send(); req3.onreadystatechange = function() { if (req3.readyState == 4 && req3.status == 200) { document.getElementById('show_previous_data').innerHTML = req3.responseText; } } var req4 = new XMLHttpRequest(); req4.open("GET", "/todo/show_previous_exam_data.php", true); req4.send(); req4.onreadystatechange = function() { if (req4.readyState == 4 && req4.status == 200) { document.getElementById('show_previous_result').innerHTML = req4.responseText; } } } } function VariousPlans() { var loader = '<h2 class="h4"></h2><div class="ph-item"><div class="ph-col-12"><div class="ph-picture"></div><div class="ph-row"><div class="ph-col-6 big"></div><div class="ph-col-4 empty big"></div><div class="ph-col-2 big"></div><div class="ph-col-4"></div><div class="ph-col-8 empty"></div><div class="ph-col-6"></div><div class="ph-col-6 empty"></div><div class="ph-col-12"></div></div></div></div><h2 class="h4"></h2><div class="ph-item"><div class="ph-col-12"><div class="ph-picture"></div><div class="ph-row"><div class="ph-col-6 big"></div><div class="ph-col-4 empty big"></div><div class="ph-col-2 big"></div><div class="ph-col-4"></div><div class="ph-col-8 empty"></div><div class="ph-col-6"></div><div class="ph-col-6 empty"></div><div class="ph-col-12"></div></div></div></div>'; document.getElementById('refresh_content_theory').innerHTML = loader; var req1 = new XMLHttpRequest(); req1.open("GET", "/todo/plan.php", true); req1.send(); req1.onreadystatechange = function() { if (req1.readyState == 4 && req1.status == 200) { document.getElementById('refresh_content_theory').innerHTML = req1.responseText; var content = document.getElementById('refresh_content_theory'); //getting the content into mathform of certain div MathJax.Hub.Queue( ["Typeset", MathJax.Hub, content]); } } } function ModelExamTodaysPick() { var loader = '<h2 class="h4"></h2><div class="ph-item"><div class="ph-col-12"><div class="ph-picture"></div><div class="ph-row"><div class="ph-col-6 big"></div><div class="ph-col-4 empty big"></div><div class="ph-col-2 big"></div><div class="ph-col-4"></div><div class="ph-col-8 empty"></div><div class="ph-col-6"></div><div class="ph-col-6 empty"></div><div class="ph-col-12"></div></div></div></div><h2 class="h4"></h2><div class="ph-item"><div class="ph-col-12"><div class="ph-picture"></div><div class="ph-row"><div class="ph-col-6 big"></div><div class="ph-col-4 empty big"></div><div class="ph-col-2 big"></div><div class="ph-col-4"></div><div class="ph-col-8 empty"></div><div class="ph-col-6"></div><div class="ph-col-6 empty"></div><div class="ph-col-12"></div></div></div></div>'; document.getElementById('refresh_content_theory').innerHTML = loader; var req1 = new XMLHttpRequest(); req1.open("GET", "/todo/show_ModelExamTodaysPick.php", true); req1.send(); req1.onreadystatechange = function() { if (req1.readyState == 4 && req1.status == 200) { document.getElementById('refresh_content_theory').innerHTML = req1.responseText; var content = document.getElementById('refresh_content_theory'); //getting the content into mathform of certain div MathJax.Hub.Queue( ["Typeset", MathJax.Hub, content]); } } } function ModelExamTotalStudied() { var loader = '<h2 class="h4"></h2><div class="ph-item"><div class="ph-col-12"><div class="ph-picture"></div><div class="ph-row"><div class="ph-col-6 big"></div><div class="ph-col-4 empty big"></div><div class="ph-col-2 big"></div><div class="ph-col-4"></div><div class="ph-col-8 empty"></div><div class="ph-col-6"></div><div class="ph-col-6 empty"></div><div class="ph-col-12"></div></div></div></div><h2 class="h4"></h2><div class="ph-item"><div class="ph-col-12"><div class="ph-picture"></div><div class="ph-row"><div class="ph-col-6 big"></div><div class="ph-col-4 empty big"></div><div class="ph-col-2 big"></div><div class="ph-col-4"></div><div class="ph-col-8 empty"></div><div class="ph-col-6"></div><div class="ph-col-6 empty"></div><div class="ph-col-12"></div></div></div></div>'; document.getElementById('refresh_content_theory').innerHTML = loader; var req1 = new XMLHttpRequest(); req1.open("GET", "/todo/show_ModelExamyet.php", true); req1.send(); req1.onreadystatechange = function() { if (req1.readyState == 4 && req1.status == 200) { document.getElementById('refresh_content_theory').innerHTML = req1.responseText; var content = document.getElementById('refresh_content_theory'); //getting the content into mathform of certain div MathJax.Hub.Queue( ["Typeset", MathJax.Hub, content]); } } } function hidenumber(id, answer, thid) { $('#hidenumber' + id).hide(); var req = new XMLHttpRequest(); req.open("GET", "/timer.php?id=" + thid + "&&ans=" + answer, true); req.send(); req.onreadystatechange = function() { if (req.readyState == 4 && req.status == 200) { //alert(data); } } return false; } function submitform() { $('#btn-ok').html('<img src="/ajax-loader.gif" />').prop('disabled', true); var form_data = new FormData(); $.ajax({ url: '/todo/check_results.php', type: 'POST', data: new FormData(document.getElementById('formxy')), cache: false, contentType: false, processData: false, dataType: 'json' }) .done(function(data) { //$('#summernotex1322').summernote('disable',true); //$('.summernote').summernote('destroy'); setTimeout(function() { if (data.status === 'success') { $("#formxy").trigger('reset'); $('#btn-ok').html('submitted').prop('disabled', true); $('#toastr-2-ok').show(); $("#toastr-2").click(); $('#toastr-2-ok').hide(); showcontent('1'); } else { $('#show_error_course_create').show(); $("#swal-3").click(); $('#show_error_course_create').hide(); $('#errorxy').html('<div class="alert alert-danger">' + data.message + '</div>'); $('#btn-ok').html('Insert').prop('disabled', false); //$('#summernotex1322').summernote('enable',true); } }, 2000); }) .fail(function() { $('#errorxy').html('<div class="alert alert-danger">An Unknown error occurs</div>'); $('#show_error_course_create').show(); $("#swal-3").click(); $('#show_error_course_create').hide(); $('#btn-ok').html('Try again').prop('disabled', false); }); return false; } function showpreviouscontent(id) { var loader = '<h2 class="h4"></h2><div class="ph-item"><div class="ph-col-12"><div class="ph-picture"></div><div class="ph-row"><div class="ph-col-6 big"></div><div class="ph-col-4 empty big"></div><div class="ph-col-2 big"></div><div class="ph-col-4"></div><div class="ph-col-8 empty"></div><div class="ph-col-6"></div><div class="ph-col-6 empty"></div><div class="ph-col-12"></div></div></div></div><h2 class="h4"></h2><div class="ph-item"><div class="ph-col-12"><div class="ph-picture"></div><div class="ph-row"><div class="ph-col-6 big"></div><div class="ph-col-4 empty big"></div><div class="ph-col-2 big"></div><div class="ph-col-4"></div><div class="ph-col-8 empty"></div><div class="ph-col-6"></div><div class="ph-col-6 empty"></div><div class="ph-col-12"></div></div></div></div>'; document.getElementById('refresh_content_theory').innerHTML = loader; var req1 = new XMLHttpRequest(); req1.open("GET", "/todo/show_previous_question.php?id=" + id, true); req1.send(); req1.onreadystatechange = function() { if (req1.readyState == 4 && req1.status == 200) { document.getElementById('refresh_content_theory').innerHTML = req1.responseText; var content = document.getElementById('refresh_content_theory'); //getting the content into mathform of certain div MathJax.Hub.Queue( ["Typeset", MathJax.Hub, content]); } } } function showpreviouscontentexam(id) { var loader = '<h2 class="h4"></h2><div class="ph-item"><div class="ph-col-12"><div class="ph-picture"></div><div class="ph-row"><div class="ph-col-6 big"></div><div class="ph-col-4 empty big"></div><div class="ph-col-2 big"></div><div class="ph-col-4"></div><div class="ph-col-8 empty"></div><div class="ph-col-6"></div><div class="ph-col-6 empty"></div><div class="ph-col-12"></div></div></div></div><h2 class="h4"></h2><div class="ph-item"><div class="ph-col-12"><div class="ph-picture"></div><div class="ph-row"><div class="ph-col-6 big"></div><div class="ph-col-4 empty big"></div><div class="ph-col-2 big"></div><div class="ph-col-4"></div><div class="ph-col-8 empty"></div><div class="ph-col-6"></div><div class="ph-col-6 empty"></div><div class="ph-col-12"></div></div></div></div>'; document.getElementById('refresh_content_theory').innerHTML = loader; var req1 = new XMLHttpRequest(); req1.open("GET", "/todo/show_previous_exam_question.php?id=" + id, true); req1.send(); req1.onreadystatechange = function() { if (req1.readyState == 4 && req1.status == 200) { document.getElementById('refresh_content_theory').innerHTML = req1.responseText; var content = document.getElementById('refresh_content_theory'); //getting the content into mathform of certain div MathJax.Hub.Queue( ["Typeset", MathJax.Hub, content]); } } } function append_summernote_to_ask_question(course_id, chaper_id) { var checkprevious = document.getElementById('summernoteaskquestion'); if (!checkprevious) { $('<div id="summernoteaskquestion">').appendTo('.summernote_ask_questions'); $('<textarea class="summernote" name="question" id="summernoteaskquestion"></textarea>') .appendTo('.summernote_ask_questions') .summernote({ placeholder: 'Enter the Question...', height: 200, toolbar: [ //["style", ["style"]], //["font", ["bold", "underline", "clear"]], //["fontname", ["fontname"]], //["color", ["color"]], ["para", ["ul", "ol", /*"paragraph"*/ ]], //["table", ["table"]], ["insert", ["picture", "link", "video"]], // ["view", ["fullscreen", "codeview", "help"]] ], callbacks: { onImageUpload: function(files, editor, welEditable) { for (var i = files.length - 1; i >= 0; i--) { sendFile(files[i], this); } //for loop ends } //onimage uploads ends } //callbacks ends }); //.summernote appends to ends $('<div id="summernoteaskquestion">').appendTo('.summernote_ask_questions'); $('<div class="form-group" id="op1" style="display:none;"><label for="option1">Option1</label><input type="text" class="form-control" name="option1" id="option2xcv1" onkeypress="option2g1(event)"></div>').appendTo('.summernote_ask_questions'); $('<div class="form-group" id="op2" style="display:none;"><label for="option2">Option2</label><input type="text" class="form-control" name="option2" id="option2xcv2" onkeypress="option2g2(event)"></div>').appendTo('.summernote_ask_questions'); $('<div class="form-group" id="op3" style="display:none;"><label for="option3">Option3</label><input type="text" class="form-control" name="option3" id="option2xcv3" onkeypress="option2g3(event)"></div>').appendTo('.summernote_ask_questions'); $('<div class="form-group" id="op4" style="display:none;"><label for="option4">Option4</label><input type="text" class="form-control" name="option4" id="option2xcv4" onkeypress="option2g4(event)"></div>').appendTo('.summernote_ask_questions'); $('<div class="form-group" style="display:none;"><input type="text" class="form-control" name="course_id" value="' + course_id + '"></div>').appendTo('.summernote_ask_questions'); $('<div class="form-group" style="display:none;"><input type="text" class="form-control" name="chapter_id" value="' + chaper_id + '"></div>').appendTo('.summernote_ask_questions'); } } function edit_theory_fun(id, chapter_id, course_id, page) { // alert(id); $('#edit_theory_btn' + id).html('<img src="/ajax-loader.gif" />  Updating...').prop('disabled', true); var form_data = new FormData(); $.ajax({ url: '/inst/insert/edit_theory_ajax.php', type: 'POST', data: new FormData(document.getElementById('edit_th' + id)), cache: false, contentType: false, processData: false, dataType: 'json' }) .done(function(data) { //$('#edit_theory_btn'+id).html('<img src="ajax-loader.gif" />  Inserting...').prop('disabled', true); $('input[type=text],input[type=email],input[type=password],input[type=url],input[type=file]').prop('disabled', true); $("textarea").prop('disabled', true); $('#summernote_edit_theory').summernote('disable', true); //$('.summernote').summernote('destroy'); setTimeout(function() { if (data.status === 'success') { $("#edit_th" + id).trigger('reset'); $('input[type=text]').prop('disabled', false); $("textarea").prop('disabled', false); $('#edit_theory_btn' + id).html('Insert').prop('disabled', false); $('#summernote_edit_theory').summernote('enable', true); $('#summernote_edit_theory').summernote('reset'); window.setTimeout(function() { $('#edit_theory_answer' + id).hide(); }, 1000); var loader = '<h2 class="h4"></h2><div class="ph-item"><div class="ph-col-12"><div class="ph-picture"></div><div class="ph-row"><div class="ph-col-6 big"></div><div class="ph-col-4 empty big"></div><div class="ph-col-2 big"></div><div class="ph-col-4"></div><div class="ph-col-8 empty"></div><div class="ph-col-6"></div><div class="ph-col-6 empty"></div><div class="ph-col-12"></div></div></div></div><h2 class="h4"></h2><div class="ph-item"><div class="ph-col-12"><div class="ph-picture"></div><div class="ph-row"><div class="ph-col-6 big"></div><div class="ph-col-4 empty big"></div><div class="ph-col-2 big"></div><div class="ph-col-4"></div><div class="ph-col-8 empty"></div><div class="ph-col-6"></div><div class="ph-col-6 empty"></div><div class="ph-col-12"></div></div></div></div>'; document.getElementById('refresh_content_theory').innerHTML = loader; var req1 = new XMLHttpRequest(); req1.open("GET", "chapter_inner.php?course_id=" + course_id + "&&chapter_id=" + chapter_id + "&&page=" + page, true); req1.send(); req1.onreadystatechange = function() { if (req1.readyState == 4 && req1.status == 200) { document.getElementById('refresh_content_theory').innerHTML = req1.responseText; var content = document.getElementById('refresh_content_theory'); //getting the content into mathform of certain div MathJax.Hub.Queue( ["Typeset", MathJax.Hub, content]); document.getElementById('refresh_content_theory').scrollIntoView(); } } } else { $('input[type=text],input[type=email],input[type=password],input[type=url],input[type=file]').prop('disabled', false); $("textarea").prop('disabled', false); $('#edit_theory_btn' + id).html('Insert').prop('disabled', false); $('#summernote_edit_theory').summernote('enable', true); $('#summernote_edit_theory').summernote('reset'); $('#show_error_edit').show(); $("#swal-9").click(); $('#show_error_edit').hide(); } }, 1000); }) .fail(function() { $('#show_error_edit').show(); $("#swal-9").click(); $('#show_error_edit').hide(); $("textarea").prop('disabled', false); $('#edit_theory_btn' + id).html('Insert').prop('disabled', false); $('#summernote_edit_theory').summernote('enable', true); $('#summernote_edit_theory').summernote('reset'); }); return false; } function editTheory(id, what_is) { //alert(what_is); $('#theory_questions' + id).hide(); $('#chapter' + id).hide(); $('#edit_theory_answer' + id).show(); $.getJSON('/inst/show_theorybyid.php?id=' + id, function(data) { //alert (data.question); var question = data.question; var answer = data.answer; var hint = data.hint; if (what_is != "mcq") { $('<div class="form-group">Question<label for="question"></label><textarea type="text" class="form-control" name="question">' + question + '</textarea></div>').appendTo('.add_summernote_to_question' + id); $('<textarea class="summernote" name="answer" id="summernote_edit_theory">' + answer + '</textarea>') .appendTo('.add_summernote_to_answer' + id) .summernote({ placeholder: 'Answer...', height: 200, toolbar: [ // ["style", ["style"]], //["font", ["bold", "underline", "clear"]], //["fontname", ["fontname"]], //["color", ["color"]], ["para", ["ul", "ol", /*"paragraph"*/ ]], //["table", ["table"]], ["insert", ["picture", "link", "video"]], ["view", ["fullscreen", "codeview", "help"]] ], callbacks: { onImageUpload: function(files, editor, welEditable) { for (var i = files.length - 1; i >= 0; i--) { sendFile(files[i], this); } //for loop ends } //onimage uploads ends } //callbacks ends }); //.summernote appends to ends } else { $('<textarea class="summernote" name="question1" id="summernote_edit_question">' + question + '</textarea>') .appendTo('.add_summernote_to_questionmcq' + id) .summernote({ placeholder: 'Question...', height: 200, callbacks: { onImageUpload: function(files, editor, welEditable) { for (var i = files.length - 1; i >= 0; i--) { sendFile(files[i], this); } //for loop ends } //onimage uploads ends } //callbacks ends }); //.summernote appends to ends $('<textarea class="summernote" name="hint" id="summernote_edit_theory67">' + hint + '</textarea>') .appendTo('.add_summernote_to_hint' + id) .summernote({ placeholder: 'Hints...', height: 200, callbacks: { onImageUpload: function(files, editor, welEditable) { for (var i = files.length - 1; i >= 0; i--) { sendFile(files[i], this); } //for loop ends } //onimage uploads ends } //callbacks ends }); //summernote appends to ends if (answer == "a") { $('<div class="form-group"><label>Answer</label><select class="form-control select2" name="answer1"><option value="a" selected>Option 1</option><option value="b">Option 2</option><option value="c">Option 3</option><option value="d">Option 4</option></select></div>').appendTo('.add_summernote_to_answer' + id); } else if (answer == "b") { $('<div class="form-group"><label>Answer</label><select class="form-control select2" name="answer1"><option value="a" >Option 1</option><option value="b" selected>Option 2</option><option value="c">Option 3</option><option value="d">Option 4</option></select></div>').appendTo('.add_summernote_to_answer' + id); } else if (answer == "c") { $('<div class="form-group"><label>Answer</label><select class="form-control select2" name="answer1"><option value="a" >Option 1</option><option value="b">Option 2</option><option value="c" selected>Option 3</option><option value="d">Option 4</option></select></div>').appendTo('.add_summernote_to_answer' + id); } else { $('<div class="form-group"><label>Answer</label><select class="form-control select2" name="answer1"><option value="a">Option 1</option><option value="b">Option 2</option><option value="c">Option 3</option><option value="d" selected>Option 4</option></select></div>').appendTo('.add_summernote_to_answer' + id); } } var sh = document.getElementById('edit_theory_answer' + id); sh.scrollIntoView(); $('#edit_theory_answer').scrollIntoView(); }); } function cancel_editing_theory(id) { $('#edit_theory_answer' + id).hide(); $('#theory_questions' + id).show(); $('#chapter' + id).show(); var sh = document.getElementById('theory_questions' + id); sh.scrollIntoView(); $('#theory_questions').scrollIntoView(); } function DeleteQuestionByID(operation, id) { var req = new XMLHttpRequest(); req.open("GET", "/ajax/delete_question.php?operation=" + operation + "&&id=" + id, true); req.send(); req.onreadystatechange = function() { if (req.readyState == 4 && req.status == 200) { var respo = req.responseText; alert(respo); showcontent('0'); // document.getElementById('numerical_edit1').innerHTML=document.getElementById('numerical_edit').innerHTML; } } } function sendFile(file, el) { var form_data = new FormData(); form_data.append('file', file); $.ajax({ data: form_data, type: "POST", url: '/editor-upload.php', cache: false, contentType: false, processData: false, success: function(url) { $(el).summernote('editor.insertImage', url); } }); } </script> <script type="text/x-mathjax-config"> MathJax.Hub.Config({ showProcessingMessages: false, tex2jax: { inlineMath: [['$','$'],['\\(','\\)']] , linebreaks:{automatic:true}} }); MathJax.Hub.Config({ CommonHTML: { linebreaks: { automatic: true } }, "HTML-CSS": { linebreaks: { automatic: true } }, SVG: { linebreaks: { automatic: true } } }); MathJax.Hub.Config({ styles: { ".MathJax_Display": { "text-align": "none !important" } } }) </script> <script async src="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js?config=TeX-MML-AM_HTMLorMML"></script> <script src="/js/countdown.js"></script> <script src="/assets/modules/izitoast/js/iziToast.min.js"></script> <!-- Global site tag (gtag.js) - Google Analytics --> <script type="text/javascript"> let deferredPrompt; var addBtn = document.querySelector('.add-button'); var hidebtn=document.querySelector('.hide_div_install'); addBtn.style.display = 'none'; window.addEventListener('beforeinstallprompt', (e) => { // Prevent Chrome 67 and earlier from automatically showing the prompt e.preventDefault(); // Stash the event so it can be triggered later. deferredPrompt = e; // Update UI to notify the user they can add to home screen addBtn.style.display = 'block'; addBtn.addEventListener('click', (e) => { // hide our user interface that shows our A2HS button hidebtn.style.display = 'none'; // Show the prompt deferredPrompt.prompt(); // Wait for the user to respond to the prompt deferredPrompt.userChoice.then((choiceResult) => { if (choiceResult.outcome === 'accepted') { console.log('User accepted the A2HS prompt'); var req1 = new XMLHttpRequest(); req1.open("GET", "/install_web_app.php", true); req1.send(); } else { console.log('User dismissed the A2HS prompt'); } deferredPrompt = null; }); }); }); </script> <script type="module"> document.addEventListener('DOMContentLoaded', function() { setTimeout(function() { document.getElementById('notify-btn').click(); }, 10000); // Click after 10 seconds }); // Initialize Firebase (only for the client side) const firebaseConfig = { apiKey: "AIzaSyBHFC5Y3kIx3oGdD8NsVjLH0F9U97XY7NQ", authDomain: "ioebooster-315500.firebaseapp.com", projectId: "ioebooster-315500", storageBucket: "ioebooster-315500.appspot.com", messagingSenderId: "389281972166", appId: "1:389281972166:web:be06fbe1e006ca5483fcc7", measurementId: "G-G06J5Q6EWH" }; if (!firebase.apps.length) { firebase.initializeApp(firebaseConfig); } const messaging = firebase.messaging(); document.getElementById('notify-btn').addEventListener('click', requestPermission); async function requestPermission() { Notification.requestPermission().then(permission => { if (permission === 'granted') { console.log('Notification permission granted.'); manageToken(); } else { console.log('Unable to get permission to notify.'); } }).catch(err => { console.error('Error requesting notification permission:', err); }); } async function manageToken() { try { const currentToken = await messaging.getToken({ vapidKey: 'BIvU45FD96pUEqj2ZfuM0tSdCH3xgjMx3wV3vCUzYWenNZ8KyoEDQl7RRClZanRTj3zk6huq9pJT4BLW0O7cg5Y' }); if (currentToken) { console.log('FCM Token:', currentToken); saveToken(currentToken); } else { console.log('No registration token available. Request permission to generate one.'); } } catch (error) { console.error('Error retrieving FCM token:', error); setTimeout(manageToken, 5000); // Retry after 5 seconds } } function saveToken(token) { fetch('/save_token.php', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ token: token }) }) .then(response => { if (response.ok) { console.log('Token saved successfully.'); } else { console.log('Failed to save token.'); } }) .catch(error => { console.log('Error saving token:', error); }); } if ('serviceWorker' in navigator) { navigator.serviceWorker.register('/firebase-messaging-sw.js') .then((registration) => { console.log('Service Worker registered with scope:', registration.scope); }).catch((error) => { console.error('Service Worker registration failed:', error); }); } // Assuming `messaging` is already initialized // Assuming `messaging` is already initialized messaging.onMessage((payload) => { console.log('Message received. ', payload); if (!payload.data) { console.warn('Notification payload is missing data:', payload); return; } const notificationTitle = payload.data.title || "Default Title"; const notificationOptions = { body: payload.data.body || "Default body message.", icon: payload.data.icon || 'https://www.ioebooster.com/img/f-icons/icon-512x512.png', image: payload.data.image || 'https://www.ioebooster.com/img/default-image.png' }; //alert(notificationTitle); if (Notification.permission === 'granted') { const notification = new Notification(notificationTitle, notificationOptions); notification.onclick = function(event) { event.preventDefault(); window.open(payload.data.link || 'https://www.ioebooster.com/courses.php', '_blank'); }; } }); async function unsubscribeToken(token) { try { await messaging.deleteToken(); console.log('Token deleted:', token); } catch (error) { console.error('Error unsubscribing from FCM:', error); } } </script> <a href="https://wa.me/9779840479290?text=Hello" target="_blank" class="whatsapp-float"> <img src="https://upload.wikimedia.org/wikipedia/commons/6/6b/WhatsApp.svg" alt="Chat on WhatsApp"> </a> <style> .whatsapp-float { position: fixed; /* Stays in one place when scrolling */ bottom: 20px; /* Distance from bottom */ right: 20px; /* Distance from left side */ z-index: 10000000000; /* Ensures it sits on top of other content */ cursor: pointer; transition: transform 0.3s; /* Smooth animation on hover */ } /* Make the icon a good size */ .whatsapp-float img { width: 60px; height: 60px; filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.3)); /* Adds a nice shadow */ } /* Optional: Slight "pop" effect when hovering on PC */ .whatsapp-float:hover { transform: scale(1.1); } </style> </body> <!-- Tue, 07 Jan 2020 03:35:12 GMT --> </html>