How to storage data from a html popup? - html

I created a pop up with html with a list of answer. I need to store the answer selected by the user and then display the result in a dynamic infographic. What's the best way to storage the answer and display them in a dynamic infographic? Thanks

The best way is to get the value from the popup by JavaScript and store it into a variable

Related

Hold data for list to add later?

So no SQL tables or anything here. Basically, I have 3 pages that have 6 items each. Each item consists of an image and then some text and also a smaller image than changes from a check to an "x" depending on if user selects or not. So if the image is checked, the user is adding that to a list which would display on a fourth page. This data needs to persist through just a session and if the session times out, then it resets. If the list is complete and on that fourth page the user choices to email or share list via social sharing, then the data would be gone after that action. What I am trying to figure out is the best way to approach and implement this with minimal time and effort as it has to go out quickly. Can any of you explain and maybe point to some links with info on the best way to achieve?
This is being done in asp.net web forms with html, css, and javascript.
Much appreciated!
You can use ViewBag() (for view in razor) or ViewData[] (for page in .net) to hold data for one web page.when you want it to other page. You can pass it to other page.
check this out
ViewBag, ViewData and TempData

How to set focus on tab in tabcontrol in URL

I am trying to call a page in my customers webapplication (Exact Synergy Enterprise)
This is the link: http://someserveridontdisclose/Synergy/docs/CSCANEduCourseCard.aspx?ProjectNr=ACPGINTV
Within this page is an Ajax TabContainer with several TabPanels. One of them is called 'Doelgroepen'
I dont have the source for this application, as i am not the developer of it. We only develop custom extentions to it.
Here's the question: Is it possible to focus on one of the tabs USING ONLY AN URL? If so How?
Thank you very much for your thoughts about this.
try to set with javascript. you'll have to write your own js to get index number you want from url, then set like this
$find('<%=TabContainer1.ClientID%>').set_activeTabIndex(2);
http://forums.asp.net/t/1127834.aspx
http://www.aspforums.net/Threads/420684/ASPNet-AJAX-TabContainer-Set-Active-Tab-Client-side-using-JavaScript/
If you do not have access to the code and if this is not part of the requirement / design specification for the application you are using (ie: what you asked the developer to do), then the answer is No.
The control does not have "native" support for URL tab selection. There needs to be specific code in the application in order to handle this.
It is however very easy to implement, if you absolutely need it, it shouldn't take much time (about 15-30 lines of code, depending on how many tabs/urls combination you need).
You can find a running sample of the AjaxControlToolkit Tabs control at the following link (the available functionnalities are described in there):
http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/Tabs/Tabs.aspx
If the TAB has an ID you could make it visible by adding '#tabid' to the URL.

JQuery and Perl to display dynamic results on drop down selection

I'm currently using Perl CGI to display some internal billing pages at work. I'm using JQuery as well to add a little 'spunk' to it if you will.
I'm looking to generate/display HTML based on drop down selection by the user. Now, I can handle this part no problem. I'm generating table rows/table data on click based on the selection made by the user.
I want to retrieve and display values stored in the database for the corresponding data im displaying on button click, and without refreshing the page of course.
Can someone point me in the right direction? Thanks in advance.
You'll want to use an AJAX request to get the data. So, for example, if you have a select with class 'ajax' and you want to display data based on the option selected, you can do something like:
$('.ajax').change(function(){
$.get({'url', { value: this.val() }, function(data){
// display the data with a .html() or .append() or something
});
});
Replace 'url' with the url of a page that queries the database using the value that you send it.

Kendoui web checkbox data binding

Hi I'm not sure if i'm using the right words in the title, please correct me if not. I've been working for almost a month with kendo ui. It's really good.
Now my problem, i'm working with html, django and kendo. I'm getting information from a url in json format. I'm able to load the information in a Kendo Grid, with a boolean values column and a text column. In the boolean values column i've found a way to turn it into a checkbox input column with a field template and set its checked value according to the data i got from the url. The problem is that I can't manage to bind the checked value to the data in the grid's datasource, so when I click the save button to save the new information I get the same data I got from the url. Does anybody know how to do this or a simpler way to do it instead of mine? Thank you!
There is a code library project which covers almost the same scenario. You could use the same idea to update the underlying model which the Grid uses.
http://www.kendoui.com/code-library/mvc/grid/checkbox-column-and-incell-editing.aspx

How to use autocomplete plugin for refresh a div?

I have a doubt which involves an auto in a DIV (in which contains the name of other users with their image and age) when a user type the letters in a field that is positioned above the DIV.
As the auto search of Facebook friends.
Searching, I found a jQuery plugin that is the 'Autocomplete' but I want to modify to have the same behavior as facebook friend finder.
Does anyone have any example to do this? Or another way?
Note: I have a function in PHP that returns me all the names by letter. ¿I can consistently with ajax call this function to update the DIV?
jQuery UI has some nice built in functionality for that
http://jqueryui.com/demos/autocomplete/
You can either go the javascript way when retrieving the suggestions or you could do the ajax calls - that depends mostly on how many entries you have that are possible matches.
If you have too many, storing all elements in js might not be the best way to go.