Welcome to TalkGraphics.com
Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Search Button

  1. #1
    Join Date
    Oct 2020
    Posts
    17

    Default Search Button

    Hiya, I really hope someone can help with this!

    I`m looking to put a search function onto our website so people on the clubs waiting list can enter two values (probably surname and postcode) and a submit button which will return their position on the waiting list (held on a Google sheet for GDPR purposes).

    Is this possible and if so could someone point me in the right direction please?

  2. #2
    Join Date
    Aug 2000
    Location
    Placitas, New Mexico, USA
    Posts
    41,518

  3. #3
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,882

    Lightbulb Re: Search Button

    Freeliner, the matter could be solved with a AJAX call and a lot of JavaScript. You, however, would be exposing, the data within the browser and this could be viewed. It is equally hard to block others seeing the data on a Google Sheet.

    Safer, and easier, might be to have a separate public view-only waiting list of random 6-digit PINs in a Column of the Sheet that are in waiting list order.
    Something like:

    PIN PIN Position
    721999 1
    549983 2
    758078 3
    459068 4
    482178 5 Next PIN
    599284 6 646739
    383091 7
    756438 8
    759434 9
    104845 10
    759825 11
    953465 12
    165614 13
    578381 14
    983638 15
    745029 16
    315821 17
    569580 18
    167648 19
    305217 20
    508657 21

    The Next PIN cell formula is =RANDBETWEEN(100000,999999).To get the next random PIN, select any blank Cell and press the Delete key.
    Copy the PIN to your GDPR Sheet and add it to the bottom and add in the next waiting number.

    Finally, set the Search/Submit button to open a fresh Tab into this Sheet.

    Yes, you have to provide the PIN to the applicant but this is trivial.

    Acorn
    Acorn - installed Xara software: Cloud+/Pro+ and most others back through time (to CC's Artworks). Contact for technical remediation/consultancy for your web designs.
    When we provide assistance, your responses are valuable as they benefit the community. TG Nuggets you might like. Report faults: Xara Cloud+/Pro+/Magix Legacy; Xara KB & Chat

  4. #4
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,882

    Default Re: Search Button

    Quote Originally Posted by gwpriester View Post
    Sorry Gary, the OP is not after a Site Search but a hidden list search.

    Acorn
    Acorn - installed Xara software: Cloud+/Pro+ and most others back through time (to CC's Artworks). Contact for technical remediation/consultancy for your web designs.
    When we provide assistance, your responses are valuable as they benefit the community. TG Nuggets you might like. Report faults: Xara Cloud+/Pro+/Magix Legacy; Xara KB & Chat

  5. #5
    Join Date
    Aug 2000
    Location
    Placitas, New Mexico, USA
    Posts
    41,518

    Default Re: Search Button

    Got it. Cheers.

  6. #6
    Join Date
    Oct 2020
    Posts
    17

    Default Re: Search Button

    Thanks Acorn, I never realised Googlesheet security was so easily compromised. The PIN idea is a good one, I suppose I could alter it a tad and use initials and postcode which would make it easier for the hard of thought who are bound to lose their PIN (its a very long waiting list!) so an ID could be, say, RDCB21TN, RB being initals, CB21TN being the postcode?
    Would you suggest and `open` sheet with a search function on it or is it possible to set some scripit to return the value onto the page where the search button is? I`ve never attempted anything like this before so am running a bit blind

  7. #7
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,882

    Default Re: Search Button

    Quote Originally Posted by Freeliner View Post
    Thanks Acorn, I never realised Googlesheet security was so easily compromised. The PIN idea is a good one, I suppose I could alter it a tad and use initials and postcode which would make it easier for the hard of thought who are bound to lose their PIN (its a very long waiting list!) so an ID could be, say, RDCB21TN, RB being initals, CB21TN being the postcode?
    Would you suggest and `open` sheet with a search function on it or is it possible to set some scripit to return the value onto the page where the search button is? I`ve never attempted anything like this before so am running a bit blind
    Freeliner, a blend of Initials and Post code would work but I could use that to track a person's identity.

    You could Link to a Range that contains the Search Box and Results but I have found that as an IFRAME is cumbersome.
    You then have the fun of Sharing to people's emails else they would not see it at all.

    Scripting is going to be messy and still exposes Google Sheets.

    Keep the Google Sheets private and add your "safe" PIN Code adjacent to your queuing numbers.
    Copy and past just these two columns into a text file. I called mine TheQueue.txt.

    I created a tall, thin Placeholder with body code: <iframe src="index_htm_files/TheQueue.txt" width=100% height=100%></iframe>
    When I published, I separately uploaded the file into index_htm_files/TheQueue.txt.

    I then viewed the page and used the browser Find in Page to find my PIN Code.

    This avoid you having to republish anything of the Xara site.
    You just maintain the single TheQueue.txt file in the index_htm_files/ folder on the server.

    You can make it a bit more fancy if you know HTML/CSS.

    Acorn
    Acorn - installed Xara software: Cloud+/Pro+ and most others back through time (to CC's Artworks). Contact for technical remediation/consultancy for your web designs.
    When we provide assistance, your responses are valuable as they benefit the community. TG Nuggets you might like. Report faults: Xara Cloud+/Pro+/Magix Legacy; Xara KB & Chat

  8. #8
    Join Date
    Oct 2020
    Posts
    17

    Default Re: Search Button

    Another good idea Acorn and most appreciated. I`ll have a dabble and hopefully get something to work

  9. #9
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,882

    Default Re: Search Button

    Freeliner, here is the belated JavaScript/jQuery approach: TG.zip

    The Zip has the design file and the associated waiting List data - dummy 100 records.
    Unpack to a local folder and run the design file.

    Come back with questions.

    Acorn
    Acorn - installed Xara software: Cloud+/Pro+ and most others back through time (to CC's Artworks). Contact for technical remediation/consultancy for your web designs.
    When we provide assistance, your responses are valuable as they benefit the community. TG Nuggets you might like. Report faults: Xara Cloud+/Pro+/Magix Legacy; Xara KB & Chat

  10. #10
    Join Date
    Oct 2020
    Posts
    17

    Default Re: Search Button

    Sorry for the slow reply Acorn, went and tested positive so haven`t been doing too much web stuff the last few days. I`ll have alook at the file, thanks for the reply!

 

 

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
  •