Correct usage of select and option statements
Is it ok if I say this in my option statement?
<select name="XYZ" onchange="return valChange(this)">
<option <%=Selected%> value="100"><%=100%%></option>Or should the option tag just contani the variable names instead of values directly?
like this
<option <%=aTmpSelected%> value="<%=abc%>"><%=fslr%></option>where atmpselected contains selected,
abc contains 100,
and
fslr contains 100%,
as values?
Please specify using an example.
Thanks for your time.
Tutorial on how to use select elements:
http://w3schools.com/tags/tag_select.asp
Tutorial on how to use option elements:
http://w3schools.com/tags/tag_option.asp
Sandbox to test out your code:
http://w3schools.com/html/tryit.asp?filename=tryhtml_select2
The value attribute is the string that gets passed to the form when it's submitted. The text between the <option></option> tags is what gets displayed for that choice. You can use a conditional to decide if "selected" gets added to the html.
Similar Messages
-
Can I use a select and update statement in a single jsp file?
I want to update the BUY table everytime I would add a SELL transaction.....I want to minus the stocks that I sold to those that Ive bought before.....
note: I used a seperate table in BUY and SELL transaction
After I Have added a transaction, I want to update the buy table. This is my problem, can I used both SELECT and UPDATE statement at the same time in a single jsp file for example like this:
select * from test, test1;
update test
set total_shares=total_shares-Stotal;
where stock_code=Scode AND name_broker=Sbroker;
Can i have both of these statements in the same jsp file in oder to update the buy table?
Or can anyone suggest how can process that update?THANKS!
--------------------Can i have both of these statements in the same jsp file in oder to update the buy table?Yes. But wouldn't it have been easier just to try it?
-
Hi all,
Given the following code :
TYPE option_rec IS RECORD
value varchar2(3),
label varchar2(255)
TYPE option_list_t IS TABLE OF option_rec;
FUNCTION get_object_list
RETURN option_list_t
PIPELINED
DETERMINISTIC
IS
tmp option_rec;
BEGIN
tmp.value:='1';
tmp.label:='foo';
PIPE ROW(tmp);
tmp.value:='2';
tmp.label:='bar';
PIPE ROW(tmp);
RETURN;
END get_object_list;
FUNCTION generate_select(selected_value in varchar2)
RETURN sys_refcursor
IS
ret sys_refcursor;
BEGIN
open ret for
select value as value,
'(' || value || ') ' || label as label,
case value
when selected_value then
'selected'
else
end as selected
from table(get_object_list);
return ret;
END generate_select;
I can't succeed in runnig this query :
select *
from cursor(generate_select('2'))I have the following error :
ORA-00933: "SQL command not properly ended"What is wrong ?
I run on Oracle 10gR2Having a pipelined function defined search documentation for TABLE operator
You must select from (TABLE(get_object_list()) where ...
Regards
Etbin
http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14261/tuning.htm#sthref2351
Edited by: Etbin on Apr 27, 2009 7:09 PM -
JDBC Sender - Different number of records selected and updated.
Hi people,
We have a JDBC -> Abap proxy scenario. The JDBC sender is pooling an Oracle database to retrieve data from a table X, each 30 minutes. The select and update statements in jdbc sender are below
SELECT FIELD1, FIELD2, FIELD3 FROM MY_TABLE WHERE STATUS = 1
UPDATE MY_TABLE SET STATUS = 2 WHERE STATUS = 1
Sometimes the message sent to Abap proxy has, for example, 400 records. Looking at runtime workbench, message monitoring, for the same message there is a log like this
Channel SENDER_JDBC_CHANNEL: Query executed successfully. Start update
Channel SENDER_JDBC_CHANNEL: 510 row(s) updated successfully
Someone has already experienced something like this? How can I handle this to guarantee to update only those read records?
regards.
robertiHi All,
Even we are facing the same problem.
In our scenario, receiver is SAPR3. (IDOC)
Will this parameter serialization work in our case?
1. SELECT XBLNR, WERKS, MATNR, MDV01, BACKFLQUANT, STATUS, SAPTIMESTAMP, PITSTIMESTAMP, PMTIMESTAMP, BATCH FROM PMBPITS.PITS_UNITY WHERE STATUS = '01' and rownum<200 .
2. UPDATE PMBPITS.PITS_UNITY SET STATUS = '02' , SAPTIMESTAMP = sysdate WHERE STATUS = '01' and rownum<200 ( currently the value is rownum < 5 )
Thanks!!
Regards
Gouri -
Within music Library can anyone please explain why after I select the option to sort 'Album by Artist' a number of tracks are being treated as separate albums? How can I fix this? I have tried to manually correct by 'drag and drop' individual tracks but that doesn't work. My music library includes a number of repeat album artwork images simply because not all tracks are being listed under the one album making my library more difficult to use than it should. Any advise would be appreciated.
See Grouping tracks into albums.
tt2 -
my cpu usage keeps popping up and saying firefox memory usa isge is at 73%. then my computer runs slow. i did not have this problem with my last version of firefox. also usage from plug in container is high. how do i correct this?
Credit Tony E:
To downgrade to Firefox 3.6 first uninstall Firefox 4, but do not select the option to "Remove my Firefox personal data". If you select that option it will delete your bookmarks, passwords and other user data. See https://support.mozilla.com/kb/Uninstalling+Firefox
You can then install the latest version of Firefox 3.6 available from http://www.mozilla.com/en-US/firefox/all-older.html - it will automatically use
your current bookmarks, passwords etc.
To avoid possible problems with downgrading, I recommend going to your profile folder and deleting the following files if they exist - extensions.cache, extensions.rdf, extensions.ini, extensions.sqlite and localstore.rdf. Deleting these files will force Firefox to rebuild the list of
installed extensions, checking their compatibility, and reset toolbar customizations.
For details of how to find your profile folder see https://support.mozilla.com/kb/Profiles -
I'm using the latest photoshop cc 2014 with most updated camera raw... i am having A LOT/REPEATED trouble getting files to "synch" with corrections, no matter what i options i select (i.e. "everything")... WTH is wrong with me/my computer/adobe?! help. fast. please
BOILERPLATE TEXT:
Note that this is boilerplate text.
If you give complete and detailed information about your setup and the issue at hand,
such as your platform (Mac or Win),
exact versions of your OS, of Photoshop (not just "CS6", but something like CS6v.13.0.6) and of Bridge,
your settings in Photoshop > Preference > Performance
the type of file you were working on,
machine specs, such as total installed RAM, scratch file HDs, total available HD space, video card specs, including total VRAM installed,
what troubleshooting steps you have taken so far,
what error message(s) you receive,
if having issues opening raw files also the exact camera make and model that generated them,
if you're having printing issues, indicate the exact make and model of your printer, paper size, image dimensions in pixels (so many pixels wide by so many pixels high). if going through a RIP, specify that too.
etc.,
someone may be able to help you (not necessarily this poster, who is not a Windows user).
a screen shot of your settings or of the image could be very helpful too.
Please read this FAQ for advice on how to ask your questions correctly for quicker and better answers:
http://forums.adobe.com/thread/419981?tstart=0
Thanks! -
Performance Measure - Select SUM and Collect Statement.
Dear All,
I am using YNME_PROCESS_PO_CUST Badi in this i writing some validation Delivery Completion.
For that i need to calculate GR qty and Delivery quantity based on this i need some validation. But here i confussed which statement i need to use for bast performance.
Note: In Badi Item Level Data will be process one by one..like item level 10 then 20 then 30......Like that
Code will like that---
SELECT SUM( menge ) FROM ekes
INTO l_delqty
WHERE ebeln = ls_mepoitem-ebeln
AND ebelp = ls_mepoitem-ebelp.
SELECT SUM( dabmg ) FROM ekes
INTO l_grqty
WHERE ebeln = ls_mepoitem-ebeln
AND ebelp = ls_mepoitem-ebelp.
l_delqty1 = l_grqty - l_delqty.
IF l_delqty1 NE 0.
ls_mepoitem-elikz = ''.
CALL METHOD im_item->set_data( ls_mepoitem ).
ENDIF.
I check in SE38 response is better in this code.
Other code may be like that .. same data will be like upper/
SELECT * FROM ekes
INTO CORRESPONDING FIELDS OF TABLE it_ekes
WHERE ebeln = ls_mepoitem-ebeln
AND ebelp = ls_mepoitem-ebelp.
LOOP AT it_ekes.
MOVE-CORRESPONDING it_ekes TO it_ekes1.
COLLECT it_ekes1.
CLEAR it_ekes.
ENDLOOP.
READ TABLE it_ekes1 INDEX 1.
IF sy-subrc EQ 0.
l_delqty1 = it_ekes1-menge - it_ekes1-dabmg.
ENDIF.
IF l_delqty1 NE 0.
ls_mepoitem-elikz = ''.
CALL METHOD im_item->set_data( ls_mepoitem ).
ENDIF.
Can any send me document--
Regard
DKHi,
Single Select statement is certainly better.
But no need to do select * and using into corresponding fields. These will reduce the performance. Also the loop statment is not absolutely correct. Following could be a sample code.
TYPES: BEGIN OF gx_ekes, (maintaining same sequence of fields as in select statement, this way no need of into corresponding fields)
ebeln type ebeln,
ebelp type ebelp,
menge type bbmng,
dabmg type dabmg,
END OF gx_ekes.
DATA : lit_ekes TYPE TABLE OF gx_ekes,
git_ekes TYPE TABLE OF gx_ekes,
wa_ekes TYPE gx_ekes.
SELECT ebeln
ebelp
menge
dabmg
FROM ekes
INTO TABLE it_ekes
WHERE ebeln = ls_mepoitem-ebeln
AND ebelp = ls_mepoitem-ebelp.
LOOP AT lit_ekes INTO wa_ekes.
COLECT wa_ekes INTO git_ekes.
CLEAR: wa_ekes.
ENDLOOP.
CLEAR: lit_ekes.
Now the first record in git_ekes will have the sum as only one line item is being passed in the user exit.
Regards,
Pranav. -
html:select and html:options simple question - please help
Hi Friends,
I am having a problem, please help me .I want to run a query and display all the lastnames of all the users in my database.Here are my files:
UserForm.java
public class UserForm extends ActionForm{
private name firstName;
private name lastName;
//all getter and setters
viewuser.jsp
<html:select property="lastName">
<html:options collection="users" property="lastName" labelProperty="lastName" />
</html:select>
and my Java Utility class method
public ArrayList getusers() throws Exception {
ArrayList aList = new ArrayList();
Connection con = ConnectionUtil.getConnection();
PreparedStatement stmt = null;
try {
stmt = con.prepareStatement("select last_name from USERS);
ResultSet rs = stmt.executeQuery();
if (rs.next()) {
aList.add(rs.getString(1));
}else {
return null;
rs.close();
return aList;
} catch (SQLException e) {
e.printStackTrace();
throw new ServiceProcessingException(e.getMessage());
} finally {
ConnectionUtil.closeStatement(stmt);
ConnectionUtil.closeConnection(con);
}My problem is what i need to do in my Action class,so that it sets the "users" variable
properly and i would be able to read that variable in my jsp and display the lastname
of all the users.I am tryin this but failing badly:
public class UserAction extends Action{
ArrayList userssList = Utility_class_obj.getUsers();
request.getSession().getServletContext().setAttribute("users", usersList);Please Please help,I would really appreciate your help.
ThanksThanks a lot friend...this time i made it work my style,next time i will use tha mehod.But I think I am not doing it the right way,please correct me:
This is the method in my utility class where i run the query and I doubt I am not doing it right here:
PreparedStatement stmt = null;
ViewForm vForm = null;
try {
stmt = con.prepareStatement("SELECT LAST_NAME FROM USERS_ADD"); \
ResultSet rs = stmt.executeQuery();
while(rs.next()) {
vForm = new ViewForm(rs.getString(1));
aList.add(vForm);
rs.close();
return aList; }
}And I made this constructor in my viewForm class:
public ViewForm(String lastName){ this.setLastName(lastName); }I do this in my Action class then:
ArrayList pList = csDAO.getUsers();
if(pList != null){
request.getSession().getServletContext().setAttribute("plist", pList);
}And finally this in my jsp:
<html:select property="lastName">
<html: options collection="plist" property="lastName" labelProperty="lastName" /> And it works,but i don't think I can keep adding constructors to my form class like that,and moreoever if I want to search by first name ,there would be a conflict between 2 constructors,so can someone please tell me the right way to do this.
Thanks
Mick -
I have LR 5. When I'm in the book module and select the option to "Send Book to Blurb" i get an error message saying "The file does not have a program associated with it for performing this action. Please install a program, or if one is already installed, create an association in the Default Programs control panel."
How do I fix this?Try the following user tip:
"There is a problem with this Windows Installer package ..." error messages when installing iTunes for Windows -
Combine select and update into single statement,without bind-variable
I have a problem, that I think is not possible to solve the way I want to, but I just wanted to check before leaving the idea...
I am looking for a way to combine the select and the update statement into one single statement. This is what I wan't to achive: select some data, and update the data selected before returning them.
On this site http://www.psoug.org/reference/update.html I see that the following are possible:
var bnd1 NUMBER
var bnd2 VARCHAR2(30)
var bnd3 NUMBER
UPDATE employees
SET job_id ='SA_MAN', salary = salary + 1000,
department_id = 140
WHERE last_name = 'Jones'
RETURNING salary*0.25, last_name, department_id
INTO :bnd1, :bnd2, :bnd3;
I need to have this as a single statement, and cannot use bind-variables. So I was hoping that something like this could be possible:
UPDATE customer c
SET c.HAS_CREDIT ='1'
WHERE c.HAS_CREDIT = '0'
RETURNING c.CUSTOMER_NO, c.FIRSTNAME, c.LASTNAME
where c.HAS_CREDIT = '1'
But this doesn't compile, complaining of missing into (ORA-00925: missing INTO keyword). And even though I would like this to be possible because this would solve my current problem, I think it would be very confusing. For instance; would the where clause of the returning part be operating after the update or before?
Any comments or suggestions on how to get it work in a single statement, or should I just leave this path straight away?Hi,
RETURNING only works with bind variables, see
http://download-uk.oracle.com/docs/cd/B19306_01/appdev.102/b14261/returninginto_clause.htm#sthref3006
The real problem is that the form of RETURNING clause with bind variables is only valid for single row update or insert statements.
To update (or insert) multiple rows and return the data, you will need to use
RETURNING BULK COLLECT INTO clause. See
http://download-uk.oracle.com/docs/cd/B19306_01/appdev.102/b14261/tuning.htm#sthref2236
Cheers,
Colin -
Need a shortcut to "Allow pages to choose their own colors, instead of my selections above option preference" I know where it is and how to use it but I have to go through 7 mouse clicks to change it, then a few minutes later change it back. I also know the sequnce is alt t, alt o, alt c, alt a, then ok, ok. Got to be a way to make a one key short cut for this. I use a black background to reduce eye strain, but about 10% of the webpage I go to can't be send with black so I have to go into tools and hit 6 or 7 things to chnage it then after through with webpage have to do it all over at Not allow webpages to have own color. Very very cumbersome.
== This happened ==
A few times a week
== made that wayhttps://addons.mozilla.org/en-US/firefox/addon/toggledocumentcolors-198916/
The above addon will solve your problem.
Shortcut to toggle user color/page color :- Ctr+Shift+C -
Ever since I bought my ipod touch 4th generation, IOS 4G, 8GB in January 2011, it would not sync selected playlists.
This is even when I have checked 3 things:
1. Under Summary/Options, I've checked "Manually manage music and videos" and "sync only checked songs and video."
2. When I go to the Music tab and attempt to sync, I have already chosen "selected playlists, artists, albums and genres"
3. When I click on "Sync" a window comes up and says "Are you sure you want to sync music? All existing content on the iPod will be removed and replaced with songs and playlists from your iTunes library."
Do I have a defective ipod?
5Red5Sync should be an automatic feature that can be triggered manually. Although, I have a two Shuffles, which are obviously not Touches, so they might be different.
If you have your iPod set to manually manage music, the option to sync only checked songs should not do anything. You have to drag songs manually to the iPod on the sidebar to add music (I've created playlists of only songs I want, then I shift-click the whole thing and drag all of the songs at once to update them, that way I don't have to remember what goes where), and you have to manually select and delete songs from the iPod's 'Music' library on the sidebar to remove them.
As for syncing the files, on my shuffles, they sync individual songs (for Get Info information changes ONLY) automatically every time I plug them into iTunes, and again if I make any changes to the Get Info stuff while they're plugged in. For example, if I added a song to my iPod playlist, it wouldn't sync it, but if I changed the genre of a song that's already on it, it will automatically sync.
Good luck. -
I am doing a book. Can I select the option of 13 photos on a page, put only one photo in the middle box and expect the rest of the page to be printed with only white aroind that photo in the middle?
No
All photos frames must contain photos or you can not order the book
LN -
How can I get my castleville legends to connect to facebook? I select the option to connect, it goes to facebook and back to the app, but it still won't connect. I have both restarted the app and my phone wiht no luck.
Hello sdrail81,
The following article provides tips that can help resolve most issues with apps from the App Store.
iOS: Troubleshooting apps purchased from the App Store
http://support.apple.com/kb/TS1702
Cheers,
Allen
Maybe you are looking for
-
updating a photoshop/tif file in InDesign. I usually keep my photo images as RGB layered files and place them in InDesign . . . on m y final steps in Indesign I go to update my images in Photoshop - convert them to CMYK as well as any final touches n
-
Trouble with Elements organizer and online storage space
Hello, I have a problem with my online storage space showing files, when I have deleted everything. The techs at Adobe want me to reset client services within organizer, but this only causes the program to hand up loading for hours.... So, is ther
-
I would like to add controls on the web form and want to know should I use HTM code to add controls or can drag and drop from any tool box? Your information and help is great appreciated, Regards, Iccsi,
-
In iPhoto most of my photos appear to have been replaced by much smaller versions. What has happened and how can I get the full size photos back?
-
Elements will not 'save' using an iMac
I have used Adobe Prem Elements for some years on a PC....No prob..love it...generally ran smoothly,but recently purchased an iMac- 0S (Mountain Lion)and loaded Mac Elements disks... Ok probs there but sorted...Getting over probs importing clips from