I hoping for a tiny bit of help.
I have setup a form which pulls the value from #keyword and submits it as the url.
The page is http:// mysite.com /tags
I am having two problems:
- The .toLowerCase isn't working
- The url updates though it adds the name of the keyword input (which is keyword) like so: http:// mysite.com/tags?keyword=MYKEYWORD
I would like io to look like this instead: http:// mysite.com/tags/mykeyword
This is the code I have so far:
$(document).ready(function() {
$('#tag-search').click(function() {
goUrl = http://mysite.com/ + $('#keyword').val().toLowerCase();
window.location = goUrl;
});
});
and the form:
<form id="tagForm" class="uniForm">
<fieldset class="inlineLabels">
<div class="ctrlHolder">
<label for="keyword">Tag Keyword</label>
<input id="keyword" name="keyword" value="" size="35" class="textInput required" type="text" />
<p class="formHint">Add your tag keyword and hit submit</p>
</div>
<div class="buttonHolder"><button type="submit" id="tag-search" class="primaryAction">Submit</button></div>
</fieldset>
</form>