How about a little javascript?
jQuery(document).ready(function($){
$('#BUTTONID').click(function(){
document.localtion.href='http://www.mydomain.com/'+$('#FIELDID').val();
});
});
Excellent, thank you – I’m rusty on this sort of thing so will have to read up on how I implement it – in the meantime if anyone can explain, I’ll check back soon! Thanks
I’ve done a little testing and looking around. I’ve put the above jquery in a file, and point my form action at the .js file.
When i submit, the broswer just displays the JQuery code on a page. Not sure if this is because I’ve not set up the form / JQuery correcly, or if it’s to do with my XAMPP setup. (doing all this on localhost)
In the JQuery, I’ve changed #buttonid to the forms submit button ID value, and #fieldid to the forms input field ID. Guessing this is right? I’ve not used Javascript for years, and I’m very rusty on forms and server side stuff…
Could anyone familiar with this kind of thing lend a hand please? It would be great to get this working. Thanks!
Got it sorted ended with this:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js" type="text/javascript"></script>
<script>
jQuery(document).ready(function($){
$('#loginform').submit(function(){
window.location = 'http://www.mydomain.com/'+$('#login').val();
return false;
});
});
</script>
<form id="loginform">
<input id="login" type="text">
<input id="logingo" type="submit" value="Submit" />
</form>