Forums | Email a Colleague | FAQ

Dr. Website Archives

Dr. Website® Archives 2002

July 18, 2002
    Question:
    Dear Dr. Website:
    I would like to create text links in html that do not display with the standard underline.

    Is there a way to display html links without an underline short of creating a graphic for each link.

    Answer:
    You can do that using CSS. Here's an example:

    <STYLE TYPE="text/css">
    <!-- A:link, A:active
    {
    text-decoration : none;
    background : transparent;
    }
    A:visited
    {
    text-decoration : none;
    background : transparent;
    }
    A:hover
    {
    text-decoration : none;
    background : #ffcc00;
    } -->
    </STYLE>
    <A HREF="test.html">test</A>

    Note that you can also change the color of the text links as well by adding: color : #000000; to each style (#000000 equals black, while #ffffff would be white, etc.).
    Thanks

    --Dr.Website

    Question:
    Dear Dr. Website:
    Your site has help me greatly with understanding of html. Here is my scenario:

    I want to be able to run a script( click the submit )as soon as the page downloads.

    I do not want the user to click the submit button. I want to script to run as soon as the page is completely downloaded.

    Is this possible and how?

    Answer:
    You need to use the onLoad function to do this. Something like this is what you're after:

    <HTML>
    <HEAD>
    <SCRIPT
    LANGUAGE="JavaScript"
    > <!-- function doit(){ document.moveme.submit();
    }
    --> </SCRIPT>
    </HEAD>
    <BODY onLoad="doit()">
    <FORM METHOD=POST
    ACTION="mailto:you@yourdomain.com" NAME="moveme" >
    <INPUT TYPE="text"
    VALUE="Enter your email address here">
    <INPUT TYPE=Submit
    VALUE="Go"> </FORM>

    </BODY>

    Note that you can use any form; just make sure that you name the form appropriately (in the example above it is named "moveme."
    Thanks,

    --Dr.Website

    Question:
    Dear Dr. Website:
    I need to create a submit button that will email me the form I've laid out in the web site but will also send the user to another web page that confirms the email was sent?

    For example, here is the command I give currently:

    <FORM METHOD="POST" ACTION="mailto:jlcst81@pitt.edu" enctype="text/plain">

    blah, blah, blah

    <INPUT TYPE="submit" VALUE="Submit"><INPUT TYPE="reset" VALUE="Reset Form"></FORM>

    This allows me to have users submit the form to me but they may end up pressing submit multiple times thinking it hasn't sent.

    I want the button to also direct them to a confirmation page. I know the command is:

    <form method=get action="http://the confirmation web site.html">

    but I don't know how to incorporate it.

    Answer:
    You'll need to use a function that does two things, like this:

    <SCRIPT LANGUAGE="JavaScript">
    <!-- function doit()
    { document.moveme.submit();
    document.location.href="http://www.internet.com"; }
    --> </SCRIPT>
    <FORM METHOD=POST ACTION="mailto:you@yourdomain.com"
    NAME="moveme" >
    <INPUT TYPE="text"
    VALUE="Enter your email address here">
    <SCRIPT LANGUAGE="JavaScript">
    <!-- document.write('<INPUT TYPE=BUTTON VALUE="Go" onClick=doit()>');
    // --> </SCRIPT>
    <NOSCRIPT>
    <INPUT TYPE=Submit VALUE="Go">
    </NOSCRIPT>
    </FORM>

    Thanks

    --Dr.Website ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

ForumsEmail a Colleague · FAQ