Hi friends, I have to main pages in html with course details. One (X) page has html select option with all courses. If i select in any pages and any one course to apply, then i redirect to X page to user that option has selected by default in X page. I have idea to pass value in url, but how can i retrive the correct option in X pages. I am using only html and javascript. Please provide your any solution in html, js or jquery only. This is purely html site so solution i need in that only and not a programming language like php or any other.
views:
20answers:
1
+1
A:
Do you mean something like this?
<script type="text/javascript">
function redirect(sel) {
var url = sel.options[sel.selectedIndex].value;
if (url) {
window.location.href = url;
}
}
</script>
<select onchange="redirect(this);">
<option value="">Please select</option>
<option value="http://www.google.com/">First (Google)</option>
<option value="http://www.yahoo.com/">Second (Yahoo)</option>
</select>
Tim Down
2010-06-23 10:53:37
No i am asking some other pages to X page, but your solution is X page to some other pages. Ok anyway it provide the somewhat idea. Thanks for your reply.
Karthik
2010-06-23 11:24:44