Welcome to EZDefinition.com
Technological Concepts, Abbreviations & Definitions
Main Menu
Main categories
  • Operating Systems
  • Computer Hardware
  • Internet
  • Programming Languages
  • Multimedia
  • Software
  • Security and Encryption
  • Communications and Networking
  • Organizations
  • Books
  • Databases
  • Games
  • E-commerce

    [an error occurred while processing this directive]

  • EZDefinition Sponsor
    Please visit our sponsor Parosoft.com
    Related Links to A Script that Uses Self-Referencing URLs to Jump to Internal Links
    [an error occurred while processing this directive]
    A Script that Uses Self-Referencing URLs to Jump to Internal Links
    [an error occurred while processing this directive]
    Computer Technologies  Programming Languages  Perl A Script that Uses Self-Referencing URLs to Jump to Internal Links

    A Script that Uses Self-Referencing URLs to Jump to Internal Links

    A Script that Uses Self-Referencing URLs to Jump to Internal Links

    (Without losing form information).
    Many people have experienced problems with internal links on pages that have forms. Jumping around within the document causes the state of the form to be reset. A partial solution is to use the self_url() method to generate a link that preserves state information. This script illustrates how this works.
    #!/usr/local/bin/perl

    use CGI;
    $query = new CGI;

    # We generate a regular HTML file containing a very long list
    # and a popup menu that does nothing except to show that we
    # don't lose the state information.
    print $query->header;
    print $query->start_html("Internal Links Example");
    print "<H1>Internal Links Example</H1>\n";

    print "<A NAME=\"start\"></A>\n"; # an anchor point at the top

    # pick a default starting value;
    $query->param('amenu','FOO1') unless $query->param('amenu');

    print $query->startform;
    print $query->popup_menu('amenu',[('FOO1'..'FOO9')]);
    print $query->submit,$query->endform;

    # We create a long boring list for the purposes of illustration.
    $myself = $query->self_url;
    print "<OL>\n";
    for (1..100) {
    print qq{<LI>List item #$_<A HREF="$myself#start">Jump to top</A>\n};
    }
    print "</OL>\n";

    print $query->end_html;


    [an error occurred while processing this directive]

    [an error occurred while processing this directive]
     

    All Rights Reserved

    Terms of usage   Please read our privacy stetment
    Copyright © 1999-2006 EZDefinition.com

     

    [an error occurred while processing this directive]