Question

I need to create a custom search box that leads to an outside url and I'm trying to figure out the best way to do this in Joomla 3.0

For example: We need to create a text field with character input and have a button that when clicked takes the data in the text field and inserts it into the "variable" part of this URL and then takes you to this URL:

https://forexample.com/storefront/search.do;jsessionid=CD66CBFCC5658D6C9327AA269764EBB2?searchType=keyword&keyword="variable"&emailAddress=

Was it helpful?

Solution

You could use jQuery:

$("button").click(function() {
    var variable = $("#textbox").val();
    window.location.replace("yoururl&" + variable);
})
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top