| 1. |
Solve : submit button to act as link? |
|
Answer» Hi guys, Something tells me you should create an array, use the onChange function to change a value, and have the submit button go to a different place depending on the value --matching the array data. Thanks for the INPUT, but it seems kop442000 hasn't visited for a while.I am a javascript learner. So I type all this code. there is 4 files :page1.htm,page2.htm,page3.htm,and index.htm ,please place them in the same forlder. page1.htm: Code: [Select]page1 haha...page2.htm: Code: [Select]page2 herepage3.htm: Code: [Select]this is page3index.htm: Code: [Select]<html> <head> <title>page changer</title> </head> <body> <iframe name="target_window" src="page2.htm"> </iframe> <select name="sel" onchange="document.all.target_window.src=sel.options(sel.selectedIndex).value;" > <option value="page1.htm">page1</option> <option value="page2.htm" selected>page2</option> <option value="page3.htm">page3</option> </select> <br> <input type="button" onclick="window.open(document.all.target_window.src,'_blank');" name="btn" value="View this page in new window"/> </body> </html> I display new page in iframe! first I forgot to add the button |
|