{"id":83,"date":"2018-10-27T18:23:43","date_gmt":"2018-10-27T16:23:43","guid":{"rendered":"https:\/\/www.rothamel.com\/?p=83"},"modified":"2018-10-28T20:14:06","modified_gmt":"2018-10-28T19:14:06","slug":"url-parameter-mit-javascript-auslesen","status":"publish","type":"post","link":"https:\/\/www.rothamel.com\/index.php\/2018\/10\/27\/url-parameter-mit-javascript-auslesen\/","title":{"rendered":"Extract URL parameters via JavaScript"},"content":{"rendered":"<p>Just a short code snippet that allows the extraction of URL parameters via JavaScript:<\/p>\n<pre>function get_url_param( name )\r\n{\r\nname = name.replace(\/[\\[]\/,\"\\\\\\[\").replace(\/[\\]]\/,\"\\\\\\]\");\r\nvar regexS = \"[\\\\?&amp;]\"+name+\"=([^&amp;#]*)\";\r\nvar regex = new RegExp( regexS );\r\nvar results = regex.exec( window.location.href );\r\n\r\nif ( results == null )\r\nreturn \"\";\r\nelse\r\nreturn results[1];\r\n}\r\n\r\n<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Just a short code snippet that allows the extraction of URL parameters via JavaScript: function get_url_param( name ) { name = name.replace(\/[\\[]\/,&#8221;\\\\\\[&#8220;).replace(\/[\\]]\/,&#8221;\\\\\\]&#8221;); var regexS = &#8220;[\\\\?&amp;]&#8221;+name+&#8221;=([^&amp;#]*)&#8221;; var regex = new RegExp( regexS ); var results = regex.exec( window.location.href ); if ( results == null ) return &#8220;&#8221;; else return results[1]; } &nbsp;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[5],"tags":[],"class_list":["post-83","post","type-post","status-publish","format-standard","hentry","category-java"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9W9h9-1l","jetpack-related-posts":[{"id":149,"url":"https:\/\/www.rothamel.com\/index.php\/2019\/09\/06\/howto-setup-solr-eclipse-development-environment\/","url_meta":{"origin":83,"position":0},"title":"HowTo: Setup Solr + Eclipse development environment","author":"Rolf Rothamel","date":"2019-09-06","format":false,"excerpt":"Solr from sources for development with eclipse Getting sources and tools Clone solr sources for your desired branch in eclipse from githubinstall ant, install perl (for dist creation) see portable perl from strawberry perl if you don't have admin rights Setup go to your git repository of solr and to\u2026","rel":"","context":"In &quot;Allgemein&quot;","block_context":{"text":"Allgemein","link":"https:\/\/www.rothamel.com\/index.php\/category\/allgemein\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":228,"url":"https:\/\/www.rothamel.com\/index.php\/2020\/07\/17\/container-teil-2-arbeiten-mit-docker-containern\/","url_meta":{"origin":83,"position":1},"title":"Container \u2013 Part 2: Working with Docker-Containers","author":"Rolf Rothamel","date":"2020-07-17","format":false,"excerpt":"After showing the creation of an exemplary Docker container in the first part, this part of the article series now focuses on working with containers.","rel":"","context":"In &quot;Allgemein&quot;","block_context":{"text":"Allgemein","link":"https:\/\/www.rothamel.com\/index.php\/category\/allgemein\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":42,"url":"https:\/\/www.rothamel.com\/index.php\/2018\/05\/22\/java-stack-vs-heap\/","url_meta":{"origin":83,"position":2},"title":"Java: Stack vs. Heap","author":"Rolf Rothamel","date":"2018-05-22","format":false,"excerpt":"Stack vs Heap 1. Stack 1.1. Struktur Der Stack stellt einen Speicherbereich dar der in Form eines LIFO Puffers (Last In \u2013 Fist Out) organisiert ist. Elemente die zuerst auf dem Stack abgelegt werden liegen unten, die zuletzt abgelegten Elemente liegen oben. Durch die Struktur des Stacks und der hierdurch\u2026","rel":"","context":"In &quot;Java&quot;","block_context":{"text":"Java","link":"https:\/\/www.rothamel.com\/index.php\/category\/java\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":75,"url":"https:\/\/www.rothamel.com\/index.php\/2018\/10\/27\/liferay-development-for-beginners-part-one-setup-your-own-instance\/","url_meta":{"origin":83,"position":3},"title":"Liferay-Development for beginners &#8211; Part One \u2013 Setup your own instance","author":"Rolf Rothamel","date":"2018-10-27","format":false,"excerpt":"This little tutorial is written for users that are familiar with the following points, so they are not explained in detail: Working with linux (or any other OS of your choice), an editor like vi, etc. Install and configure a Mysql instance Creation of schema and assignment of user and\u2026","rel":"","context":"In &quot;Java&quot;","block_context":{"text":"Java","link":"https:\/\/www.rothamel.com\/index.php\/category\/java\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":219,"url":"https:\/\/www.rothamel.com\/index.php\/2020\/07\/15\/docker-teil-1-tomcat-im-docker-container\/","url_meta":{"origin":83,"position":4},"title":"Container &#8211; Part 1: Tomcat im Docker-Container","author":"Rolf Rothamel","date":"2020-07-15","format":false,"excerpt":"Docker represents a pleasant possibility to create clearly defined, lightweight runtime environments (containers) and to distribute them if necessary. In the following, the creation and possible use is shown using the example of a container with Tomcat and OpenSuse.","rel":"","context":"In &quot;Allgemein&quot;","block_context":{"text":"Allgemein","link":"https:\/\/www.rothamel.com\/index.php\/category\/allgemein\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":77,"url":"https:\/\/www.rothamel.com\/index.php\/2018\/10\/27\/liferay-development-for-beginners-part-two-creation-of-a-development-environment\/","url_meta":{"origin":83,"position":5},"title":"Liferay-Development for beginners \u2013 Part two \u2013 Creation of a development environment","author":"Rolf Rothamel","date":"2018-10-27","format":false,"excerpt":"The development for the Liferay portal is quite nice by using a local develop environment with Eclipse, Mysql and Liferay. Therefore you should download the following components: Liferay (http:\/\/sourceforge.net\/projects\/lportal\/files\/Liferay%20Portal\/) Liferay Portal bundled with Tomcat Liferay Portal sources Liferay Portal Documentation Liferay Portal SDK Eclipse Eclipse Liferay IDE (downloadable via Eclipse\u2026","rel":"","context":"In &quot;Java&quot;","block_context":{"text":"Java","link":"https:\/\/www.rothamel.com\/index.php\/category\/java\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/www.rothamel.com\/index.php\/wp-json\/wp\/v2\/posts\/83","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rothamel.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rothamel.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rothamel.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rothamel.com\/index.php\/wp-json\/wp\/v2\/comments?post=83"}],"version-history":[{"count":7,"href":"https:\/\/www.rothamel.com\/index.php\/wp-json\/wp\/v2\/posts\/83\/revisions"}],"predecessor-version":[{"id":95,"href":"https:\/\/www.rothamel.com\/index.php\/wp-json\/wp\/v2\/posts\/83\/revisions\/95"}],"wp:attachment":[{"href":"https:\/\/www.rothamel.com\/index.php\/wp-json\/wp\/v2\/media?parent=83"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rothamel.com\/index.php\/wp-json\/wp\/v2\/categories?post=83"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rothamel.com\/index.php\/wp-json\/wp\/v2\/tags?post=83"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}