Get Masjid data via json from dropdown
How do I make an get masjid data via json from dropdown?
What is a get masjid data via json from dropdown? How do you make a get masjid data via json from dropdown? This script and codes were developed by Khalid Munir on 26 August 2022, Friday.
Get Masjid data via json from dropdown - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Get Masjid data via json from dropdown</title>
</head>
<body> <h2>Get masjid weekly JSON</h2>
<p data-bind='text: message'></p>
<select id="selectedMasjid" data-bind="options: items, value: selectedChoice, optionsText: 'name', optionsCaption: 'Choose...'"></select>
<br>
<div>
<table border="1" cellspacing="15"> <thead> <tr> <td>Date</td> <td>Fajar</td> <td>Zuhr</td> <td>Asar</td> <td>Maghrib</td> <td>Esha</td> <td>Jumma</td> </tr> </thead> <tbody data-bind="foreach: times"> <tr> <b><td data-bind="text: salatdate">date</td></b> <td data-bind="text: fajarjamat">Fajar</td> <td data-bind="text: zuhrjamat">Zuhr</td> <td data-bind="text: asarjamat">Asar</td> <td data-bind="text: maghrib">Maghrib</td> <td data-bind="text: eshajamat">Esha</td> <td data-bind="text: jumma">Jumma</td> </tr> </tbody>
</table>
</div> <script src='https://cdnjs.cloudflare.com/ajax/libs/knockout/3.3.0/knockout-min.js'></script>
<script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Get Masjid data via json from dropdown - Script Codes JS Codes
//define(['knockout', 'text!./masjid-options.html'], function(ko, templateMarkup) { var MasjidOptions = function() { var self = this; this.message = ko.observable('Select a local Masjid from list below'); this.items = ko.observableArray(); this.times = ko.observableArray(); this.selectedChoice = ko.observable(); //i.e. this.availableCountries = ko.observableArray(['France', 'Germany', 'Spain']) self.selectedChoice.subscribe(function (newValue) { // alert("the new value is " + newValue); // should show [Object] // alert("the new value is " + newValue['masjidtable']); // should show url for cut/paste self.times([]); var nurl = 'http://77.98.150.154/getmasjidweek.php?name=' + newValue['masjidtable']; // alert(nurl); // //self.selectedChoice(newValue); $.getJSON(nurl, null, function (data) { // alert(data); console.log(data); for (var i = 0; i < data.length; i++) { self.times.push(data[i]); } // alert(self.times().length); console.log(self.times()); }) // end getJSON }) // end subscribe var url = 'http://82.98.150.154/jsonpure4.php'; $.getJSON(url, null, function (data) { //alert(data); console.log(data); for (var i = 0; i < data.length; i++) { self.items.push(data[i]); } }); //end .getJSON } // end MasjidOptions(params) ko.applyBindings(MasjidOptions); // produces --> Uncaught Error: You cannot apply bindings multiple times to the same element
// return { viewModel: MasjidOptions, template: templateMarkup };
//});
![Get Masjid data via json from dropdown - Script Codes](http://shots.codepen.io/khalidmunir/pen/mJGPom-512.jpg)
Developer | Khalid Munir |
Username | khalidmunir |
Uploaded | August 26, 2022 |
Rating | 3 |
Size | 2,398 Kb |
Views | 30,360 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
NgHandsonTable - get value instead of formula | 2,317 Kb |
Single Image upload knockout | 1,696 Kb |
Part1 - make new static analog clock | 2,481 Kb |
Ng-Handson - simple example | 1,822 Kb |
Qibla direction | 2,208 Kb |
Broken Rule.js example1 | 3,541 Kb |
Scroll button detect | 1,844 Kb |
A Pen by Khalid Munir | 4,083 Kb |
Part 3 - resizing height - bootstrap | 5,805 Kb |
CSS TRICKS - corner ribbon | 1,976 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Full page table inside the grid | Twikito | 1,864 Kb |
SVG hamburger menu button | Elifitch | 2,602 Kb |
Portfolio Landing Page | FDfranklin | 3,585 Kb |
Day 11 - Calendar Card | Arnellebalane | 6,984 Kb |
A Pen by Ben Babics | Benbabics | 2,957 Kb |
Project -Show the Local Weather | Luciano_Britis | 2,583 Kb |
Bezier Animation with straight paths | Rhernando | 2,087 Kb |
Click handler test | Snapson | 2,329 Kb |
Feedback Page | TessDiNapoli | 2,836 Kb |
CSS Letter animations | Sladix | 2,116 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!