Re: [webmin-devel] Select button
"PEOPLES, MICHAEL P" <[email protected]> Wed, 20 Mar 2013 19:23:41 +0000
| Newsgroups | gmane.comp.web.webmin.devel,gmane.comp.web.webmin.general |
|---|---|
| Message-ID | <B49D6855C20D22429FFD34954457A0141485A662@MISOUT7MSGUSR9F.ITServices.sbc.com> |
--===============2745904007363412714== Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_B49D6855C20D22429FFD34954457A0141485A662MISOUT7MSGUSR9F_" --_000_B49D6855C20D22429FFD34954457A0141485A662MISOUT7MSGUSR9F_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable What I always do is look through all of the other modules to see if I can f= ind a function like the one I want, or at least one that is similar. Then, examine the code in that module and modify it to your requirements. If you're curious as to which modules might contain such functions, search = for JavaScript references in the files. You can do this finding all the fi= les containing source code, creating a list of them, then looping through t= he list, searching each file for the "jsp" or other relevant tags. This may not always work for you, but it's how I created my custom modules. Michael Peoples (mp4783) iGEMS COE, Deployment, Engineering, Application Support and Security Global Service Assurance, M5 AT&T Business Solutions Office: +1 614-886-0923 Mobile: +1 614-886-0923 Senior Systems Manager [email protected]<mailto:[email protected]> This e-mail and any files transmitted with it are AT&T property, are confid= ential, and are intended solely for the use of the individual or entity to = whom this email is addressed. If you are not one of the named recipient(s) = or otherwise have reason to believe that you have received this message in = error, please notify the sender and delete this message immediately from yo= ur computer. Any other use, retention, dissemination, forwarding, printing,= or copying of this e-mail is strictly prohibited." From: Emma wasanzy [mailto:[email protected]] Sent: Wednesday, March 20, 2013 3:15 PM To: Webmin development list; Webmin users list Subject: [webmin-devel] Select button Hello, In the module am writing for tomcat, I want to provide two select menu(drop= down menu). There a so many tomcat instance and each of them has applicatio= ns under them. Now, if someone want to upload a new jsp to a particular tom= cat say /var/lib/tomcat5/webapps/myapp is where the jsp will be uploaded to= . I want the first select menu to provide the list of all the tomcat instan= ces on the server(This I have done successfully). The second select menu should contain all the applications under the select= ed tomcat instance from the first menu select. so if I select tomcat5, the= second select menu should load automatically all the applications under to= mcat5. I know there is a javascript function that can do something like that (onch= ange or so). But how can I do this? Any help will be appreciated much. I have my two menu select with the code below: print &ui_table_row($text{'inst_select'}, &ui_select("inst", $in{'inst'}, [ map { [ $_ ] } @insts ] ) ); This is not working yet. print &ui_table_row( $text{'select_app'}, &ui_select("ap", $in{'inst'}, [ map { [ $_ ] } @apps ] ) ); I will be using the two select menu to construct the directory to which the= jsp is to be saved. Cheers! --_000_B49D6855C20D22429FFD34954457A0141485A662MISOUT7MSGUSR9F_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable <html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr= osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" = xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" xmlns=3D"http:= //www.w3.org/TR/REC-html40"> <head> <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dus-ascii"= > <meta name=3D"Generator" content=3D"Microsoft Word 12 (filtered medium)"> <style><!-- /* Font Definitions */ @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4;} @font-face {font-family:Tahoma; panose-1:2 11 6 4 3 5 4 4 2 4;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0in; margin-bottom:.0001pt; font-size:12.0pt; font-family:"Times New Roman","serif";} a:link, span.MsoHyperlink {mso-style-priority:99; color:blue; text-decoration:underline;} a:visited, span.MsoHyperlinkFollowed {mso-style-priority:99; color:purple; text-decoration:underline;} span.EmailStyle17 {mso-style-type:personal-reply; font-family:"Courier New"; color:#0707B9;} .MsoChpDefault {mso-style-type:export-only;} @page WordSection1 {size:8.5in 11.0in; margin:1.0in 1.0in 1.0in 1.0in;} div.WordSection1 {page:WordSection1;} --></style><!--[if gte mso 9]><xml> <o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" /> </xml><![endif]--><!--[if gte mso 9]><xml> <o:shapelayout v:ext=3D"edit"> <o:idmap v:ext=3D"edit" data=3D"1" /> </o:shapelayout></xml><![endif]--> </head> <body lang=3D"EN-US" link=3D"blue" vlink=3D"purple"> <div class=3D"WordSection1"> <p class=3D"MsoNormal"><span style=3D"font-family:"Courier New";c= olor:#0707B9">What I always do is look through all of the other modules to = see if I can find a function like the one I want, or at least one that is s= imilar.<o:p></o:p></span></p> <p class=3D"MsoNormal"><span style=3D"font-family:"Courier New";c= olor:#0707B9"><o:p> </o:p></span></p> <p class=3D"MsoNormal"><span style=3D"font-family:"Courier New";c= olor:#0707B9">Then, examine the code in that module and modify it to your r= equirements. <o:p></o:p></span></p> <p class=3D"MsoNormal"><span style=3D"font-family:"Courier New";c= olor:#0707B9"><o:p> </o:p></span></p> <p class=3D"MsoNormal"><span style=3D"font-family:"Courier New";c= olor:#0707B9">If you’re curious as to which modules might contain suc= h functions, search for JavaScript references in the files. You can d= o this finding all the files containing source code, creating a list of them, then looping through the list, searching each file for the= “jsp” or other relevant tags.<o:p></o:p></span></p> <p class=3D"MsoNormal"><span style=3D"font-family:"Courier New";c= olor:#0707B9"><o:p> </o:p></span></p> <p class=3D"MsoNormal"><span style=3D"font-family:"Courier New";c= olor:#0707B9">This may not always work for you, but it’s how I create= d my custom modules.<o:p></o:p></span></p> <p class=3D"MsoNormal"><span style=3D"font-family:"Courier New";c= olor:#0707B9"><o:p> </o:p></span></p> <p class=3D"MsoNormal"><span style=3D"font-family:"Courier New";c= olor:blue">Michael Peoples (mp4783)<o:p></o:p></span></p> <p class=3D"MsoNormal"><span style=3D"font-family:"Courier New";c= olor:blue">iGEMS COE, Deployment, Engineering, Application Support and Secu= rity<o:p></o:p></span></p> <p class=3D"MsoNormal"><span style=3D"font-family:"Courier New";c= olor:blue">Global Service Assurance, M5<o:p></o:p></span></p> <p class=3D"MsoNormal"><span style=3D"font-family:"Courier New";c= olor:blue">AT&T Business Solutions<o:p></o:p></span></p> <p class=3D"MsoNormal"><span style=3D"font-family:"Courier New";c= olor:blue">Office: +1 614-886-0923<o:p></o:p></span></p> <p class=3D"MsoNormal"><span style=3D"font-family:"Courier New";c= olor:blue">Mobile: +1 614-886-0923<o:p></o:p></span></p> <p class=3D"MsoNormal"><span style=3D"font-family:"Courier New";c= olor:blue"><o:p> </o:p></span></p> <p class=3D"MsoNormal"><span style=3D"font-family:"Courier New";c= olor:blue">Senior Systems Manager<o:p></o:p></span></p> <p class=3D"MsoNormal"><span style=3D"font-size:10.0pt;font-family:"Co= urier New";color:blue"><a href=3D"mailto:[email protected]"><span style= =3D"font-size:12.0pt;color:blue">[email protected]</span></a></span><span st= yle=3D"font-size:11.0pt;font-family:"Courier New";color:#0707B9">= <o:p></o:p></span></p> <p class=3D"MsoNormal"><span style=3D"font-size:11.0pt;font-family:"Ca= libri","sans-serif";color:#0707B9"><o:p> </o:p></span><= /p> <p class=3D"MsoNormal"><i><span style=3D"font-size:10.0pt;font-family:"= ;Arial","sans-serif";color:black">This e-mail and any files = transmitted with it are AT&T property, are confidential, and are intend= ed solely for the use of the individual or entity to whom this email is addressed. If you are not one of the named recipient(s) or otherw= ise have reason to believe that you have received this message in error, pl= ease notify the sender and delete this message immediately from your comput= er. Any other use, retention, dissemination, forwarding, printing, or copying of this e-mail is strictly prohibited.&qu= ot;</span></i><span style=3D"font-size:11.0pt;font-family:"Calibri&quo= t;,"sans-serif";color:blue"><o:p></o:p></span></p> <p class=3D"MsoNormal"><span style=3D"font-family:"Courier New";c= olor:#0707B9"><o:p> </o:p></span></p> <div style=3D"border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in = 0in 0in"> <p class=3D"MsoNormal"><b><span style=3D"font-size:10.0pt;font-family:"= ;Tahoma","sans-serif"">From:</span></b><span style=3D"font-s= ize:10.0pt;font-family:"Tahoma","sans-serif""> Emma was= anzy [mailto:[email protected]] <br> <b>Sent:</b> Wednesday, March 20, 2013 3:15 PM<br> <b>To:</b> Webmin development list; Webmin users list<br> <b>Subject:</b> [webmin-devel] Select button<o:p></o:p></span></p> </div> <p class=3D"MsoNormal"><o:p> </o:p></p> <div> <p class=3D"MsoNormal">Hello,<o:p></o:p></p> <div> <p class=3D"MsoNormal"><o:p> </o:p></p> </div> <div> <p class=3D"MsoNormal">In the module am writing for tomcat, I want to provi= de two select menu(dropdown menu). There a so many tomcat instance and each= of them has applications under them. Now, if someone want to upload a new = jsp to a particular tomcat say /var/lib/tomcat5/webapps/myapp is where the jsp will be uploaded to. I want the first select menu to prov= ide the list of all the tomcat instances on the server(This I have done suc= cessfully).<o:p></o:p></p> </div> <div> <p class=3D"MsoNormal">The second select menu should contain all the applic= ations under the selected tomcat instance from the first menu select.= so if I select tomcat5, the second select menu should load automatically a= ll the applications under tomcat5.<o:p></o:p></p> </div> <div> <p class=3D"MsoNormal"><o:p> </o:p></p> </div> <div> <p class=3D"MsoNormal">I know there is a javascript function that can do so= mething like that (onchange or so). But how can I do this? Any help will be= appreciated much.<o:p></o:p></p> </div> <div> <p class=3D"MsoNormal"><o:p> </o:p></p> </div> <div> <p class=3D"MsoNormal">I have my two menu select with the code below:<o:p><= /o:p></p> </div> <div> <p class=3D"MsoNormal"><o:p> </o:p></p> </div> <div> <p class=3D"MsoNormal"> print &ui_table_row($text{'inst_select'},<= o:p></o:p></p> </div> <div> <p class=3D"MsoNormal"> &nb= sp; &ui_select("inst", $in{'inst'},<o:p></o:p></p> </div> <div> <p class=3D"MsoNormal"> &nb= sp; [ map { [ $_ ] } @insts ] ) );<o:p></o:p></p> </div> <div> <p class=3D"MsoNormal"><o:p> </o:p></p> </div> <div> <p class=3D"MsoNormal">This is not working yet.<o:p></o:p></p> </div> <div> <p class=3D"MsoNormal">print &ui_table_row( $text{'select_app'},<o:p></= o:p></p> </div> <div> <p class=3D"MsoNormal"> &nb= sp; &ui_select("ap", $in{'inst'},<o:p></o= :p></p> </div> <div> <p class=3D"MsoNormal"> &nb= sp; [ map { [ $_ ] } @apps ] ) );<o:p></o:p></p= > </div> <div> <p class=3D"MsoNormal"><o:p> </o:p></p> </div> <div> <p class=3D"MsoNormal"><o:p> </o:p></p> </div> <div> <p class=3D"MsoNormal"><o:p> </o:p></p> </div> <div> <p class=3D"MsoNormal"><o:p> </o:p></p> </div> <div> <p class=3D"MsoNormal">I will be using the two select menu to construct the= directory to which the jsp is to be saved.<o:p></o:p></p> </div> <div> <p class=3D"MsoNormal"><o:p> </o:p></p> </div> <div> <p class=3D"MsoNormal"><o:p> </o:p></p> </div> <div> <p class=3D"MsoNormal">Cheers!<o:p></o:p></p> </div> <div> <p class=3D"MsoNormal"><o:p> </o:p></p> </div> <div> <p class=3D"MsoNormal"><o:p> </o:p></p> </div> <div> <p class=3D"MsoNormal"><o:p> </o:p></p> </div> <div> <p class=3D"MsoNormal"><o:p> </o:p></p> </div> <div> <p class=3D"MsoNormal"><o:p> </o:p></p> </div> </div> </div> </body> </html> --_000_B49D6855C20D22429FFD34954457A0141485A662MISOUT7MSGUSR9F_-- --===============2745904007363412714== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_mar --===============2745904007363412714== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline - Forwarded by the Webmin development list at [email protected] To remove yourself from this list, go to http://lists.sourceforge.net/lists/listinfo/webadmin-devel --===============2745904007363412714==--