Classic ASP Update table with dynamic Checkbox values - sql-server

I have two tables:
1) Holds a list of propertyTypes
2) Holds the propertyDetails
The user views the page and the list of propertyTypes are shown on screen - these are checkboxes that are pulled from propertyTypes and I have a repeat region around them to display them all.
The user can select a number of these propertyTypes and I want to be able to update the propertyDetails table with that information.
I have a varchar(max) field and want the data to go into there separated by commas. It may not be the best way, but the way we have opted for.
My issue, is how do I store the relevant ID's for each checkbox in that fields using Classic ASP?
I have bound the checkbox as follows so far, but it doesn't seem to work:
<input type="checkbox" name="propertyType" id="<%=(rsPropTypes.Fields.Item("ptID").Value)%>">
Any advice would be appreciated.
Thanks
Nick

try this.
myvalue=rsPropTypes.Fields.Item("ptID").Value
<input type="checkbox" name="propertyType" id="<%response.write(myvalue)%>">

Related

single datasource for muiltiple mutiselect dropdown in angular

I want to use Single Array as a Data-Source for Mutiple DropDown element(will be dynamic generated based on another ArrayList) with muti-select and condition begin when any item/'s get selected in any of the DDL, then it should be removed or disabled in the remaining DDL.
PS: I'm new to front end development and using Angular1.5 with TypeScript.
Ex:
DS for Select Option: [1,2,3,4,5,6,7,8]
I kind of facing problem when we are deselecting any item from the any of the DDL, since the deselected values needs to be pushed based to Available Values Array for the remaining DDL.
Maybe you should create an array of objects like [{value:1, disabled:false}, .....]
and work with the disable property.
should be something like:
<md-select ng-repeat="item in myItems">
<md-option
... ng-click="item.disabled = !item.disabled"></md-option>

Options on all Angular Chosen (plugin) select elements disappear when any are selected

Admittedly, I know just enough about Angular to be dangerous. However, I'm fairly certain I've followed the instructions for the plugin concisely.
The issue is: whenever I select any of the options from one of my select fields using the chosen plugin (City, Nationality, Hotel, Room Type...) the result never gets populated, and the results from all the other select fields disappear. I'm fairly certain this is user error on my part - any clarification or help is much appreciated.
You can see an example here: http://casamarelanoivas.com.br/sst/test/
Thanks.
Kyle
You are binding the selected value in your list to the same model variable you are using to generate the dropdown list. So whenever you select a value from the drop down list, you are wiping out the list values.
Here is what you have:
<select ng-model="model.cities" ng-options="city.name for city in model.cities">
This is the pattern you want to use instead.
<select ng-model="selectedCity" ng-options="city.name for city in model.cities">
In your controller you can then get the selected value from $scope.selectedCity

how retrieve only selected checkbox values in action class in struts 1.3

i am new struts i am developing web application in which i have a requirement that i have to show records in tabular format i have made use of display tag in struts with every record i have a checkbox now i need to retrieve the values of those checkboxes in my Action which are checked . but what i am receiving in Action array of all the checkboxes. actually while displaying checkboxes by making use of display tag all checkbobes have got same name therefore i am not understanding how handle this care i have searched on google but did not find suitable situation
<display:column title="Service">
<input type="checkbox" name="sercive" />
</display:column>
how to handle this situation not understanding .could anyone give some sample code
or hint to handle this situation
I am not sure about display tag.
But in struts you have to define a property in Form bean (i.e. ActionForm) of type String[] or List with the name same as defined for your check boxes.
Then in Action class you will get the array of selected checkboxes only.
If this is not working. Then you can try of getting the values using request.getParameter("service"). This will return comma separated list of selected checkboxes which you can convert to array using split() method and then you can continue with your logic.
I hope this helps you.
Plain HTML checkboxes are only submitted if they're checked, that's just how clients work.
You must provide a differentiating factor, generally a value (e.g., a service ID in your case), to determine which has been selected. Your action form would contain a collection of those IDs.

Generating dynamic check box using cakephp, how do i handle and when should i submit form?

i am generating dynamic multiple checkbox, how should i generate that and how should i manage that in cakephp?
The checkboxes should look like this:
<input name="data[ModelName][ModelName][]" value="x" id="ModelNameModeNamex" /> your Text
I created a helper for this, that renders the checkboxes in a table. It was derived from this helper
EDIT
The data will be submitted as an array, that the CakeMagic can deal with. For the default example Post <-habtm-> Tag an input field in the post-view should be
<input name="data[Tag][Tag][]" value="4" id="TagTag4" /> myTagName
when submitting the data and doing a save in the PostsController, Cake will also save the habtm association in the posts_tags table. If you are interested how exactely the data looks, simply place debug($this->data); in the PostsController
also, 2 comments:
If you would like some help, please put some effort in formulating the question
It might help if you would accept an answer once in a while
Only the name attribute is really important, it decides how the data will be posted back. Getting the value of the array should be doable through $this->data or $this->params.

Cognos : Persisting Checkbox state across Multiple Pages

On the Cognos Report Results Page, we need to have a checkbox for each row.
The checkbox is designed using HTMLITEM tag.
However, the problem we face is that the state of the checkbox (checked or unchecked) is not persisted when we go to the next page/previous page.
I am very new to Cognos and I need to know if there is a way to do this.
I am fairly good at JAVAScripting and JSP, but since we only have access to HTML elements and not JSP Tags (Cognos uses CGI anyways), I cannot get the request object.
If there is some way to retrieve the request objects parameters of previous submit(previous page), that would help in solving the issue to a large extent, I feel.
Jonas
There isn't really enough information on what your end goal is to be able to assist you with this properly. There are a few ways that spring to mind that would allow you to use JS on the report to remember previously checked items, but there may be a much better way to do this depending on your requirements.
Without having more details, the first thing that leaps to mind is simply having some JavaScript set and unset cookie values on check/uncheck on the checkbox.
Note, there could be a variety of other ways to work this, including upping the number of visible rows per page, etc...
You can create a dataitem in a query where you can determine whether your checkbox should be checked or not. In the design of your list on the report page you can render a HTMLItem within the list, and base the HTMLItem on a DataItem. Your HTML must than be something like
<input type="checkbox" value="""+ [DataItemValueToPass] + """ " + [DataItemCheckedOrNot] ></input>

Resources