December 9, 200421 yr Is it possible to code a search form using CDML to use one of a couple format files to return the results, depending on a choice the web user makes? I have a couple search pages that are identical in format; the only difference is in their coded form info that specifies a different format file for returning the search results. It would simplify things if I could allow the user to choose which format file to use based on the kind of info they want returned (for example, online list with linked details, or printable copy, etc.) Any ideas? Thanks in advance, Peter Knowles
December 10, 200421 yr A couple of ways exist. One is to have a drop-down menu: <select name="-format"> <option value="mypage1.html">Page 1</option> <option value="mypage2.html">Page 2</option> <option value="mypage3.html">Page 3</option> .... </select> Another is to use some Javascript: In the <head>: <script>function subform(fpage) { document.myform.elements['-format'].value = fpage; document.myform.submit(); }</script> In the <body>: .... <a href="#" onclick="subform('page1.html');">Page 1</a> <a href="#" onclick="subform('page2.html');">Page 2</a> <a href="#" onclick="subform('page3.html');">Page 3</a> .... All the best. Garry
Create an account or sign in to comment