I have this following code
jQuery('#main-menu > ul > li.search')
.append('<ul class="search-box sub-menu"><li><form action="http://####.####.org.uk" id="searchform" method="get"><input type="text" name="s" id="s" placeholder="Search"></form></li></ul>');
It’s specifically this bit I’m interested in
<form action="http://####.####.org.uk" id="searchform" method="get">
where ####.####.org.uk is the site index of the site I’m working on, I however need this to not be hardcoded in, and just reference back to the base path, such as site.com, this code can be called from anywhere on the site, so could be called from site.com/fdsifudfa.php, site.com/test/test/123/lol.php, for example. I need this form action to go to site.com only.
I don’t want to have a fixed site path in here as this could be anything (code could move around) / be resold.