Populate a select Box without reloading Page
I have about three to four select boxes (dropdowns), that I
want to populate the next select drop down based on user selection
from the previous select dropdown and vise versa without having a
page reload. This is an app we are migrating from flash to CF
because of too much problem with flash.
Please can you show examples of doing this
eziokolo wrote:
>
> Is there a way I can get this done without reloading or
refreshing the page? I
> mean refresh data in the Select Drop down and textboxes?
>
> Thanks
> E
>
Yes, but you must first answer yourself, "Where does the data
come from."
From a user interface point of view you simply use
JavaScript to access
the various form control DOM elements and change their values
on the
desired events.
But you have to know where the data can come from. To do it
without a
refresh, the client has to already have to data. If there is
too much
data do deliver all at once to the client, then you can *not*
do it
without some type of request to the server.
But you can make such a request without refreshing the user
interface by
accessing it with other technologies such as asynchronous
JavaScript and
XML, popularly known as AJAX.
Or you could go to a more advanced client interface then the
HTTP
browser. Adobes preferred tool is Flex, but that gets you
back to
Flash, and I do not know why you are trying to get away from
Flash so
that may not be that appealing to you.
Similar Messages
-
How to get Value of tree node without Reload Page
hi,
i worked with apex 4.2 and i created Tree and tabular form to retrieve the date according the value of tree select node the code of tree something like this
select case when connect_by_isleaf = 1 then 0
when level = 1 then 1
else -1
end as status,
level,
"ENAME" as title,
null as icon,
"EMPNO" as value,
null as tooltip,
'f?p=36648:34:5234984107903::::P40_SELECTED_NODE:'||empno as link
from "DEPT"."EMP"
start with "MGR" is null
connect by prior "EMPNO" = "MGR"
order siblings by "ENAME
and i put Selected Node Page Item: P40_SELECTED_NODE . the tree worked good and retrieve the data into tabular form according to tree node value
my Question :
1- i want to retrieve the data without submit the page where each time i select value from tree make page reload to update the tabular form with new value ,there is any way to pass the value of tree node to P40_SELECTED_NODE item and refresh tabular form without page reload .
2- i want when selected from tree run page process according to value of tree node i tray to create Dynamic action with *(jquery selector : div.tree li>a)* but the Value of node incorrect.
Regards
Ahmed;look at this link
Re: How to get Value of tree node without Reload Page ..! -
How to create editable select box in jsp page
hi,
i got som peculiar requirement in my jsp page.i have my page like this.
<html>
<body>
<form name="test">
<select name="test">
<option value="one">USA</option>
<option value="two">India</option>
<option value="three">UAE</option>
</select>
</body>
</html>
this is one of the select box in my jsp page.
now i want to change the look and feel of select box..
1-dont want to show the scrollbar means the right side arrow which allows to see the total options in select box.
it should look like normal text box.
2-roveer apert from the existing values if there is no matching value user must be allowed to enter his own value in above select box..
how i can solve this problen..
regards,
samIs that maybe a browser memory auto-complete thing? It works on Netscape 7.2. But no, it's not a browser auto-complete thing (does NS have that? IE does... either way, I would've disabled that). It's definitely a Javascript trick, I'm sure of that. I know I haven't sent mail to all people in my address book from my work PC, but it doesn't stop them from showing in the list as I type...
Unless there is a special HTML tag option or browser extension that I've never heard of that allows you to supply a set of values to a text input field for auto-completion (as opposed to the browser remembering what was typed). -
Refresh display image item without reload page
hi all, is a way to refresh (requery) a display image item to change the image via botton and do not reload page ?
thanks
Edited by: Reza.Gh. on Sep 24, 2012 11:56 AMI create a sample app :
https://apex.oracle.com/pls/apex/f?p=9310:1
code of item P1_CAPTCHA_IMG :
SELECT captcha_img FROM captcha WHERE response = :P1_CAP_V;
item P1_CAP_V code (computations) :
SELECT *
FROM (
SELECT response
FROM captcha
ORDER BY
dbms_random.value
WHERE rownum = 1 ;
Refresh botton code :
action 1 :
SELECT * into :P1_CAP_V
FROM (
SELECT response
FROM captcha
ORDER BY
dbms_random.value
WHERE rownum = 1;
action 2:
refresh item P1_CAPTCHA_IMG -
Can I parse Text files in Java Script to populate in select boxes.
The scenario is as follows:
I have two select boxes, the second one depends on the first one for its values.
Values corresponding to the selection made in the first select box are available in a text file.
Can I parse the text file to fill in the values in the second select box through javascript?
Can any one please help.
Thanks,
RameshThis isn't a javascript forum. Java is not Javascript and Javascript is not Java.
If you actually meant Java...the answer is "maybe, depending on what you're doing". -
How to Populate values dynamically in Select Box.
Hi All,
I have few select boxes in my webdynpro application. Right now I am populating them using Harcoded values in the Dictionary. But I dont want to harcode the values in the dictionary, i want pull the values from database tables or text files of EP KM. Just let me know which is the better way to populate the select box without hardcoding & why ?
Thanks in Advance.
Regards,
Aditya MetukulHi Aditya,
Getting values from KM and database is possible
It depends on your requirement
ie if the dropdown should contain details of documents from KM or it should display the details in a table
if it is oracle table see this link
Webdynpro and Oracle
if you want to get data from km see this tutorial
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/webdynpro/tutorial on using knowledge management functions in web dynpro - 26.htm
Hope this helps you
Regards
Rohit
Regards
Rohit -
Populate the JSP's select box from database on jsp load
hai all,
can any one help me in knowing how to populate the select box of a jsp
with data from the database?
thanks and regards,
ravikiran<%
String sQuery = "select id,Name from tablename";
rs = stmt.executeQuery(sQuery);
%>
<select name="sltName">
<%
while(rs.next()){
String sId = rs.getString(1);
String sName = rs.getString(2);
%>
<option value="<%=sId %>" > <%=sName %> </option>
<%
%>
</select> -
Help with building a select box from a query?
New thread from a topic I started yesterday. From the responses, and a search of other threads, I realized that I was way off base:-) So, I went back and verified that my TomCat setup was alright. After a few tweeks I verified that I could display the index page and successfully run all of the example servlets and jsps. I then built a simple login.jsp and an associated bean to verify a user id and password on an ldap db. That works good. Next, I built a bean which runs a query against the same ldap db and returns a list of last names. What I want to do is use the last names in the bean to populate my select box. At first I was trying to build the html with the list from my bean, i quickly realized you guys didn't like that approach. So, can someone explain, in some detail (because I'm really dense), just how I can return the values from my bean and build a select box with those values.
regards,
Mat
BTW Gone to see Lord of The Rings...back in about 5 hours :-)Just in general, I prefer knowing how to do things the "old-fashioned way" first before using other tools, because if it comes time for you to take over someone else's code, you'll probably find that they did it the old way and you'll want to understand that. Further, the new ways are based on the old ways for many things.
Struts is a good system, but unless you have some understanding of the basics, it's probably going to be harder to understand it. If you have the time, I'd say at least go thru one book on JSP/servlets (which should be all about the basics, maybe a slightly older book) and go thru the examples in it. -
How to update database with a select box
I'm hoping someone can/will help me with a new feature I'm
trying to add to my web site. I'll summarize what I'm working with
and then proceed to what I'd like to do. This is the web site I'm
working on: www.truckerstoystore.net
I have a database for the Truck of the Week set up with the
information that is output on each page in the left column and
on the Truck of the week page itself. I add new Truck of the
Week (TOW) entries via a form I've put together. Right now, in
order to change the current TOW, I have to manually go into my
template and change the ID (which is automatically assigned when
the record is created, and thus makes it unique) in my SQL which
currently reads
SELECT *
FROM truckofweek
WHERE ID="4"
to the ID of the current TOW.
What I want to be able to do is create a new form that will
allow me to select the TOW entry that I want to be displayed from a
select box (drop down box). I have a good idea of how to populate
my select box, but don't know how to get it to work. My first idea
was to update the table in the database (Access) manually with a
new column called currentTOW, with values set to a Yes/No type,
with default values set to "No". Then I would use my form to set
the value for one of them to "Yes" so I could set my SQL to 'WHERE
currentTOW ="yes" ' I would also make a <cfif> statement that
checks for entries marked "Yes" and changes them to "No" when the
form loads to avoid setting 2 entries to "Yes" and my page thus
attempting to load 2 TOW entries.
My problem is, I don't know how to do any of this. I hope
I've described this situation well enough. I know there has to be
at least one guru on here that can help me. Any assistance would be
greatly appreciated.Hey,
Thanks for replying. That sounds like a good idea, but I
don't know how to do it.
I started working on a new idea, where I have a second table
in the same datasource set up called currentTOW, with one field
called currentTOW and only one record. The idea is to send the
string of the "owner" field from the select box, which is populated
from the table called truckofweek to this one cell in the
currentTOW table.
This way, in my page which will display the data, I have 2
querys. The first pulls the data in the single cell from currentTOW
and outputs its string into the second query. I've attached the
code below. I get an error when I try to display the page, see the
error here:
www.truckerstoystore.net/currentTOW2.cfm.
However, the SQL looks like I want it to look, as "WHERE Owner =
Craig Carp" is essentially the same record that it displays now in
the live page "/currentTOW.cfm" only the SQL currently reads "WHERE
ID = 4" (4 and Craig Carp are part of the same record).
Here is the link to my form:
Form -
Populating second select box on the basis of first.
Hello
I want to populate second select box based upon the value selected in first select box from database.The second select box should be in disabled state first and should be enabled only if i select from first selct box. I want to make it by using simple JSp not ajax.Hello
I want to populate second select box based upon the value selected in first select box from database.The second select box should be in disabled state first and should be enabled only if i select from first selct box. I want to make it by using simple JSp not ajax. -
Populate Form using select box..
I know someone has to be doing this but I haven't found them
yet. I want my user to select a company from my select box and have
the form popultate with its related information... WITHOUT
refreshing the page. I looking for examples so if anyone has one I
would greatly appreciate it.
werd...
Calvin ClickDan Bracuk wrote:
> I think you can do it with cold fusion and javascript
only. The concept would
> be.
>
> Step 1 - run a query that selects all the data you will
need to populate the
> form fields.
>
> Step 2 - convert each query column to a js array.
>
> Step 3 - write a js function so that when the nth item
is selected in the drop
> down, the nth item from the other arrays go into the
form fields.
>
> It's a similar concept to related selects.
>
This is definitely a possible solution, if it is acceptable
to download
all those JS arrays.
This greatly depends on how large they are and what type of
network
connections are being used. I.E. one can get away with more
for an
application running on a corporate intranet with high
capacity network
connections as apposed to a application that must work
acceptably for
the poor soul in the backwoods home that still relies on a
56K modem
over copper phone lines to access the internet.
Yes those people still exist, and sometime applications need
to be
written with them in mind. -
How to display the search result without reloading the whole page
HI,
I have separate fragments for Search Box to enter keyword and Search Result to display the result. Also I have different sections within the page to put these fragments. So how could I display the results without reloading the whole page.
Also if I have next button in my search result area, how could I display the search results in next page without reloading all other sections present in our page. Please let me know if any service or idoc function present such that result could be shown in search result section without reloading whole page.
Please let me know how to restrict page reload for every action within a page.
Thanks,
Ramesh
Edited by: Ramesh_Est on May 27, 2010 3:14 AM
Edited by: Ramesh_Est on May 27, 2010 8:39 PMThis is default behaviour of the template of your space. You can create a new page template and than you can create a region for the search results.
Or you can create a custom taskflow were you use the webcenter taskflows to search for the space.
Take a look at this white paper:
Extending webcenter spaces: http://www.oracle.com/technology/products/webcenter/pdf/owcs_r11_extend_spaces_wp.pdf
and this one:
Customizing site templates: http://www.oracle.com/technology/products/webcenter/pdf/owcs_ps1_site_template_wp.pdf
Edited by: Yannick.O on 13-Apr-2010 02:32 -
A text box should appear based on combo box selection in a jsp page.
Hi,
I have this problem. I ahve an option in the combo box"other". If other is selected then a text box shud appear . Can any one post a quick answer for me. may be a sample of how to do it will help me a lot.
Thank You,
Sagar.Hi Guys,
Thnx all for ur replies. Let me explain u the scenario which i work in now. I have a combo box with 4 values "other " being the last of them. If i select "other" then a text box shud appear with the label. what happenes now is i have added onChange whn an option is changed . I have named that functiion refresh for which the code goes like this..
function refresh()
window.location.reload(true);
whn i select an other option thn the whole page gets refreshed and the first value only appears. If i select other then the page refreshes and gets back again to the first value. These guys here use tags like <c: if> <C;choose> <c: otherwise> which am not familiar with. Do pls help me in retaining the option selected.. Thank You. -
Sorting without reloading the page
Hi,
I'd like to know how processing several sorting operations without reloading and ask the database each time the sorting of the elements is made.
For that I guess a copy of the result tree obtained by the sql query, written in the xsql page, must be present in memory and always available for the several sorting processes (but is this a temporary xml document which is created? How handle and use this "copy"?). So, one and only one access to the database would be required.
But I don't know how such a thing works?
Thanks a lot to help me on this point.
ByeYou can easily do that by implementing the apex error handling function.
See this working example http://apex.oracle.com/pls/apex/f?p=46417:10
Login as test/test
By default APEX shows an javascript alert message, I actually overwrote the native alert to show a message div using jquery
function alert(message) {
// console.info(message);
var msgBox = $('#msg-box');
if (msgBox.length === 0) {
msgBox = $('<div />', { 'id': 'msg-box'}).hide().prependTo('body');
msgBox.html(message+' <a href="javascript:void(0);" onclick="$(\'#msg-box\').hide();">X</a>').fadeIn(500);
}See {message:id=10735215} -
How to send information from HTML page to JSP without reloading HTML page?
Hello,
Is it possible to send information(row number selected by user) from HTML page to JSP without reloading HTML page?
Thanks.
Oleg.Yes, you can do this with framesets and a hidden frame.
You need a bit of JavaScritp in the "visible" frame that
sets the location of the hidden frame to the JSP.
Add the user's choice as a parameter to the JSP URL.
Maybe you are looking for
-
Connect macbook to composite tv
Hi there, I have a macbook (2009) model that I want to connect to a composite tv. I think the Apple Mini-DVI to Video Adapter will not work as it states on the mac site that "This adapter is not compatible with the 2.0GHz Intel Core 2 Duo white MacBo
-
Have older Dell Dimension 32/bit with Win XP Prof 2002. I have installed CA security suite from my ISP, which is a huge program and uses 100% of CPU on start-up & shut down, slowing everthing to a snails pace. I have removed evrything I don't need us
-
Workflows in HR: Training and Event Management (BO PDRELA_025)
Hi expert! I have a problem in the context of SAP HCM Training and Event Management and the generation of a workflow event for BO PDRELA_025! I have created entries in table T779X (through SWEHR3) as: E 1001 A025 * BOKF 0 PDRELA_025 REQUESTED E 1001
-
Syncing Videos to iPhone/iPad
I have videos recorded on a Canon PowerShot G10 in Aperture. How can I sync those to my iPad? iTunes transparently "optimizes" photos for my iPhone and iPad, but doesn't do the same for videos. How can I get iTunes (or Aperture) to do the same for vi
-
Error in source system, SQL ERROR 1652
Hello Experts, While loading data from data mart, cube to cube, the data load runs for an hour or so and the request turns red. The error message is SQL error:1652, Errors occured in Source System. Previously a day back I was able to load the data su