Hi folks, hoping someone can help me out.
I have a simple asp page News.asp, which contains a form; frmNews, with a combo box on it, cmbNews.
The combo box contains numerical values, (at the moment 0,1,2). These values represent 'old' (and the 'current') pages of news items for the site. The plan is to be able to select a page number eg "1" from the combo box and be 'instantly' 'forwarded' there as follows: News.asp?page="1"
its actually a redirection to the same page (news.asp) where the page variable is re-queried and the page created according to this number when the page loads. Because the total number of pages at any time will be unknown, it is not possible to put the addresses of the pages into the combo box as follows:
<option value = "http://....news.asp?page=
"1"> 1 </option>
the current number of pages is calculated (using entries in an SQL database table) as the page is created. I also do not want to submit the form and request the combo box value on a seperate script and then redirect back to the original page - i would rather do everything from the parent page if i can; my server is rather slow at the moment and im trying to avoid un-necessary postings.
a.) obtain the selected value of the combo box
b.) use the value to formulate the addresss of the page to redirect to:
var1 = "News.asp?page="
var2 = "1" <---- the combo box value (obtained directly from cmbNews)
with ASP its easy - response.redirect var1 & var2.... etc
c.) actually do the redirection (window.location=...? something like that?)
can anyone give me any help at all on this? im really stumped :(
Its kinda urgent, so ANY help at all is more than appreciated. Thanks ppl!