Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- IE not executing a form with action a servlet and a complicated input submit
- <span style="color:#355D8A;">
- <!--SUBMIT-->
- <input onMouseOut="this.style.textDecoration='none'; this.style.cursor='auto'" style="background-color:transparent;color:#355D8A;
- width:120px; margin-left:0px;" onMouseOver="this.style.textDecoration='underline'; this.style.cursor='pointer'"
- type="submit" style="background-color:transparent;" name="cancel1" value="Cancel something"
- id="cancel1" /></span >
- <form action="some_servlet_call" method="post" name="form_name" id="form_id">
- [...]
- <body>
- <form action="some_servlet_call" method="post" name="form_name" id="form_id">
- <!-- PAGINA -->
- <input type="hidden" name="pagina" value="pagina_value" id="pagina" />
- [...]
- <!--COUNTER-->
- <input type="hidden" name="contatore" value="2" id="contatore" />
- <!--CODE-->
- <input type="hidden" name="code_value1" value="code_value" id="code_value1" />
- [...]
- <!--CODICE-->
- <input type="hidden" name="codice1" id="codice1" value="2" />
- [...]
- <table width="100%" align="center" >
- <tr >
- <td>
- <!-- SELECT -->
- <select id="select1" class="class_example" onChange="myUpdateSelect(1);">
- <option id="1option1" selected="selected">Option1</option>
- <option id="2option1">Option2</option>
- <option id="3option1">Option3</option>
- <option id="4option1">Option4</option>
- </select>
- <!--SELECT ASSOCIATED INPUT-->
- <input name="selectHidden1" id="selectHidden1" type="hidden" value="Option1" />
- </td>
- <td>
- <!--EMAIL-->
- <input id="email1" class="email_input_class" type="text" name="email1"
- onblur="if (this.value == '') {this.value = 'test@mail.com';}" style="width:190px;"
- onfocus="if (this.value == 'test@mail.com') {this.value = '';}" value="test@mail.com" />
- </td>
- [...]
- <td>
- <span style="color:#355D8A;">
- <!--SUBMIT-->
- <input onMouseOut="this.style.textDecoration='none'; this.style.cursor='auto'" style="background-color:transparent;color:#355D8A;
- width:120px; margin-left:0px;" onMouseOver="this.style.textDecoration='underline'; this.style.cursor='pointer'"
- type="submit" style="background-color:transparent;" name="cancel1" value="Cancel something"
- id="cancel1" /></span >
- </td>
- [...]
- function myUpdateSelect(counter){
- var selectId = "select"+counter;
- var selectHiddenId = "selectHidden"+counter;
- var selectChanged = document.getElementById(selectId);
- var selectHiddenChanged = document.getElementById(selectHiddenId);
- var idOption = selectChanged.options[selectChanged.selectedIndex].id;
- var selectedOption = document.getElementById(idOption);
- for(var i=0;i<selectChanged.options.length;i++){
- selectChanged.options[i].selected = false;
- }
- selectedOption.selected = true;
- selectHiddenChanged.value = selectedOption.value;
- }
Add Comment
Please, Sign In to add comment