I'm trying to design an interface for a web-based application that allows the user to look-up people (in my case it's patients for their medical records). I'm trying to think of very fast but accurate ways to search for users by their name.
I was thinking of typing the patient's name and it will match both first and last name, ordering them in a suggestion (autocomplete) list. I've done this before with several projects, but the problem that I have is that the text field could still be edited.
This method of looking up users should be akin to a drop down list of all users, but much quicker to search through and filter results.
Of course some terrible suggestions are populating all people in a drop down list and scrolling through. But if my patient list has several hundred people, this is a huge pain and a waste of time.
Does anyone have any good suggestions for creating a quick user-search function for assigning/looking up people very quickly?
EDIT: Sure I understand the use of autocomplete and have used it many times. But I only want the user to pick from a specific list of users and not be able to "search" for a user. Example: In an e-mail application (restricted to contacts) you search for contacts for the TO field. These are specific people to "search" for.
Thanks :)
i think something lke jquery autocomplete would work really nicely, the user can type free-form in the text-box, or accept one of the suggestions. after accepting the suggestion, it will appear in the textbox, and the user can still edit it further.
yeah, as James Curran mentions, you could filter the completions using a script on the server, for example:
$('#name').autocomplete('search.php?action=names');
search.php could lookup only the items available to the currently logged-in user...
For my website (NJTheater.com -- unfortunately, you'd need an admin login to see the page I'm talking about), I use a jQuery autocomplete plugin (not the jQuery UI autocomplete, which is based on a early version of the same code). It allows for getting the data via ajax, calling a webservice. (I have to selected from 13,000 people)
The control has an option to require the item be from the select list.
Related
Im trying to do something similar to the Scheduling of posts for Facebook pages... on ASP.net/c#
So basically what i need is :
User fills a few text boxes
Selects a date...
The post gets posted on that date...
I am unable to really understand the logic as well as coding for this...
What i have thought so far is, once the user submits the post, store the details in a table in SQL like SheduledPosts, and when the CurrentDate(Server Date) matches the date....
Transfer the SQL entry from there to the actual PostTable.
Now the actual process needs to take place without any pages loading or any actions done by the user... So I also dont understand how to make it happen from the server side...
Please note that im not trying to post anything to facebook... rather, trying to do a schedule form submitting on my own asp.net website...
Any help regarding the logic, coding, scheduling will be greatly appriciated...
Thank You
I can think of a couple of different ways to accomplish this:
Implement a "pending posts" table and have a separate process running on the server to take care of transferring the post from the "pending posts" table to the "current posts" table at the appropriate time.
Add a "publish_on" datetime field to your current posts table, and when selecting items to be displayed in the page output, add a "WHERE publish_on IS NULL OR publish_on > GETDATE()" clause to your query. You fill this in for posts you don't want going live until a particular time.
Personally, I would go with the second approach, since I think it's a more elegant solution.
You can do this with one table. Just have a 'Submitted' date field (for your records), a 'Publish' date field and a Boolean 'Published' field. Create a Windows Service to run every 5 minutes or so and let the service perform the date check; when it finds one that satisfies the date criteria, it just toggles the Boolean field to 'true' and your page logic can then display the post.
Here is a walk-through on creating a simple Windows Service:
https://msdn.microsoft.com/en-us/library/zt39148a%28v=vs.110%29.aspx?f=255&MSPPError=-2147217396
I'm trying to help save time at work with for a lot of tedious copy/paste tasks we have.
So, we have a propitiatory CRM (with proper HTML ID's, etc for accessing elements) and I'd like to copy those vales from the CRM to textboxes on other web pages (outside of the CRM, so sites like Twitter, Facebook, Google, etc)
I'm aware browsers limit this for security and I'm open to anything, it can be a C#/C++ application, Adobe AIR, etc. We only use Firefox at work so even an extension would work. (We do have GreaseMonkey installed so if that's usable too, sweet).
So, any ideas on how to copy values from one web page to another? Ideally, I'm looking to click a button and have it auto-populate fields. If that button has to launch the web pages that need to be copied over to, that's fine.
Example: Copy customers Username from our CRM, paste it in Facebook's Username field when creating a new account.
UPDATE: To answer a user below, the HTML elements on each domain have specific HTML ID's. The data won't need to be manipulated or cleaned up, just a simple copy from ourCRM.com to facebook.com / twitter.com
Ruby Mechanize is a good bet for scraping the data. Then you can store it and post it however you please.
First, I'd suggest that you more clearly define exactly what it is you're looking to do. I read this as you're trying to take some unstructured data from Point A and copy it to Point B. Do the names of these fields remain constant every time you do the operation? Do you need to simply pull any textbox elements from the page and copy them all over? Do some sort of filtering of this data before writing it over?
Once you've got a clear idea of the requirements, if you go the C# route, I'd use something like SimpleBrowser. Judging by the example on their Github page, you could give it the URL of the page you're looking to copy, then name each of the fields you're looking to obtain the value of, perhaps store these in an IDictionary, then open a new URL and copy those values back into the page (and submit the form).
Alternatively, if you don't know the names of the fields, perhaps there's a provided function in that or a similar project that will allow you to simply enumerate all the text fields on the page and retrieve the values for all of them. Then you'd simply apply some logic of your own to filter those options down to whatever is on the destination form.
SO we thought of an easier way to do this (in case anyone else runs into this issue).
1) From our CRM, we added a "Sign up for Facebook" button
2) The button opens a new window with GET variables in the URL
3) Use a greasemonkey script to read those GET variables and fill in textbox values
4) SUCCESS!
Simple, took about 10 minutes to get working. Thanks for you suggestions.
I need to create User selection page for my web based application (User searching page), I have millions of registered users in my database and I want to search that users by typing the name in the text field.And by the way it should be suggest the name of users when i am typing the letters on the field (Like jquery tables).
I am using .net MVC3 for develop my web application
I am using Amazon database server for store my data (Amazon S3)
Millions of people will access this site.
-- I have tried to come up solution with elasticSearch I think this is well suited for document text search.
I want to know the way of, how can i speed up searching result? Is there any techniques to speed up filtering data from Database? Can I use ElasticSearch for this?
Please anybody can give me a best solution/ suggestions for come up with this problem?
If you can give me a examples it will be a great help. Thanks in advance.
There is no much tecniques on this:
Use AJAX to query the subset of users
On server side, one time request was got, get first (say) 10 elements of the subset found and send it to the user
On client side use defered scrolling: the control that shows the list of users do not show all users od subset got from the server, but only set of them. When user scrolls down/up list refreshes by querying again the server. Say on list view it's possible to see 10 users at a time, you get from server 15, so on scrolling at least next 5 will appear immediately.
Something like this.
I'm working on a web app in ASP.NET MVC 3 using the Razor HTML 5 engine and C#. The client wants something pretty complex and I would like to know if there is any examples out on the web that might show me how to begin setting this up. Here's what they are looking for:
I have a very large SQL database (25,000 rows). They want to be able to select the data using three different views on the same page.
The first will be a tree and using similarities in certain columns of the table will be how the tree is broken in to sections.
The second will be a grid. This will be just one entire list of the everything in the database that you can scroll through. Of course there has to be some sort of virtual scrolling because loading 25,000 rows rather quickly isn't going to happen.
The third will be a search box where you can type in the code and select it that way.
All three of these need to be linked so that when you type a code in the search box it will select it in the grid and in the tree. If you select it in the tree then it will be selected in the grid, and if you select it in the grid then it will be selected in the tree.
They also want me to remember the last selection when you navigate away and be able to type a code n on a different page and go directly to this page with the item you typed selected. Therefore, I need to be able to use MVC's capabilities to establish a hyper link for every item in the list (I assume that would be the way to do this)
This is honestly the first time I've worked with ASP.net MVC and I feel like I may have bitten off more than I can chew with this project so any help would be greatly appreciated!
They would rather it if I didn't need to include any extra dll's so if there is a way to do this without third party tools that would be even better, but at this point I'm just looking for anything.
A few random ideas/thoughts about this:
This is kind of a big project as your first MVC app - hopefully you have some experience with HTML/Javascript/jQuery since it's going to require a fair amount of glue code to make everything work together. There is no "here, do this" solution.
There are a bunch of different free/open source projects for treeviews and grids. I've used jqGrid for a number of projects - it works well. It has a decent API and is fairly configurable (although it may take some digging to find the example code you need).
For a treeview, you can try jsTree. I haven't worked with it, though.
I'd suggest starting with just the treeview, or just the grid and get it working first. Then add the other control and get it working. Then add the search. Finally, I'd work on getting everything to work together.
To handle navigating to a specific selection, you can pull information off the query string from Javascript.
Realize that most of this is going to be happening in Javascript on the client side, not much server side.
I am using ASP.NET and Razor to create a calendar application similar to Google calendar and was hoping to get some feedback on my design thus far. My idea is to have 2 tables, one normal table for users, and another for a table of events which will store the users id and the time of the event, event ID, name of the event, and duration of the event.
I plan to write some code that will display a calendar on screen and allow the user to select multiple times so as to mark them as busy and give them a name. When this is done, the user submits the information and it is inserted into the database.
What is the best way to go about tackling this calendar construct? I can't really think of a simple way. I am guessing I can create a nice looking calendar using HTML and CSS, and perhaps JS to allow the drag and drop functionality? I suppose when the user selects a time, an object would be created with a start time and default duration, then when they drag it the duration changes. I am confused by how you would do this however, pulling objects out of thin air. How does Google Calendar do this?
And then how do you store all of the created objects in the database? I am guessing that Razor has a foreach construct and that I could just iterate over all objects created and insert them into the database one-by-one?
Also, how could I clean up the database, garbage collecting events that have already transpired while keeping events that are constant ie daily/weekly?
Apologies if the question is vague, if it is too vague then please press me on details I can be more clear on rather than close this. Thank you.
What is the best way to go about tackling this calendar construct?
If you are wondering about data structure here, whatever you do, do it in that way that it makes it compatible with standard iCalendar standard
I can't really think of a simple way.
Calendars are quite complex applications, there is no simple way. (events, sharing events, tentative, attendants, reminders...)
I am guessing I can create a nice looking calendar using HTML and CSS, and perhaps JS to allow the drag and drop functionality?
Yes.
I suppose when the user selects a time, an object would be created with a start time and default duration, then when they drag it the duration changes. I am confused by how you would do this however, pulling objects out of thin air. How does Google Calendar do this?
You can find some existing jquery plugins for this (try with this for start, or take a look at this list).
And then how do you store all of the created objects in the database? I am guessing that Razor has a foreach construct and that I could just iterate over all objects created and insert them into the database one-by-one?
Check out these jquery plugins and see how do they communicate with the server side. You will end up making ajax requests and then making database queries in the database. Razor has nothing to do with database...also Razor has nothing to do with client side interaction, it just renders page and everything else is on the js side.
Also, how could I clean up the database, garbage collecting events that have already transpired while keeping events that are constant ie daily/weekly?
I would't delete anything from database...don't see a reason for that. Just grab all you have and fill in the calendar. User will always look at month/date/week...grab data for that period and show it. When he goes back one year, he will have all the data still available.
Have you met my friend, Google?
In particular, 4GuysFromRolla has a tutorial, and there is a nice looking open source calendar control with some tutorials that should get you well on your way.