Image we have a page, foo.asp that could be rendered four different ways. The determining factor as to how the page in rendered is based on a querystring value, ‘type’. The first obstacle I had to overcome was how to direct the browser to the correct version of foo.asp. So, I changed the calling page link from foo.asp to foo.htm, but kept the querystring values. Then I created a new HTML page called foo.htm. This page is responsible for redirecting the browser to the proper HTML page. Next, I saved each version of foo.asp as foo.ver1.htm, etc.
Inside foo.htm I us a helper function to parse the querystring client side. The querystring is a property of the window.location object, window.location.search ( ask my buddy Mark Andreason why it’s ‘search’ and not ‘querystring’, asshole! ). So, this is what’s in foo.htm
and this allows for pseudo-redirection so the demo user has the impression that they’re looking at dynamic content.
Of course, this project was due the day before it was assigned, so I’m a wee bit busy today. Gotta go! 🙂