kundli site not working








Kundli with 12 Houses
1
2
3
4
5
6
7
8
9
10
11
12
aaaaaa



<!-- HTML form for horoscope input with time zone, longitude, and latitude -->

<form id="horoscopeForm">

  <label>Date of Birth:</label>

  <input type="date" id="dob" /><br />



  <label>Time of Birth:</label>

  <input type="time" id="tob" /><br />



  <label>City:</label>

  <input type="text" id="city" placeholder="Enter city" /><br />



  <label>Country:</label>

  <input type="text" id="country" placeholder="Enter country" /><br />



  <label>Time Zone:</label>

  <select id="timezone">

    <option value="+00:00" />UTC (Coordinated Universal Time)

    <option value="-05:00" />EST (Eastern Standard Time - US & Canada)

    <option value="-08:00" />PST (Pacific Standard Time - US & Canada)

    <option value="+01:00" />CET (Central European Time)

    <option value="+05:30" />IST (India Standard Time)

    <option value="+08:00" />CST (China Standard Time)

    <option value="+09:00" />JST (Japan Standard Time)

    <option value="+10:00" />AEST (Australian Eastern Standard Time)

    <option value="-03:00" />BRT (Brasilia Time - Brazil)

    <option value="+03:00" />MSK (Moscow Standard Time)

    <option value="+02:00" />EET (Eastern European Time)

    <option value="-07:00" />MST (Mountain Standard Time - US & Canada)

    <option value="-06:00" />CST (Central Standard Time - US & Canada)

  </select><br />



  <label>Longitude:</label>

  <input type="number" id="longitude" step="any" readonly /><br />



  <label>Latitude:</label>

  <input type="number" id="latitude" step="any" readonly /><br />



  <!-- Submit button -->

  <input type="submit" value="Analyze Horoscope" />

</form>



<!-- JavaScript logic for geocoding and horoscope analysis using Nominatim API -->

<script>

  const API_URL = 'https://nominatim.openstreetmap.org/search?format=json&addressdetails=1&q=';



  document.getElementById('city').addEventListener('blur', function() {

    fetchCoordinates();

  });



  document.getElementById('country').addEventListener('blur', function() {

    fetchCoordinates();

  });



  function fetchCoordinates() {

    let city = document.getElementById('city').value;

    let country = document.getElementById('country').value;

    let place = `${city}, ${country}`;



    fetch(API_URL + encodeURIComponent(place))

      .then(response => response.json())

      .then(data => {

        if (data && data.length > 0) {

          let location = data[0];

          document.getElementById('latitude').value = location.lat;

          document.getElementById('longitude').value = location.lon;

        } else {

          alert('No results found for the place entered.');

        }

      })

      .catch(error => {

        alert('Error fetching geocode data: ' + error);

      });

  }



  document.getElementById('horoscopeForm').onsubmit = function(e) {

    e.preventDefault(); // Form ko submit hone se rokna aur JavaScript logic chalana



    // Input values from form

    let dob = document.getElementById('dob').value;

    let tob = document.getElementById('tob').value;

    let city = document.getElementById('city').value;

    let country = document.getElementById('country').value;

    let timezone = document.getElementById('timezone').value;

    let longitude = parseFloat(document.getElementById('longitude').value);

    let latitude = parseFloat(document.getElementById('latitude').value);



    // Placeholder for planetary calculation logic using timezone, longitude, and latitude

    // You can call an API here or implement your own calculation



    // For now, showing a basic result for demo

    let result = "Calculating planetary positions for DOB: " + dob + ", Time: " + tob + 

                 ", Timezone: " + timezone + ", Longitude: " + longitude + ", Latitude: " + latitude;



    // Display result

    alert(result); // User ko result alert box mein dikhana

  }

</script>





    

    

    Kundli with 12 Houses

    <style>

        .chart {

            width: 300px;

            height: 300px;

            position: relative;

            border: 2px solid orange;

            background: white;

            font-family: Arial, sans-serif;

        }



        .house {

            position: absolute;

            font-size: 12px;

            font-weight: bold;

            color: black;

            text-align: center;

            width: 30px; /* Same as your original setting */

            height: 30px; /* Same as your original setting */

        }



        /* Positioning of houses */

        .house-1 { top: 30%; left: 40%; transform: translate(50%, 0); }  /* Center Top */

        .house-2 { top: 10%; left: 20%; transform: translate(15%, 50%); } /* Top Left */

        .house-3 { top: 30%; left: 15%; transform: translate(-50%, -50%); } /* Left Middle */

        .house-4 { top: 45%; left: 27%; transform: translate(50%, 0); }

        .house-5 { bottom: 15%; left: 15%; transform: translate(-50%, -50%); } /* Bottom Center */

        .house-6 { bottom: 15%; left: 15%; transform: translate(15%, 50%); } /* Bottom Right */

        .house-7  { bottom: 30%; left: 40%; transform: translate(50%, 0); }  /* Top Right */

        .house-8 { bottom: 15%; right: 20%; transform: translate(15%, 50%); } /* Top Right */

        .house-9 { bottom: 15%; right: 10%; transform: translate(-50%, -50%); } /* Center Right */

        .house-10 { top: 50%; right: 30%; transform: translate(-50%, -50%); } /* Center Center */

        .house-11 { top: 30%; right: 5%; transform: translate(-50%, -50%); } /* Bottom Center Right */

        .house-12 { top: 10%; right: 22%; transform: translate(25%, 30%); } /* Fixed Syntax for House-12 */



        .inner-square {

            position: absolute;

            top: 50%;

            left: 50%;

            width: 70%;

            height: 70%;

            background: transparent;

            border: 2px solid blue;

            transform: translate(-50%, -50%) rotate(45deg);

        }



        .diagonal {

            position: absolute;

            background-color: #ff0000;

            height: 2px;

            z-index: 1;

        }



        .diagonal.ad {

            top: 0;

            left: 0;

            width: 141%;

            transform: rotate(45deg);

            transform-origin: top left;

        }



        .diagonal.bc {

            bottom: 0;

            left: 0;

            width: 141%;

            transform: rotate(-45deg);

            transform-origin: bottom left;

        }

    </style>





    <div class="chart">

        <!-- Houses -->

        <div class="house house-1">1</div>

        <div class="house house-2">2</div>

        <div class="house house-3">3</div>

        <div class="house house-4">4</div>

        <div class="house house-5">5</div>

        <div class="house house-6">6</div>

        <div class="house house-7">7</div>

        <div class="house house-8">8</div>

        <div class="house house-9">9</div>

        <div class="house house-10">10</div>

        <div class="house house-11">11</div>

        <div class="house house-12">12</div>



        <!-- Inner Rotated Square -->

        <div class="inner-square"></div>



        <!-- Diagonals connecting the outer square corners -->

        <div class="diagonal ad"></div>

        <div class="diagonal bc"></div>

    </div>





<script>
    document.getElementById('horoscopeForm').onsubmit = function (e) {
        e.preventDefault();

        // Input values
        let dob = document.getElementById('dob').value;
        let tob = document.getElementById('tob').value;
        let city = document.getElementById('city').value;
        let country = document.getElementById('country').value;
        let timezone = document.getElementById('timezone').value;
        let longitude = parseFloat(document.getElementById('longitude').value);
        let latitude = parseFloat(document.getElementById('latitude').value);

        // Call the planetary calculation function (you need to replace this with real calculations)
        let planetaryPositions = calculatePlanets(dob, tob, timezone, longitude, latitude);

        // Dynamically update kundli layout with calculated planetary positions
        updateKundli(planetaryPositions);
    }

    // Placeholder function: you need to replace this with actual Vedic astrology calculation logic.
    function calculatePlanets(dob, tob, timezone, longitude, latitude) {
        // You should call an API or use a library here to calculate planetary positions
        // Example: Swiss Ephemeris, or use an external service that provides this data
        // For now, we will return dummy values as a placeholder
        return {
            "Sun": 11,  // Sun in 11th house
            "Moon": 6,  // Moon in 6th house
            "Mars": 3,  // Mars in 3rd house
            "Mercury": 10,  // Mercury in 10th house
            "Venus": 7,  // Venus in 7th house
            "Jupiter": 2,  // Jupiter in 2nd house
            "Saturn": 4,  // Saturn in 4th house
            "Rahu": 9,  // Rahu in 9th house
            "Ketu": 5   // Ketu in 5th house
        };
    }

    function updateKundli(planets) {
        // Clear all previous planets from the chart
        for (let i = 1; i <= 12; i++) {
            let houseElement = document.querySelector('.house-' + i);
            houseElement.innerHTML = i;  // Reset to house number
        }

        // Update the chart with planets in their respective houses
        for (const [planet, house] of Object.entries(planets)) {
            let houseElement = document.querySelector('.house-' + house);
            houseElement.innerHTML += "<br>" + planet;  // Append planet to house
        }
    }
</script>

Comments

Popular posts from this blog

astrology form with longitude and latitude code

KARKA OF HOUSE 2 WORKING GOOD