{"id":2090,"date":"2026-01-08T20:15:47","date_gmt":"2026-01-08T20:15:47","guid":{"rendered":"https:\/\/www.mariaffe.com\/mmdb\/?page_id=2090"},"modified":"2026-07-05T06:38:20","modified_gmt":"2026-07-05T06:38:20","slug":"sokeside","status":"publish","type":"page","link":"https:\/\/www.mariaffe.com\/mmdb\/sokeside\/","title":{"rendered":"S\u00f8k etter tittel og personer"},"content":{"rendered":"<div class=\"search-main-container\">\n<div class=\"search-form-container\" >\n<p class=\"header-standard-h3\" style=\"font-weight:400;\">S\u00f8k etter personer<\/p>\n<p class=\"regular-text\">Begynn \u00e5 skrive navnet p\u00e5 en skuespiller, regiss\u00f8r, komponist eller et annet navn innen film og tv-bransjen. Du vil f\u00e5 opp forslag fortl\u00f8pende basert p\u00e5 det du skriver. Velg korrekt navn og velg s\u00f8k.<br \/>\n\t\t<span style=\"font-style:italic;font-weight:200;margin:0; padding:0;\"><br \/>\n\t\tNavna er en liste p\u00e5 over 14 000 skuespillere og film\/tv-serieskapere som har en viss rating p\u00e5 TMDB. Dette for \u00e5 redusere lista fra 24 millioner navn til et litt mer h\u00e5ndterlig antall. Derfor har jeg heller ikke oversikt over hvilke navn som er med og ikke.<br \/>\n\t\t<\/span><\/p>\n<p class=\"regular-text\">\n\t\tMerk at treffene kun er filmer og serier som er p\u00e5 mmdb.\n\t\t<\/p>\n<\/p><\/div>\n<\/div>\n\n\n\n    <style>\n      .name-search-wrapper {\n        position: relative;\n        max-width: 700px;\n      }\n      #name-input {\n        width: 60%;\n        padding: 10px 14px;\n        font-size: 15px;\n        border: 1px solid #ccc;\n        border-radius: 6px;\n        box-sizing: border-box;\n\t\tfont-size:16px;\n font-weight:300;\n      }\n      #suggestions-list {\n        position: absolute;\n        top: 95%;\n        left: 0;\n        right: 0;\n        border: 1px solid #ccc;\n        border-top: none;\n        border-radius: 0 0 6px 6px;\n        background: #fff;\n        max-height: 220px;\n        overflow-y: auto;\n        z-index: 1000;\n        list-style: none;\n        margin: 0;\n        padding: 0;\n        display: none;\n\t\tfont-size:16px;\n \t\tfont-weight:300;\n      }\n      #suggestions-list li {\n        padding: 10px 14px;\n        cursor: pointer;\n      }\n      #suggestions-list li:hover,\n      #suggestions-list li.active {\n        background-color: #f0f0f0;\n      }\n\t\t\t  \n\t\t\t  \n.string-search-form{\n\tdisplay:grid;\n\tgrid-column: 1 \/ 2; \n  grid-row: 5 \/ span 2;\n\torder:3;\n\t\n}\t\t\t  \n\t\t\t  \n\t.name-search-wrapper {\n\tdisplay:flex;\n\tflex-direction: row;\n\tpadding-top:15px;\n\t gap: 20px;\n}\nform.name-search-form input[type=text] {\n  padding: 10px;\n  font-size: 15px;\n  border: 1px solid grey;\n  float: left;\n  width: 70%;\n  background: #f1f1f1;\n\n}\n\nform.name-search-form button {\n\tborder-radius:20px;\n\tmargin-top:2px;\n\tmargin-left:10px;\n\tbackground-color:#f95d80B3; \n\ttext-shadow:0 0 20px white; \n\tcolor:black; \n\tfont-size: 15px; \n\tfont-weight:300;\n\theight:35px; \n\twidth:fit-content;\n\tpadding-left:20px;\n\tpadding-right:20px;\n}\n\nform.name-search-form button:hover {\n\tbackground-color:#f95d8080;\n\tcolor:black;\n}\n\nform.name-search-form::after {\n  content: \"\";\n  clear: both;\n  display: table;\n}\n\t\t\t  \n\n@media (max-width: 600px) {\n\t\n\t      .name-search-wrapper {\n        position: relative;\n        max-width: 500px;\n      }\n      #name-input {\n        width: 70%;\n\n      }\n\t.name-search-wrapper {\n\tdisplay:flex;\n\tflex-direction: row;\n\tpadding-top:15px;\n\t gap: 10px;\n}\n\t\n}\n\t\t\t  \n    <\/style>\n<div class=\"search-form-container\">\n    <form id=\"name-search-form\" method=\"get\" action=\"mmdb\/sokeresultater-skuespillere-film\/?site=personer&actorid=\">\n      <div class=\"name-search-wrapper\">\n        <input type=\"text\" id=\"name-input\" placeholder=\"S\u00f8k etter navn...\" autocomplete=\"off\" \/>\n\t<input type=\"hidden\" id=\"person-id\" name=\"person_id\" value=\"\" \/>\n\t<input type=\"hidden\" id=\"person-name\" name=\"person_name\" value=\"\" \/>\n        <ul id=\"suggestions-list\"><\/ul>\n      \n      <button type=\"submit\" class=\"search-button\">S\u00f8k<\/button>\n\t\t\t  <\/div>\n\t\t\t  <button type=\"reset\" class=\"search-button\" style=\"background-color:#fff;margin-top:15px;font-weight:200;font-style:italic;\">Nullstill s\u00f8kefeltet<\/button>\n    <\/form>\n<\/div>\n    <script>\n    (function () {\n      const JSON_URL = \"https:\/\/www.mariaffe.com\/mmdb\/json\/people.json\";\n\n      let people = [];\n\n      fetch(JSON_URL)\n        .then((res) => res.json())\n        .then((data) => { people = data; })\n        .catch((err) => console.error(\"Kunne ikke laste people.json:\", err));\n\t\t\n\t\t\n      const input = document.getElementById(\"name-input\");\n      const list = document.getElementById(\"suggestions-list\");\n      const hiddenId = document.getElementById(\"person-id\");\n      const form = document.getElementById(\"name-search-form\");\n\n      let activeIndex = -1;\n\n      input.addEventListener(\"input\", function () {\n        const query = this.value.trim().toLowerCase();\n        hiddenId.value = \"\";\n        activeIndex = -1;\n\n        if (query.length < 2) { closeList(); return; }\n\n        const matches = people\n          .filter((p) => p.name.toLowerCase().includes(query))\n          .slice(0, 10);\n\n        if (matches.length === 0) { closeList(); return; }\n\n        list.innerHTML = \"\";\n        matches.forEach((person) => {\n          const li = document.createElement(\"li\");\n          li.textContent = person.name;\n          li.dataset.id = person.id;\n          li.addEventListener(\"mousedown\", function (e) {\n            e.preventDefault();\n            selectPerson(person.name, person.id);\n          });\n          list.appendChild(li);\n        });\n\n        list.style.display = \"block\";\n      });\n\n      input.addEventListener(\"keydown\", function (e) {\n        const items = list.querySelectorAll(\"li\");\n        if (!items.length) return;\n\n        if (e.key === \"ArrowDown\") {\n          activeIndex = Math.min(activeIndex + 1, items.length - 1);\n          updateActive(items);\n          e.preventDefault();\n        } else if (e.key === \"ArrowUp\") {\n          activeIndex = Math.max(activeIndex - 1, 0);\n          updateActive(items);\n          e.preventDefault();\n        } else if (e.key === \"Enter\" && activeIndex >= 0) {\n          const active = items[activeIndex];\n          selectPerson(active.textContent, active.dataset.id);\n          e.preventDefault();\n        } else if (e.key === \"Escape\") {\n          closeList();\n        }\n      });\n\n      function updateActive(items) {\n        items.forEach((li, i) => li.classList.toggle(\"active\", i === activeIndex));\n      }\n\nfunction selectPerson(name, id) {\n  input.value = name;\n  hiddenId.value = id;\n  document.getElementById(\"person-name\").value = name;\n  closeList();\n}\n\n      function closeList() {\n        list.style.display = \"none\";\n        list.innerHTML = \"\";\n        activeIndex = -1;\n      }\n\n      document.addEventListener(\"click\", function (e) {\n        if (!form.contains(e.target)) closeList();\n      });\n\n      form.addEventListener(\"submit\", function (e) {\n        if (!hiddenId.value) {\n          e.preventDefault();\n          alert(\"Velg et navn fra forslagslisten.\");\n        }\n      });\n    })();\n    <\/script>\n    \n\n\n<div class=\"search-main-container\">\n<div class=\"search-form-container\" style=\"margin-top:50px;\">\n<p class=\"header-standard-h3\" style=\"font-weight:400;\">S\u00f8k etter titler<\/p>\n<p class=\"regular-text\">Begynn \u00e5 skrive navnet p\u00e5 en film eller serie. Du vil f\u00e5 opp forslag fortl\u00f8pende basert p\u00e5 det du skriver. Velg korrekt tittel og trykk s\u00f8k.<br \/>\n\t\t<span style=\"font-style:italic;font-weight:200;margin:0; padding:0;\"><br \/>\n\t\tLista inkluderer kun filmer og serier som er p\u00e5 mmdb.<br \/>\n\t\t<\/span><\/p>\n<\/p><\/div>\n<\/div>\n\n\n\n<style>\n\n      .title-search-wrapper {\n        position: relative;\n        max-width: 700px;\n      }\n      #title-input {\n        width: 60%;\n        padding: 10px 14px;\n        font-size: 15px;\n        border: 1px solid #ccc;\n        border-radius: 6px;\n        box-sizing: border-box;\n\t\tfont-size:16px;\n font-weight:300;\n      }\n      #title-suggestions-list {\n        position: absolute;\n        top: 95%;\n        left: 0;\n        right: 0;\n        border: 1px solid #ccc;\n        border-top: none;\n        border-radius: 0 0 6px 6px;\n        background: #fff;\n        max-height: 220px;\n        overflow-y: auto;\n        z-index: 1000;\n        list-style: none;\n        margin: 0;\n        padding: 0;\n        display: none;\n\t\tfont-size:16px;\n \t\tfont-weight:300;\n      }\n      #title-suggestions-list li {\n        padding: 10px 14px;\n        cursor: pointer;\n      }\n      #title-suggestions-list li:hover,\n      #title-suggestions-list li.active {\n        background-color: #f0f0f0;\n      }\n\t\t\t  \n\t\t\t  \n.string-search-form{\n\tdisplay:grid;\n\tgrid-column: 1 \/ 2; \n  grid-row: 5 \/ span 2;\n\torder:3;\n\t\n}\t\t\t  \n\t\t\t  \n\t.title-search-wrapper {\n\tdisplay:flex;\n\tflex-direction: row;\n\tpadding-top:15px;\n\t gap: 20px;\n}\nform.title-search-form input[type=text] {\n  padding: 10px;\n  font-size: 15px;\n  border: 1px solid grey;\n  float: left;\n  width: 70%;\n  background: #f1f1f1;\n\n}\n\nform.title-search-form button {\n\tborder-radius:20px;\n\tmargin-top:2px;\n\tmargin-left:10px;\n\tbackground-color:#f95d80B3; \n\ttext-shadow:0 0 20px white; \n\tcolor:black; \n\tfont-size: 15px; \n\tfont-weight:300;\n\theight:35px; \n\twidth:fit-content;\n\tpadding-left:20px;\n\tpadding-right:20px;\n\n}\n\nform.title-search-form button:hover {\n\tbackground-color:#f95d8080;\n\tcolor:black;\n}\n\nform.title-search-form::after {\n  content: \"\";\n  clear: both;\n  display: table;\n}\n\t\t\t  \n\n@media (max-width: 600px) {\n\t\n\t      .title-search-wrapper {\n        position: relative;\n        max-width: 500px;\n      }\n      title-input {\n        width: 70%;\n\t\t}\n      \n\t.title-search-wrapper {\n\tdisplay:flex;\n\tflex-direction: row;\n\tpadding-top:15px;\n\t gap: 10px;\n}\n\t\n}\n\t\t\t\n\t\t\t  \/*<div class=\"search-form-container\">\n<div class=\"string-search-form\">\n\t<p class=\"header-standard-h3\" style=\"font-weight:400;\">Tekstbasert s\u00f8k etter film<\/p>\n\t<p class=\"regular-text\" style=\"font-style:italic;\">\n\t\tS\u00f8k etter hele eller deler av filmnavn. Merk at jeg ikke har f\u00e5tt implementert s\u00f8kefunksjon som forst\u00e5r skrivefeil eller annen form for fuzzy input. TBC!\n\t<\/p>\n<form class=\"filmsearch\" action=\"https:\/\/www.mariaffe.com\/mmdb\/filmer\/sokeresultater-streng\/\" method=\"GET\">\n   <input type=\"text\" placeholder=\"S\u00f8k..\" name=\"sokestreng\">\n  <button class=\"search-button\" type=\"submit\" style=\"margin-left:10px;\">S\u00d8K<\/button>\n<\/form>\n   <\/div>  \t\n\t<\/div>\n\/*\n.title-search-wrapper {\nposition: relative;\nmax-width: 400px;\n}\n#title-input {\nwidth: 100%;\npadding: 10px 14px;\nfont-size: 16px;\nborder: 1px solid #ccc;\nborder-radius: 6px;\nbox-sizing: border-box;\n}\n#title-suggestions-list {\nposition: absolute;\ntop: 100%;\nleft: 0;\nright: 0;\nborder: 1px solid #ccc;\nborder-top: none;\nborder-radius: 0 0 6px 6px;\nbackground: #fff;\nmax-height: 220px;\noverflow-y: auto;\nz-index: 1000;\nlist-style: none;\nmargin: 0;\npadding: 0;\ndisplay: none;\n}\n#title-suggestions-list li {\npadding: 10px 14px;\ncursor: pointer;\n}\n#title-suggestions-list li:hover,\n#title-suggestions-list li.active {\nbackground-color: #f0f0f0;\n}*\/\n<\/style>\n<form id=\"title-search-form\" method=\"get\" action=\"\">\n<div class=\"title-search-wrapper\">\n<input type=\"text\" id=\"title-input\" placeholder=\"S\u00f8k etter tittel...\" autocomplete=\"off\" \/>\n<input type=\"hidden\" id=\"title-id\" name=\"title_id\" value=\"\" \/>\n<input type=\"hidden\" id=\"title-name\" name=\"title_name\" value=\"\" \/>\n<input type=\"hidden\" id=\"title-media-type\" name=\"media_type\" value=\"\" \/>\n<ul id=\"title-suggestions-list\"><\/ul>\n\t <button type=\"submit\" class=\"search-button\">S\u00f8k<\/button>\n<\/div>\n\n\t\t\t  <button type=\"reset\" class=\"search-button\" style=\"background-color:#fff;margin-top:15px;font-weight:200;font-style:italic;\">Nullstill s\u00f8kefeltet<\/button>\n<\/form>\n<script>\n(function () {\nconst JSON_URL = \"https:\/\/www.mariaffe.com\/mmdb\/wp-content\/uploads\/titles.json\";\nlet titles = [];\nfetch(JSON_URL)\n.then((res) => res.json())\n.then((data) => { titles = data; })\n.catch((err) => console.error(\"Kunne ikke laste titles.json:\", err));\n\t\nfunction normalize(str) {\nreturn str.normalize(\"NFD\").replace(\/[\\u0300-\\u036f]\/g, \"\").toLowerCase();\n}\nconst matches = titles\n.filter((p) => {\nconst title = normalize(p.title || p.name || '');\nreturn title.includes(normalize(query));\n})\n.slice(0, 10);\t\n\t\nconst input = document.getElementById(\"title-input\");\nconst list = document.getElementById(\"title-suggestions-list\");\nconst hiddenId = document.getElementById(\"title-id\");\nconst hiddenName = document.getElementById(\"title-name\");\nconst hiddenType = document.getElementById(\"title-media-type\");\nconst form = document.getElementById(\"title-search-form\");\nlet activeIndex = -1;\ninput.addEventListener(\"input\", function () {\nconst query = this.value.trim().toLowerCase();\nhiddenId.value = \"\";\nhiddenName.value = \"\";\nhiddenType.value = \"\";\nactiveIndex = -1;\nif (query.length < 2) { closeList(); return; }\nconst matches = titles\n.filter((p) => {\nconst title = normalize(p.title || p.name || '');\nreturn title.includes(normalize(query));\n})\n.slice(0, 10);\nif (matches.length === 0) { closeList(); return; }\nlist.innerHTML = \"\";\nmatches.forEach((item) => {\nconst displayTitle = item.title || item.name || '';\nconst li = document.createElement(\"li\");\nli.textContent = displayTitle;\nli.dataset.id = item.id;\nli.dataset.name = displayTitle;\nli.dataset.mediaType = item.media_type || '';\nli.addEventListener(\"mousedown\", function (e) {\ne.preventDefault();\nselectTitle(displayTitle, item.id, item.media_type || '');\n});\nlist.appendChild(li);\n});\nlist.style.display = \"block\";\n});\ninput.addEventListener(\"keydown\", function (e) {\nconst items = list.querySelectorAll(\"li\");\nif (!items.length) return;\nif (e.key === \"ArrowDown\") {\nactiveIndex = Math.min(activeIndex + 1, items.length - 1);\nupdateActive(items);\ne.preventDefault();\n} else if (e.key === \"ArrowUp\") {\nactiveIndex = Math.max(activeIndex - 1, 0);\nupdateActive(items);\ne.preventDefault();\n} else if (e.key === \"Enter\" && activeIndex >= 0) {\nconst active = items[activeIndex];\nselectTitle(active.dataset.name, active.dataset.id, active.dataset.mediaType);\ne.preventDefault();\n} else if (e.key === \"Escape\") {\ncloseList();\n}\n});\nfunction updateActive(items) {\nitems.forEach((li, i) => li.classList.toggle(\"active\", i === activeIndex));\n}\nfunction selectTitle(name, id, mediaType) {\ninput.value = name;\nhiddenId.value = id;\nhiddenName.value = name;\nhiddenType.value = mediaType;\nif (mediaType === 'movie') {\nform.action = 'https:\/\/www.mariaffe.com\/mmdb\/filmer\/filmoppslag\/';\n} else if (mediaType === 'tv') {\nform.action = 'https:\/\/www.mariaffe.com\/mmdb\/alle-tv-serier\/tv-serier-oppslag\/';\n}\ncloseList();\n}\nfunction closeList() {\nlist.style.display = \"none\";\nlist.innerHTML = \"\";\nactiveIndex = -1;\n}\ndocument.addEventListener(\"click\", function (e) {\nif (!form.contains(e.target)) closeList();\n});\nform.addEventListener(\"submit\", function (e) {\nif (!hiddenId.value) {\ne.preventDefault();\nalert(\"Velg en tittel fra forslagslisten.\");\n}\n});\n})();\n<\/script>\n\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"class_list":["post-2090","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.mariaffe.com\/mmdb\/wp-json\/wp\/v2\/pages\/2090","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mariaffe.com\/mmdb\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.mariaffe.com\/mmdb\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.mariaffe.com\/mmdb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mariaffe.com\/mmdb\/wp-json\/wp\/v2\/comments?post=2090"}],"version-history":[{"count":7,"href":"https:\/\/www.mariaffe.com\/mmdb\/wp-json\/wp\/v2\/pages\/2090\/revisions"}],"predecessor-version":[{"id":2628,"href":"https:\/\/www.mariaffe.com\/mmdb\/wp-json\/wp\/v2\/pages\/2090\/revisions\/2628"}],"wp:attachment":[{"href":"https:\/\/www.mariaffe.com\/mmdb\/wp-json\/wp\/v2\/media?parent=2090"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}