How to extract dynamic drop-down forms with iMacros? - drop-down-menu

I am looking to fill out a dynamic dropdown form with iMacros. With a regular form, I am able to loop using VBS successfully and able to extract information based on how I fill out the dropdown form.
However, there is one website that I'm trying to extract from where the option values in field 2 completely changes based on what you select in field 1. (i.e. "<option value="">" changes).
I am having trouble looping this, since the iMacro function doesn't work when you use #, $ or % for the CONTENT attribute. (I have tried them all).

Related

Show form field based on item list

Is it possible to display an input form field based on the value of a select menu? Or is this something I'd have to do in javascript/jquery?
My list is pulled from the database if that changes anything.
If you want to make this happen during the form filling, yes you probably will need to use Ajax (via vanilla Javascript or jQuery), if you need to query your database as options are selected, or just CSS: http://www.coderanch.com/t/594720/HTML-CSS-JavaScript/Show-Hide-text-box-select, if you populated via database but don't need to check it again for changes.

Smarty to check select box value

I have two HTML Forms in a webpage. One having a select box. So i may want to check in second form if first form has selected some value and if it has, capture that value. I am using Smarty templates for these HTML form. Is there some workaround with this ? Thanks.

COLDFUSION CFGRID Datapass with a post

I have a bit of a unique challenge today. I have a client that wants to be able to search for multiple items based on inserts into a cfgrid. Suppose we have the following web form:
A Country selection dropdown
A State Selection dependent AJAX dropdown
A city Selection dependent AJAX dropdown
An ADD Button
----------------------------------------------------
A CFGRID that will populate a row with selections when the user clicks the add button
----------------------------------------------------
And finally, a CLEAR button, and a GO button on the bottom.
The resulting page will then query the database and get some statistics about the cities selected. So, suppose an individual picks USA > Arizona > Scottsdale and USA > Arizona > Flagstaff. The grid below the options will 'save' each selection and reset to their default options, waiting for a user to pick additional options or click on 'GO'.
The resulting page will then generate columns that list some statistics about the communities and highlight the 'best of' between each selected community.
Each time a user selects the ADD button (assuming three criteria are selected) I want the information to be added into a CFGRID that displays the options selected. Then, After the user selects at least one country/city/state option, have all of the data in the CFGRID get passed to another page that does a query from the data selected. In theory, the user could pick as many communities as they want, assuming they are willing to let the database sludge through enough data to get what they want and wait through a 'loading' screen to get it.
I'm having these challenges, in no particular order:
- I have an HTML grid that I must use per client spec (No Java or Flash, must be HTML)
- I have no idea how to get the selected options into the CFGRID. I assume there is some JavaScript I can write that uses some sort of AddRow function to add data into the grid with the add button but cannot seem to find how to it on the interwebs
- After we conquer the above challenge, how do I pass the data from the grid into the results page? I thought about passing one big string or a structure, but I'm not sure how to do that through the URL or posting, nor how to get the data out of the grid. I wonder if I am better off coding some sort of string that gets passed from the options page to the results page with a get method instead of dealing with the stuff in the CFGRID and have the CFGRID serve only as a 'dummy' display container.
- Finally, after the pass is complete, I would need to loop through through the structure and perform a CFQUERY or CFSTOREDPROC on each row of data, then get the statistics I need to display on the results page. I assume this would depend on how I am getting the data from the options selection page to the results page.
THANK YOU ALL!
CFGRID is great to start, but it can be b*tch to customize and extend... Have you tried editable CFGRID with bind? See how far off it is from what you want first. If it turns out to be very far, then you might want to go for a jqGrid and code up some jQuery.
To start, read Using HTML grids and make the cfgrid editable.
http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSc3ff6d0ea77859461172e0811cbec22c24-7a01.html#WSc3ff6d0ea77859461172e0811cbec22c24-72e0
Once you got that working, look at these provided JS functions that you can use with CFGRID
http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WS0ef8c004658c1089-6262c847120f1a3b244-8000.html
http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSd160b5fdf5100e8f-4439fdac128193edfd6-7f5f.html
If you still demand a bit more, you might need to dig into the underlying ExtJS component. At that point I would rather use jqGrid
I found out that the best way to handle this was by using a SerializeJSON call and a Deserialize JSON call back and forth. By using JavaScript notation we are able to pass a complex JavaScript object (array) between one page and another. This has the value add of not having to worry about sessions timing out and making URLs clickable from one solution to the next.

textbox autosuggest in asp vb

The application is written in ASP VB classic and various Java scripts. I am faced with some issues
1) When I select an entry in a dropdown box, I can use the "onBlur" method to do what is needed at that point
What is the method available for an AutoSuggest Textbox that I can employ once
a) The desired entry is selected from the list (such as "onSelect").
b) The user never selects, but actually types the entire selection manually. In that case, I would need a method such as "onBeingDoneTyping"
2) When a regular dropdown is defined, I can display a user friendly description (like first and last name). In the meantime, internally I can retrieve what the index of that record is with the first entry of the parameter "value", in my case: PatientID.
" " " <%=lsSelected%> ><%=PatientName%>
How can that be accomplished when using the AutoSuggest feature in a textBox?
Say I allow "First-Name Last-Name"
Is there a hidden parameter that can be used that would let me know the index of the selected entry?
In addition, should I create a column in the data base "FirstLastName" to speed up the search?
For (1) you're after an auto-complete function. I've used this jQuery with classic-ASP a few times (excellent little plugin): http://docs.jquery.com/Plugins/Autocomplete - there's a good demo and example source there.
For (2) - assuming that you're using the jQuery plugin, then your object is a textbox, not a select object. So if the textbox you created is:
<input type="text" name="example" id="example" />
when the form is submitted any request.form("example") will return the text entered, not the index/selected value from any list of options.

InfoPath 2007 - Populate drop-down list on-the-fly

I'm working on an InfoPath 2007 form. I have two drop-down lists and i need the second to be populated with items bases on the value chosen in the first list. I use c# to populate the drop-dpwn lists from external sources. I've tried to use the OnChange event to make all this, but the second list is still empty.
If anyone knows, please tell me.
You can filter the entries for the second drop-down list based on your first list (but only if the entries are based on a data source, not manually entered).
Bring up the properties window for
your second drop-down list.
Select your data source.
Click on the button to the right of the Entries text box.
Select the repeating node you wish to use for the basis of your list entry.
Click the Filter Data button. From here you can enter a filter to limit the entries displayed based on the value of your first drop-down list.
Your question was a bit ambiguous. You may be trying to populate a secondary data source based off of your first drop-down list. This should work fine with an OnChange event. Can you post the code you are using to do this?
Some additional tips that may help:
The change event will not fire until focus moves off of the list box. So, for the second drop down to populate, you will need to set the first drop-down then hit tab or click elsewhere in the form.
I don't know the size or nature of the data source you are using for the second drop-down list, but you may consider downloading the entire data source and filter it using the method I described above. This may be a better solution as you won't need to make a database query between entering the first list box and the second one.

Resources