SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Enthusiast
    Join Date
    Mar 2002
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question button type and form script questions (1 each)

    Hi.

    I downloaded a script to print a page. It didn't work. I downloaded another, and it did work, but I don't like the button type (actually, I'd prefer to have no button at all, and just text). Can I change the input type=button to input type= something else to make the text a link to the printer function? What is that something else?

    Also, I would like to add a form to my site which asks the visitor to choose one of three options and supply his/her name and e-mail address. I downloaded a cgi script, but it didn't work (I'm not hosted yet). Is there any way to e-mail the form to me without using a cgi/server? If so, what is it?

    Thank you.

  2. #2
    SitePoint Enthusiast
    Join Date
    Mar 2002
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Talking O.k. -- I figured out the first.

    But I still need an answer to the second. I've downloaded so many scripts that didn't work, and searched so many javascript websites and groups without finding even a hint about what I'm trying to accomplish I'm at my wits' end.

    Thanks.

  3. #3
    long gone but not forgotten AljapaCo's Avatar
    Join Date
    Aug 2001
    Location
    Sweden
    Posts
    548
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Im using a script for printing that you can find at http://www.aljapaco.com/award/nyawar...rd&val=purpose

    That works fine for me anyway

    About your last question, why not use a simple mailto:form !!??
    Last edited by AljapaCo; Apr 22, 2002 at 04:13.
    T O B I A S - S T R A N D H | visit my site here
    OPERA7 /MSIE6 /FireFox 1.1/Win2000 /ADSL /17" Screen /1024x768
    god doesn't create genius, he clones me.............

  4. #4
    SitePoint Enthusiast
    Join Date
    Mar 2002
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Please say more about the "mailto" form.

    I have a link for folks to e-mail me on each of my pages, but I wanted to be able to know which of three products they are interested in purchasing.

    How do I make a form that allows them to tell me their preference by checking one of three boxes and sending me their e-mail information? Can you give me a url to see the type of form you are talking about?

    Thanks.

  5. #5
    SitePoint Enthusiast
    Join Date
    Mar 2002
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Here is my script and HTML.

    Script:

    <language="JavaScript">

    /*
    Check required form elements script-
    By JavaScript Kit (http://javascriptkit.com)
    Over 200+ free scripts here!
    */

    function checkrequired(which){
    var pass=true
    if (document.images){
    for (i=0;i<which.length;i++){
    var tempobj=which.elements[i]
    if (tempobj.name.substring(0,8)=="required"){
    if (((tempobj.type=="text"||tempobj.type=="textarea")&&tempobj.value=='')||(tempobj.type.toString().charAt(0)=="s"&&tempobj.selectedIndex==-1)){
    pass=false
    break
    }
    }
    }
    }
    if (!pass){
    alert("One or more of the required elements are not completed. Please complete them, then submit again!")
    return false
    }
    else
    return true
    }
    </script>

    HTML:

    <form onSubmit="return checkrequired(this)" action="http://www.nrlwebresource.com/whiz-mail/cgi-bin/whiz-mail.pl" method="post">

    <!-- Configuration START -->

    <input type="hidden" name="admin_recipient" value="ashleystearns@attbi.com">
    <input type="hidden" name="admin_subject" value="What's Daphne Doing?">
    <input type="hidden" name="autoresp_from_name" value="Ashley Stearns">
    <input type="hidden" name="autoresp_message" value="Thanks for asking about my plans to publish Daphne and curricula based on Daphne Dabbles. As I am embarking on a new career and devoting more time to activism, Daphne is on sabbatical indefinitely. Please take a look at the "Good Science" page on my website and use the BlueWeb'n link to find great science content resources and websites.

    Again, thanks for your encouragement and interest in Daphne. I hope someday to complete my plans to finish editing the picture book and develop curricula based on it. When I do, you'll be one of the first to know about it.">
    <input type="hidden" name="autoresp_spam" value="1">
    <input type="hidden" name="autoresp_state" value="1">
    <input type="hidden" name="autoresp_subject" value="Here's what Daphne is Doing!">
    <input type="hidden" requiredname="database_state" value="1">
    <input type="hidden" name="form_type" value="existing">
    <input type="hidden" name="admin_recipient" value="ashleystearns@attbi.com">
    <input type="hidden" name="admin_recipient">
    <input type="hidden" name="admin_recipient">
    <input type="hidden" name="admin_recipient">
    <input type="hidden" name="results_link_text" value="Back to www.virtualashley.com">
    <input type="hidden" name="results_link_url" value="http://www.virtualashley.com">
    <input type="hidden" name="results_message" value="Thanks very much for taking time to write to Daphne. She's on sabbatical right now, but I'll keep you posted when she's ready to do more investigating.">
    <input type="hidden" name="results_results" value="0">
    <input type="hidden" name="results_template" value="4">
    <input type="hidden" requiredname="visitor_email" value="visitor_name">
    <input type="hidden" name="user_name" value="ashleystearns">

    <!-- Configuration END -->

    <fieldset>
    <legend>Hey Ashley Tell me When <i>Daphne Dabbles</i> is/legend>
    <input type="checkbox" name="book" value="published as a picture book">published as a picture book<br>
    <input type="checkbox" name="ebook" value="published as an e-book">published as an e-book<br>
    <input type="checkbox" name="anybook" value="published in any form">published in any form<br>
    <legend>And where I can find her! Here's my e-mail address/legend>
    <p font-size="10pt">Nameinput name="name" type="text" maxlength="220px"></p>
    <p font-size="10pt">Emailinput name="email" type="text" maxlength="220px"></p>
    <p font-size="10pt" align="center">(I know you're an independent publisher/producer, and you won't collect and sell my name, email address and surfing habits to anyone.)<br>
    <input type="submit" value="Thanks!"><input type="reset" value="Clear"><br></p>
    </fieldset>
    </form>

    I like this script because it validates and it has a reply on submit. I would like to keep both of these elements.

    Thank you for your help.


Bookmarks

Posting Permissions

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