Results 1 to 9 of 9

Thread: Hyperlink selection to input box

  1. #1
    Brian_C_C Guest

    Default Hyperlink selection to input box

    Is it possible to make a hyperlink fill out a value in a form?

    I have a list of hyperlinks I want to automatically fill out the values in the text boxes on a form I've created when the user selects those hyperlinks.

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    <a onClick="document.forms.myform.elements.mytextbox.value='myvalue'; return false;" href="#">
    Last edited by djr33; 09-21-2007 at 04:46 AM.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Brian_C_C Guest

    Default Huh

    I'm pretty weak in the forms / program world... can you ellaborate...

    Here's the details. I have an html document called "dining.html" with an iframe pointing to an HTML document with list of restaurants in our town, that document is called "dining-list.html".

    Also located right below that iframe in my "dining.html" page is a mapquest script for users to search addresses.

    What I am trying to do is make it possible for users to select a restaurant listing link in the iframe referencing the "dining-list.html" file and have that hyperlink fill out the mapquest "get" form on the "dining.html" page. Then all they have to do is select submit.

    Possible? I know their's probably easier ways to do this... it's a bit beyond me though... any advice would be nice...

    Thanks!!!



    Quote Originally Posted by djr33 View Post
    <a onClick="document.forms.myform.elements.mytextbox.value='myvalue'; return false;" href="#">

  4. #4
    Brian_C_C Guest

    Default Thanks

    I got that to work... I couldn't figure it out using an html link in one document iframed into the document with the search... but I can rewrite my page to include the form with it....

    Thanks!

  5. #5
    Brian_C_C Guest

    Default Can I reference

    My link is located in an Iframe html document. Can I get that link to point to the document the iframe is in instead?

  6. #6
    Join Date
    Mar 2007
    Location
    Tarboro, NC
    Posts
    290
    Thanks
    8
    Thanked 2 Times in 2 Posts

    Default

    The easiest way would probably be to change the "document" element or add something to target the other. I'm not very experienced so I'm not sure what.
    <a onClick="document.forms.myform.elements.mytextbox.value='myvalue'; return false;" href="#">

  7. #7
    Brian_C_C Guest

    Default Agree

    I agree...

    now if someone could tell me how to direct the hyperlink inside the .html document embedded using the iframe to the value of the text box on the .html document the iframe is located in, it would help tremendously!

  8. #8
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    parent. or framename..
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  9. #9
    Brian_C_C Guest

    Default That's it

    That works!! Thank you! You're awesome!!!

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
  •