SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Wizard dominique's Avatar
    Join Date
    Dec 2000
    Location
    orbis terrarum
    Posts
    1,523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, I realized that I posted my question in the wrong forum after everyone got confused as to what I was aiming at. (Available here)

    I'll state my problem again: I have a search engine on my site that differentiates from e and from a, etc. The problem is that some of my visitors do not have the capability to make these special characters with their keyboards (and don't know the Alt numbers, or can't use them).

    I would like people to be able to select a radio button and click on an 'Insert' button and the desired character will be added to the search field.

    Here is a dummy page to help you understand what I'm getting at.

    The radio buttons might be replaceable by links to achieve the same outcome.

    I hope you can help, thanks!

  2. #2
    Say WHA?! goober's Avatar
    Join Date
    Sep 2000
    Location
    United States
    Posts
    1,921
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    good idea.

    Wonder who said that one to you?
    Sean Killeen [LinkedIn] [Twitter] [Web]

    Warning: Reality.sys corrupted. Universe halted. Reboot? (Y/N)

  3. #3
    I believe you have my stapler. scrubz's Avatar
    Join Date
    Feb 2001
    Location
    Van down by the river
    Posts
    254
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here's a script for the head of your page:

    <script language="JavaScript">
    <!--
    function addToField(symbol) {
    document.form1.elements['sp-q'].value += symbol;
    }
    // -->
    </script>

    And then put this inside your radio button tag:

    onClick="addToField(this.value);"

    Doing it this way eliminates the need to hit the Input button. Unless you want to hit the button, then the script would need to be changed.

    Bonus: It works in Netscape too.

  4. #4
    SitePoint Wizard dominique's Avatar
    Join Date
    Dec 2000
    Location
    orbis terrarum
    Posts
    1,523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks scrubz, it's just what I was looking for!


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
  •