Talon21 Posted March 18, 2009 Share Posted March 18, 2009 Hi, I have the following select fields: <label for="insurancePolicy">בחר את סוג הביטוח:</label> <select name='insurancePolicy' style="width:154px;"> <option>בחר את סוג הביטוח</option> <option value='1' name='ביטוח דירה'></option> <option value='2' name='ביטוח נסיעות'>ביטוח נסיעות</option> <option value='3' name='ביטוח בריאות'>ביטוח בריאות</option> <option value='4' name='ביטוח רכב'>ביטוח רכב</option> </select> And I want when the user select value='ביטוח רכב' he will redirect to a diffrent page. How can I do that? Thanks in Advance Quote Link to comment Share on other sites More sharing options...
irkevin Posted March 18, 2009 Share Posted March 18, 2009 You might want to use javascript for that. Just google for Javascript DropDown Navigation Quote Link to comment Share on other sites More sharing options...
Festy Posted March 18, 2009 Share Posted March 18, 2009 In the onclick event of your dropdown, call a javascript function. In that function use document.location = 'your url' to redirect to a different page. Tell me if it works. Quote Link to comment Share on other sites More sharing options...
Talon21 Posted March 18, 2009 Author Share Posted March 18, 2009 In the onclick event of your dropdown, call a javascript function. In that function use document.location = 'your url' to redirect to a different page. Tell me if it works. thank you can you please send me an example code Quote Link to comment Share on other sites More sharing options...
syed Posted March 18, 2009 Share Posted March 18, 2009 Example. <select> <option onclick="document.location='http://www.google.com'">Google</option> <option onclick="document.location='http://www.msn.com'">MSN</option> <option onclick="document.location='http://www.yahoo.com'">Yahoo</option> </select> Quote Link to comment Share on other sites More sharing options...
Talon21 Posted March 18, 2009 Author Share Posted March 18, 2009 Thank you very much problem fixed I used this one: <option onclick="document.location='http://www.yahoo.com'">Yahoo</option> Thanks Again. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.