I am trying to write a little snippet that allows a user to go to i.e. navigate to) a new url, based on a user selection in an option select control.
<script type="text/javascript">
/* <[CDATA[ */
jQuery.noConflict();
jQuery(document).ready(function(){
var id = jQuery($this).val();
var url = some_Lookup_func(id);
jQuery("#the_id").change(function () { /* how do I navigate the browser to 'url' ?*/ );
});
/* ]]> */
</script>
Note: This is not AJAX behaviour I want, I want the browser to behave as though you had clicked on a hyperlink. I have done this before, but I have forgotten how to do it. I had a look at the jQuery docs, and load() does not seem to do it – because I do not want to place the contents in the current page – I want to:
- go to an entirely new page
- pass parameters to the url that I am navigating to (e.g. the id of the selected item
Best Answer
jQuery
HTML