Hi…I was wondering if there was a way to have members on my website search for other members either in their own state, or in any city/state nationwide they choose. For instance…if I lived in Portland Oregon and I wanted to search for other members in Oregon, or if I wanted to search for people in Las Vegas Nevada…can I set that up on my website?
Or what if I wanted to search for a member in another city in Oregon…like Eugene. Could I do that in Wix? How about if I wanted to search for someone within a 50 mile radius from where I live?
Could you help me set up a feature like that?
Hey mrobin,
Welcome to the WixCode forums where good people do interesting things.
And, seems like you’re trying to do something interesting as well. It’s an ambitious undertaking, but you might be able to get something working. I can’t promise anything, but you can play around with stuff like: finding the user’s location, saving the data, dealing with real-time updates, and other really fun stuff.
For information on getting a user’s location, see this article on HTML5 Geolocation . You’ll have to put the code in a $w.HtmlElement (an iFrame) and then pass messages back and forth between the HtmlElement and the page. Save the user’s location in a database collection so that all users can query the collection to find out where everyone is.
That’s just a small taste of what you’ll need to deal with. It will be challenging, fun, and will certainly keep you off the streets.
Good luck,
Yisrael
Hi, Yisreal…thank you for your response. Now, if a member who was on my website lives in Oregon and was searching for a list of other members living in Nevada…would they be able to do that with this?
This is how I would like to set up my Search query…I want to have all the normal information in it like (Name, Age…etc.), but I want have 2 dropdown boxes. The dropdown boxes are set up to where if a person selected “United States” dropdown “A”, then dropdown "B’ would given then a listing of all 50 states to choose from. If a person lived in Australia, and selected “Australia” in dropdown box “A” then they would get a listing of all Provinces in Australia in dropdown box “B” to select from.
I also want to add a “No Preference” item in dropdown box “B” so if that same person who lived in the United States selected “No Preference” the search query would present a listing of all members nationwide.
When it comes down to it, a search by location is really not any different than a search by hair color or favorite beer. The database collection would have a field for location - OK, two fields (country and state/province) or even three (maybe city?). You could even do a search for anyone living in Australia, with brown hair, who drinks wheat beer. Wheat beer - is that really beer?
Build your collection with the fields that provide the search information that you need. Then, you can make the query as detailed (Australia, brown hair, wheat beer) or as general (stout beer) as you want.
That sounds doable…and I do love my Budweiser too…lol. Anyway, thank you for your help. I will definitely ask for more assistance if I’m having difficulty.
Were you able to do this? If yes, please let me know how?