Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Jan 2011
    Posts
    18
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Run time update of CGI web page

    Hi,

    I have created a form in perl using HTML. I do have a select field whose options I want to come from a list of directories present at perticular location(say \\hostname\abc\xyz\lmn) on some other machine.

    Can anyone help me how can I do this?

    My perl code for HTML page is like this:
    ##################################################
    print header;
    print start_html( -title => "Home Page",
    -bgcolor => "black",
    -text => "11");

    print <<HTML
    <pre>

    <b><font size="5" color="#12434546" face="arial"> Request form. </font></b>

    <form action="second_page.pl" method="POST">
    <font size="4" color="brown" face="arial" >

    Branch: <select name="branch" width="1">
    <option value="1">branch1</option>
    <option value="2">branch2</option>
    <option value="3">branch3</option>
    </select>


    DDK Version: <select name="ddk_version">
    <option value="default">default</option>
    <option value="$ddk_version[1]">$ddk_version[1]</option>
    <option value="$ddk_version[2]">$ddk_version[2]</option>
    </select>

    <input type="submit" value="submit" allign="centre">
    </font>
    </form>
    </body>
    </html>
    HTML
    ##################################################

    Actually I have hard-coded values of $ddk_version[1,2] in the begining, but I want these to come from list of directories present at perticular location on some other machine during runtime. (and that too latest 5)

    ****Also this perticular location is not fixed. It depends on other select options selected in the form.****

    Can anyone let me know how can I achieve this?

    Also I do have one more query:
    My one of the thread is resolved, but I am unable to see any EDIT button after my first post on that thread. Any idea why it is so?

    Thread Name: Form data collection in perl

    Thanks in advance.
    Last edited by rkaranjkar; 01-14-2011 at 03:09 PM.

  • #2
    New Coder
    Join Date
    Jan 2011
    Posts
    18
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Guys,

    84 viewers but no solution :-(
    Any perl expert can put some solution here..

  • #3
    Super Moderator
    Join Date
    May 2005
    Location
    Southern tip of Silicon Valley
    Posts
    2,871
    Thanks
    2
    Thanked 164 Times in 159 Posts
    What methods of connection do you have to this remote location, NFS mount, SSH, FTP, or what?

  • #4
    New Coder
    Join Date
    Jan 2011
    Posts
    18
    Thanks
    1
    Thanked 0 Times in 0 Posts
    I am not sure about the type of connection.
    Only thing I can tell is, I am able to access that path from windows. If I put the required path in run, I am able to access it.

    like start-->Run--> \\abc\xyz\lmn\ST\tests --> Enter.

    Then new window of that location opens.

  • #5
    Super Moderator
    Join Date
    May 2005
    Location
    Southern tip of Silicon Valley
    Posts
    2,871
    Thanks
    2
    Thanked 164 Times in 159 Posts
    I don't know if the diamond operator or glob function supports using UNC paths and I haven't tested this, but you could try:
    Code:
    my @dir_list =  glob '\\abc\xyz\lmn\ST\tests\*';
    If that doesn't work (and I don't think it will), then you'll need to find out what connection methods you can use such as SSH or telnet. Once that is determined, we can work up some sample code.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •