HTML Form Initialization

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jon Kane

    HTML Form Initialization

    I do not know if this is possible or not. I haven't been able to do it yet.
    I'd like to have a web page with a list of like 50 links. After clicking on
    a link it opens another web page (same page for all links) that has a form
    with a textbox containing the text of the link clicked on from the previous
    web page. I hope this makes sense. If this is possible I'd appreciate some
    help accomplishing it. Thanks.


  • Jim Dabell

    #2
    Re: HTML Form Initialization

    Jon Kane wrote:
    [color=blue]
    > I'd like to have a web page with a list of like 50 links. After clicking
    > on a link it opens another web page (same page for all links) that has a
    > form with a textbox containing the text of the link clicked on from the
    > previous web page.[/color]

    You can do it unreliably with Javascript, or reliably with a server-side
    script, such as PHP. For example:

    index.html:

    [...]
    <li><a href="process.p hp?text=Link%20 One">Link One</a></li>
    <li><a href="process.p hp?text=Link%20 Two">Link Two</a></li>
    <li><a href="process.p hp?text=Link%20 Three">Link Three</a></li>
    [...]

    process.php:

    [...]
    <input type="text" name="..."
    value="<?php echo(htmlentiti es($_REQUEST['text'])); ?>">
    [...]

    For more information:

    <URL:news:comp. lang.php>
    <URL:http://www.php.net/>
    <URL:news:comp. lang.javascript >

    --
    Jim Dabell

    Comment

    Working...