Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dropdown box and buttons

Status
Not open for further replies.

SurvivorTiger

Programmer
Jul 9, 2002
265
US
Hi everyone,

I have an iframe and a "Previous" & "Next" button and a dropdown box that lists page numbers. The user can change the iframe source by changing the values of the dropdown box. I also want to program the "Previous" & "Next" buttons to change the values of the dropdown box. For example if the dropdown box is on "Page 4" and you hit "Previous", I want it to change the selected index of the dropdown so that "Page 3" would be selected, thus changing the source of the iframe. Can anyone tell me how to do this using any method (html, javascript, vbscript, asp...etc.)??

Thanks in advance!


AIM: Survivertiger
 
HTML can't do it. ASP wouldn't help, since it is server side and needs screen to refresh, which is what you probably don't want, since you're using iframe. VBScript is proprietary MS scripting that only works in IE, so best avoided. You should use JavaScript. Here's the forum:
As for the solution. Just read what is in the dropdown and add one for next and subtract one for previous. Add some error checking so that you won't fall under page1 or something. You can get more details in the appropriate forum.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top