Seb, thank you very much. This worked like a charm..:-)
Booshan Rengachari Global Foreign Exchange Technology Corporate & Investment Banking Wachovia Bank N.A. 704-715-4799 ________________________________ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Sébastien Gruhier Sent: Wednesday, February 07, 2007 2:25 AM To: [email protected] Subject: Re: [Javawin] Form select component doesn't work well inside PWC I did it to your personal email here is the code <html> <head> <title>Select example</title> <script type="text/javascript" src="../javascripts/prototype.js"> </script> <script type="text/javascript" src="../javascripts/window.js"> </script> <script type="text/javascript" src="../javascripts/window_ext.js"> </script> <script type="text/javascript" src="../javascripts/effects.js"> </script> <script type="text/javascript" src="../javascripts/debug.js"> </script> <link href="../themes/default.css" rel="stylesheet" type="text/css"> <!-- Add this to have a specific theme--> <link href="../themes/alphacube.css" rel="stylesheet" type="text/css"> </head> <body> <center><a href="#" onclick="showEditWindow();">open window</a></center> <script type="text/javascript"> var editWin; var content = '\ <form>\ <div class="fvi">\ <div>Available Users</div>\ <select id="users" name="users" multiple size="5">\ <option value="5">5</option>\ <option value="6">6</option>\ <option value="7">7</option>\ </select>\ </div>\ <div class="fvi">\ <div id="plus" onclick="moveUsers(\'users\', \'projectUsers\');">\ <a href="#">Add</a>\ </div>\ <div id="minus" onclick="moveUsers( \'projectUsers\', \'users\');">\ <a href="#">Remove</a>\ </div>\ </div>\ <div class="fvi">\ <div>Project Users</div>\ <select id="projectUsers" name="projectUsers" multiple size="5">\ <option value="1">1</option>\ <option value="2">2</option>\ <option value="3">3</option>\ <option value="4">4</option>\ </select>\ </div>\ <div>\ <input style="height: 20px; font: 11px Tahoma;" type="button" name="submit" value="Submit" onclick="saveProject();"/>\ <input style="height: 20px; font: 11px Tahoma;" type="button" name="cancel" value="Cancel" onclick="closeEditWindow();"/>\ </div>\ </form>\ '; function showEditWindow() { var editWin = new Window( 'editwin', { opacity:1, resizable: true, minimizable: false, maximizable: false, closable: true, showEffect: Element.show, hideEffect: Element.hide}); // SEB: Add setDestroyOnClose to be sure the window will destroy on close button editWin.setDestroyOnClose(); editWin.setTitle( 'Select Test'); editWin.setSize( 300, 300); editWin.getContent().update( content); editWin.showCenter(); editWin.toFront(); } function closeEditWindow() { // SEB: as editWin is a local var, just use Windows class to close your window Windows.close("editwin"); } function moveUsers( src, dest) { var i; src= $(src); dest= $(dest); for( i=src.options.length-1; i>=0; i--) { if( src.options[i].selected) { var optn = document.createElement("OPTION"); optn.text = src.options[i].text; optn.value = src.options[i].value; dest.options.add(optn); src.remove(i); } } } WindowStore.init(); </script> </body> </html> On Feb 6, 2007, at 7:51 PM, Rengachari, Booshan wrote: Can someone please send the contents of the html file attached in the original email, as the content of the email without attaching it. Thanks in advance Booshan Rengachari ________________________________ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Rengachari, Booshan Sent: Monday, February 05, 2007 12:12 PM To: [email protected] Subject: Re: [Javawin] Form select component doesn't work well inside PWC Seb, Thank you very much for the quick response and your help. I really appreciate your effort to resolve everyone's problem. I love working with this component and group. I would love to see the change you made. But my corp firewall removed the attached html. Can you please fwd the same to [EMAIL PROTECTED] , or send the contents without attaching. Thanks Booshan Rengachari ________________________________ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Sébastien Gruhier Sent: Monday, February 05, 2007 9:20 AM To: [email protected] Subject: Re: [Javawin] Form select component doesn't work well inside PWC In fact you have you are using global scope reference which is bad. Firebug display a warning about it: Element referenced by ID/NAME in the global scope. Use W3C standard document.getElementById() instead. I think having global reference removed, browser do not like it. I change your code to make it work. Seb _______________________________________________ Javawin mailing list [email protected] http://mail.xilinus.com/mailman/listinfo/javawin_xilinus.com
_______________________________________________ Javawin mailing list [email protected] http://mail.xilinus.com/mailman/listinfo/javawin_xilinus.com
