My drop-down menu is as follows: (select one and a new page pops up)
<select name="select" onChange="javascript:window.open(this.options[this.selectedIndex].value;">
<option value="#" selected>Please select operation</option>
<option value="view-gj-action.do?id=<%=gj.getId()%>">View details</option>
<option value="modify-gj-action.do?id=<%=gj.getId()%>">Modify information</option>
<option value="add-gj-file-action.do?id=<%=gj.getId()%>">Add drawing</option>
</select>
Can it be like this: a new page pops up when you select "Add Drawing", but does not pop up when you select "View Details" and "Modify Information".
Please expert help, thanks in advance.
Pleaseqiqituoto remind me again, thank you.
////////////////////////////////////////////////// //
I think this big brother means this, that is, let you write a function yourself, judge it and submit your Action
What I mean is that there is a choice to pop up a new page. When you select "Add drawing", a new page will pop up, and when you select "View details" and "Modify information", it will be displayed on this page. Please advise me, thank you!
<option value="view-gj-action.do?id=<%=gj.getId()%>"><a href="...">View details</a></option>
-------------------------------------------
Brother, this can't work, I tried it and couldn't.
Haha it's like this
<select name="select" onChange="if(this.value==1){location.href='view-gj-action.do?id=<%=gj.getId()%>';}if( this.value==2){location.href='modify-gj-action.do?id=<%=gj.getId()%>';}if(this.value=3){window.open(' add-gj-file-action.do?id=<%=gj.getId()%>');}">
<option value="#" selected>Please select operation</option>
<option value=1>View details</option>
<option value=2>Modify information</option>
<option value=3>Add drawing</option>
</select>
location.href is opened on this page
window.open is the new window