Professional Web Applications Themes

URL Form Information - Macromedia Dynamic HTML

Hi guys, I've seen this on another website before and am trying to do it myself. I want to create a form that has two text fields - 'Image name' and 'Image ID'. How can I set it up so that I can type something like www.website.com/form&imagename=green and 'green' will appear in the image name text field? Thanks in advance for any help...

  1. #1

    Default URL Form Information

    Hi guys,
    I've seen this on another website before and am trying to do it myself. I want
    to create a form that has two text fields - 'Image name' and 'Image ID'. How
    can I set it up so that I can type something like
    www.website.com/form&imagename=green and 'green' will appear in the image name
    text field?
    Thanks in advance for any help

    collin45 Guest

  2. #2

    Default Re: URL Form Information

    If you link to a page like this -

    http://www.example.com/form/?imagecolor=green

    then you can p that variable from the URL using server scripting on the
    default page that is in the 'form' folder, and use it to specify the value
    of the 'color' field in the form. Using PHP, for example, the default page
    in the 'form' folder would have this -

    $color=isset($_GET['imagecolor)?$_GET['imagecolor']:'';
    (which will set the value of $color to either null, or to the color value,
    depending on whether the URL contains that 'imagecolor' variable)

    and then later you can have -

    <input type="text" value="<?php echo $color ?>"....

    --
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs, Tutorials & Resources
    ==================


    "collin45" <com> wrote in message
    news:frif76$p6n$macromedia.com... 

    Murray Guest

  3. #3

    Default Re: URL Form Information

    Thanks for the reply,
    But sorry I am still not clear on what needs to be done. Here is a form code I
    have on one of my pages

    <div id="contact">
    <form method="post" action="contact.php">
    <p class="style7">Name:
    <br />
    <input type="text" name="name" id="name" />
    </p>
    <p class="style7">Email:<br />
    <label for="email"></label>
    <input name="email" type="text" id="email"
    onblur="MM_validateForm('name','','R','email','',' RisEmail','message','','R');re
    turn doent.MM_returnValue" />
    </p>
    <p class="style7">Me<span class="style13">ss</span>age:<br />

    <label for="message"></label>
    <textarea name="message" rows="5" id="message"></textarea>
    </p>
    <p class="style7">
    <label for="name"></label>
    <label for="button"></label>
    <input name="button" type="submit" id="button"
    onclick="MM_validateForm('contact','','NisEmail'); return
    doent.MM_returnValue" value="Submit" />
    </p>
    <p class="style7">&nbsp;</p>
    </form>
    </div>

    What do I need to add in here so that I can type
    www.website.com/contact/?name=john and have 'john' appear in the name field?
    Thanks

    collin45 Guest

  4. Moderated Post

    Default Re: URL Form Information

    Removed by Administrator
    Murray Guest
    Moderated Post

Similar Threads

  1. PHP Form leaves out information...
    By withhisstripes in forum Macromedia Dynamic HTML
    Replies: 0
    Last Post: September 13th, 01:36 AM
  2. Copying form information
    By littlegreenmen in forum Dreamweaver AppDev
    Replies: 2
    Last Post: September 6th, 02:29 PM
  3. Preserving form information
    By A.Kelly in forum PHP Development
    Replies: 2
    Last Post: November 23rd, 12:06 PM
  4. passing form information.
    By Payne in forum PHP Development
    Replies: 9
    Last Post: October 2nd, 07:27 PM
  5. Form will not accept new information
    By Yaz in forum Microsoft Access
    Replies: 3
    Last Post: July 22nd, 04:20 PM

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
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139