How to display array values in textfield?
i am creating student details with mysql database using JSON to get values and display in xcode.i got json array values from php and converted to NSMuatable array. my array result
firstName = hari;
lastname = krishna;
age=10;
fathername=ragav;
firstName = priya;
lastname = amirtha;
age=8;
fathername=ravi;
now i want to display values iwhen i am enter firstname other field values display in textfiled on button click.how to do that .help me .thanks in advance.
i am very new to xcode.
Hi,
I think that its necessaries to use AJaX.
I am implemeting something like that.
I have a input text that works like a filter and depends on what my user types in input text I populate my table with some information.
In order to do that, I put in my JSP a div with an Id and I used ajax, like that:
function ajaxFunction()
var xmlhttp;
if (window.XMLHttpRequest)
xmlhttp=new XMLHttpRequest();
else if (window.ActiveXObject)
// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
else
alert("Your browser does not support XMLHTTP!");
xmlhttp.onreadystatechange=function()
if( xmlhttp.readyState==4 )
document.getElementById("tabelaResponsaveis").innerHTML = xmlhttp.responseText;
var resp = "<f:invokeUrl var='solicitacao' methodName='getResponsaveis'/>";
xmlhttp.open("POST",resp,true);
xmlhttp.send(null);
getResponsaveis is a method inside my BPM that returns a HTML code (the table HTML code with all the information that I need to show.
I Hope to help
Thanks Marcos
Similar Messages
-
How to display array values in jsp of screen flows
Hi,
can u please help me .
I am having one array variable i have stored all the values but i have to display that in JSP page .how to display
Edited by: user12171025 on Nov 4, 2009 11:11 PMHi,
I think that its necessaries to use AJaX.
I am implemeting something like that.
I have a input text that works like a filter and depends on what my user types in input text I populate my table with some information.
In order to do that, I put in my JSP a div with an Id and I used ajax, like that:
function ajaxFunction()
var xmlhttp;
if (window.XMLHttpRequest)
xmlhttp=new XMLHttpRequest();
else if (window.ActiveXObject)
// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
else
alert("Your browser does not support XMLHTTP!");
xmlhttp.onreadystatechange=function()
if( xmlhttp.readyState==4 )
document.getElementById("tabelaResponsaveis").innerHTML = xmlhttp.responseText;
var resp = "<f:invokeUrl var='solicitacao' methodName='getResponsaveis'/>";
xmlhttp.open("POST",resp,true);
xmlhttp.send(null);
getResponsaveis is a method inside my BPM that returns a HTML code (the table HTML code with all the information that I need to show.
I Hope to help
Thanks Marcos -
How to display the value of a column in a chart at the top of each column
How to display the value of each column in a chart at the top of each column?
Like this?
Done using chart Inspector.
For details, see Chapter 7, Creating Charts from Numerical Data in the Numbers '09 User Guide. The guide may be downloaded via the Help menu in Numbers.
Regards,
Barry -
How to display 7 values of single field in row wise.
hi,
how to display 7 values of single field in row wise.
thankx in advance.hi ,
do it like this :
1 Place ur UI element in tranparent container with Layout as Row Data and Layout Data as Row Head Data
2 Ur first UI , which contains the first value as Row Head Data ,
3 Others as Row Data
u can do it with Matrix Data as well
if u want to give space , u can use HORIZONTAL GUTTER and set its width to medium / large / Xlarge
also there is a UI element "INVISIBLE ELEMENT" ,
1 u can use this UI element to provide space between ur other UI elements in the view
2 u can insert a text element as well , and in the Text property of the element press ALT + 0160.
u can give the space bw UIs as desired.
regards,
amit -
How to display filter values in analyzer
Hi expert,
I want to add filter into analyzer, above data table, I insert a few rows, and add text to hold filters, but after quit from design mode, inserted rows for filters dispear, and its spaces are taken by data table. could you please tell how to display filter values .
Many Thanks,It is looking like you are saving them as workbooks. It will be possible to maintain fliters if you save with the filters given by workbook properties, not by manual feeding.
let us know with clear expectation if you are not clear with it. -
How to display negative values in a screen field of a screen
Hi All,
Please let me know how to display negative values in a screen field of a screen.
thanksHi Kishore,
You can do this method. In the screen , create a text field of CHAR instead fo creating an INT4 field.
I have created a field of CHAR of name say TEXT.
In the main program,
declare a variable of the same name ie. TEXT.
data: TEXT(5) TYPE C.
In PBO, just assign the negative values.
It will work.Since there is automatic conversion between character and integer data types, it will work for positive values as well.
Regards,
Sylendra. -
How do I display array values in a text field?
Hi there-
I have a small Flash movie I'm trying to complete, it's my
first go around with Flash 8 so I appreciate your patience:
I built an array with some actionscript which seems to work
fine (I can trace it and all is well in the trace window). Now I'm
simply trying to display it to my Flash movie screen and I've built
a dynamic text window which is working, except that I only ever get
the last array element to appear in the dynamic text window. I've
traced the code and see all of my array values, but when I use
"myResults_txt.text=picker_array;" I only see the last position's
value in my array. I tried playing with the "multiline" attribute
for the text field, it didn't seem to make any difference.
I'm sure it's probably something silly that I've missed, but
how do you display an array, with all of it's values to a dynamic
text field (I even tried using the textArea component but ran into
the same problem).
Thanks in advance for any help-
richThanks for your input. I tried just about everything but
ended up re-writing the contents of the array to a var and looping
through the var. Not my first choice but it got me to done.
Thanks again,
Rich -
sir i want to know d solution for displaying ascii value?/?
also sir plz tell how to convert ascii to hex and hex to ascii????
i am finding difficulty to make d program.... dats y i have attached any file bcz my program is not prepared yetHi sir,
convert your string to an U8 array and display that array in an array indicator set to hex display.
Or switch your string to hex display…
Also read this! It's a pain to read your message for non-native English speakers!
-
How to display the values stored in the database in the combobox on load?
I am develping one application where in
I wanted to display the values in the combobox which I am taking from the database and in the same form passing that value in same form after selecting it,My program is running fine for the first time but next time it is giving me NullPointerException.
So can anyone tell me please how I should develop the this application to avoid this exception?
Thank You
PraddyThanx a lot for showing interest in answering my query.I am pasting my code for ur reference.Please try to reply ASAP.
Thank You,
Praddy.
CODE:
======
<html>
<head>
<script language="javascript">
function submitthisform(thisForm)
thisForm.submit();
</script>
</head>
<body>
<form method=post name=samepgm>
Select City: <select name=city onChange='submitthisform(samepgm)'><br><br><br>
<option value=''></option>
<option value='All'>All</option>
<%@ page language="java" import="java.sql.*" %>
<%
String scity = request.getParameter("city");
System.out.println(scity);
Connection con = null;
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con = DriverManager.getConnection("jdbc:odbc:property","","");
Statement st = con.createStatement();
ResultSet rs1 = st.executeQuery("select distinct hcity from housefinance");
while(rs1.next())
//String ohname = rs1.getString("hname");
String ocity = rs1.getString("hcity");
//out.println(ohname +"<br>");
out.println(ocity +"<br>");
%>
<br><br><br><option value='<%=ocity%>'><%=ocity%></option><br>
<% }
rs1.close();
if(scity.equals("All"))
ResultSet rs2 = st.executeQuery("select * from housefinance");
while(rs2.next())
String ohname = rs2.getString("hname");
String ohadd1 = rs2.getString("hadd1");
//String ohadd2 = rs2.getString("hadd2");
String ohcity = rs2.getString("hcity");
String ohpcode = rs2.getString("hpcode");
String ohtelno = rs2.getString("htelno");
String ohfaxno = rs2.getString("hfaxno");
String ohemail = rs2.getString("hemail");
String ohmobile = rs2.getString("hmobile");
%>
<pre>
<tr>
<td><p>Company : <%=ohname%> </p></td>
<td><p>Address : <%=ohadd1%></p></td>
<td><p>City : <%=ohcity%> </p></td>
<td><p>Pin : <%=ohpcode%></p></td>
<td><p>Telphone : <%=ohtelno%></p></td>
<td><p>Fax No: : <%=ohfaxno%></p></td>
<td><p>Email : <%=ohemail%></p></td>
<td><p>Mobile No. : <%=ohmobile%></p></td>
</tr>
</pre>
<%
else
ResultSet rs = st.executeQuery("select * from housefinance where hcity like '%"+scity+"%'");
while(rs.next())
String ohname = rs.getString("hname");
String ohadd1 = rs.getString("hadd1");
//String ohadd2 = rs.getString("hadd2");
String ohcity = rs.getString("hcity");
String ohpcode = rs.getString("hpcode");
String ohtelno = rs.getString("htelno");
String ohfaxno = rs.getString("hfaxno");
String ohemail = rs.getString("hemail");
String ohmobile = rs.getString("hmobile");
%>
<tr>
<td><p>Company : <%=ohname%> </p></td>
<td><p>Address : <%=ohadd1%></p></td>
<td><p>City : <%=ohcity%> </p></td>
<td><p>Pin : <%=ohpcode%></p></td>
<td><p>Telphone : <%=ohtelno%></p></td>
<td><p>Fax No: : <%=ohfaxno%></p></td>
<td><p>Email : <%=ohemail%></p></td>
<td><p>Mobile No. : <%=ohmobile%></p></td>
</tr>
<hr>
<% }
%>
</select>
</form>
</body>
</html> -
How to display(binding) values in the table from more than one node?
Hi,
I have two nodes (TRIPS & AMOUNTS)in the context. How to bind these values into the table control?
When i bind second one, first one is getting replaced.Hi Mog,
Of course it is possible to create a table from attributes of more than one node, and in some cases this is still necessary, but you have to do this the hard (manual) way.
If you have a table control, have a look at the properties and the elements belonging to it.
First of all, there is the property "dataSource", which binds to a multiple node (let's name it TableRootNode). This means that for each element of THIS node, one row is created. In each row the data of exactly one element of this TableRootNode is displayed.
Then you have columns in this table. Inside of the columns there is a header and an editor. The editor is the interesting part.
Normally the primary property of this editor is bound to an attribute of the TableRootNode. Then everything works as expected. If it binds to an attribute of a subnode (SUB) of TableRootNode, then in row i the data of the subnode of the i-th element of TableRootNode is displayed. There is no need for SUB to be a multiple node, but it must not be a singleton.
If you bind a property of the editor to an attribute, which does not lie in the subtree of TableRootNode, then you will see the same value in each row.
Now it depends on the structure of your context. Take the node, which is relevant for the change in each row (I assume it is TRIPS) and bind the table to the node as you are used to. Then for each additional column, you have to create a new column in the tree, create a new header element with a title and a new editor (e.g. textview or inputfield) and then bind the right property of the editor to the corresponding attribute in node AMOUNTS).
If these 2 nodes do not have parent-child-relationship, the tip to create a new node, which consists of the attributes of both nodes is the only solution.
Ciao, Regina -
How to display F4 values in one field based on other field selection
Hi All,
How to hide a UI element (i.e Link to action) highlited for Normal User and display the same to super user.
Component Name : /SAPSRM/WDC_DODC_SC_GAF_C
2.Can i know how to display the entries in supplier field based on Product category selection.
Right now all the entries are getting displayed in the supplier field.
I want to display only entries based on Product category.
Search Help Name : BBP_BUPA_CLL_PARTNER
Component Name : /SAPSRM/WDC_DODC_SC_I_LIM
How to enhance the web dynpro component with the filtered values.
Regards,
Krish.Hi Ashvin,
Thanks for the document. In the search help there is a standard FM which is getting executed.
Can i enhance that FM or should i copy and edit.
BBP_F4IF_SHLP_EXIT_CLL_PARTNER
If i creata a Z FM and make changes how to pass that values to my standard Component View UI Element.
If not then suggest me some alternative.
Regards,
Krish -
How to display the values in JSpinner in format day:HH:mm
Hi All,
I want to know how can I display the values inside a JSpinner in the format day:HH:mm. Here the value of 'day' can be anything say from 0 to 365 and HH stand for hour and mm stands for minutes.
I tried to implement it using
mSpinner.setEditor(new JSpinner.DateEditor(mSpinner, "DD:HH:mm"));
but here the values of day was not proper. Please let me know if there is any standard format or how can I configure my own editor.
Thanks,
Rohit.Hi,
It worked well for 112 as 112 comes under April month.. i.e. it will work properly for the range 91 to 120 as the current month is April and if we start counting from january 01 then for April month , the number of day will fall under range 91 to 120.
See, it will allow you to change the values beyond the limit (i.e. less than 91 or more than 120) but the real problem is that I used this spinner in the table and when I will try to save the value of spinner , then if the value of day in beyond the limit 91 to 120 then it will automatically changing in the range between 91 to 120.
I tried to use format DD:HH:mm ...... do I need to use any other format..
Hi All,
I want to know how can I display the values inside
de a JSpinner in the format day:HH:mm. Here thevalue
of 'day' can be anything say from 0 to 365 and HH
stand for hour and mm stands for minutes.
I tried to implement it using
mSpinner.setEditor(newJSpinner.DateEditor(mSpinner,
, "DD:HH:mm"));
but here the values of day was not proper. Define "not proper". I just tried it and it displayed
day 112 for today which seems correct. -
How to display field value only once in REUSE_ALV_GRID_DISPLAY
hi experts,
i am using REUSE_ALV_GRID_DISPLAY, for alv outpur display.but i want one of the field in output ,not to display the value which is of same, it have to be displayed only once, I mean i have a number which contains multiple line items corresponding, here i want to display the field value only once when it is repeating , for the same header number, how can i achieve itHi,
check the sample code,
REPORT Z_ALV.
Database table declaration
TABLES:
sflight.
Typepool declaration
TYPE-POOLS:
slis.
Selection screen elements
SELECTION-SCREEN BEGIN OF BLOCK blk_1 WITH FRAME TITLE text-000.
SELECT-OPTIONS:
s_carrid FOR sflight-carrid.
SELECTION-SCREEN END OF BLOCK blk_1.
Field string to hold sflight data
DATA:
BEGIN OF fs_sflight ,
carrid TYPE sflight-carrid, " Carrier Id
connid TYPE sflight-connid, " Connection No
fldate TYPE sflight-fldate, " Flight date
seatsmax TYPE sflight-seatsmax, " Maximum seats
seatsocc TYPE sflight-seatsocc, " Occupied seats
END OF fs_sflight.
Internal table to hold sflight data
DATA:
t_sflight LIKE
STANDARD TABLE
OF fs_sflight .
Work variables
DATA:
t_fieldcat TYPE slis_t_fieldcat_alv,
fs_fieldcat LIKE
LINE OF t_fieldcat.
*START-OF-SELECTION
START-OF-SELECTION.
PERFORM get_data_sflight. " Getting data for display
PERFORM create_field_cat. " Create field catalog
PERFORM alv_display.
*& Form create_field_cat
Subroutine to create field catalog
There is no interface paramete
FORM create_field_cat .
PERFORM fill_fieldcat USING 'Carrier Id' 'CARRID' '2'.
PERFORM fill_fieldcat USING 'Connection No' 'CONNID' '1'.
PERFORM fill_fieldcat USING 'Flight Date' 'FLDATE' '3'.
PERFORM fill_fieldcat USING 'Maxm.Seats' 'SEATSMAX' '4'.
PERFORM fill_fieldcat USING 'Seats Occ' 'SEATSOCC' '5'.
ENDFORM. "create_field_cat
*& Form fill_fieldcat
Subroutine to fill data to field column
-->p_seltext Column label
-->p_fieldname Fieldname of database table
-->p_col_pos Column position
FORM fill_fieldcat USING
p_seltext LIKE fs_fieldcat-seltext_m
p_fieldname LIKE fs_fieldcat-fieldname
p_col_pos LIKE fs_fieldcat-col_pos.
fs_fieldcat-seltext_m = p_seltext.
fs_fieldcat-fieldname = p_fieldname.
fs_fieldcat-col_pos = p_col_pos.
APPEND fs_fieldcat TO t_fieldcat.
CLEAR fs_fieldcat.
ENDFORM. " fill_fieldcat
*& Form get_data_sflight
Subroutine to fetch data from database table
There is no interface parameter
FORM get_data_sflight .
SELECT carrid
connid
fldate
seatsmax
seatsocc
FROM sflight
INTO TABLE t_sflight
WHERE carrid IN s_carrid.
ENDFORM. " get_data_sflight
*& Form alv_display
Subroutine for ALV display
There is no interface parameter
FORM alv_display .
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
it_fieldcat = t_fieldcat
TABLES
t_outtab = t_sflight
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc NE 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " alv_display
End of code -
How To Display Minus value in SAP SCript
Hello Guys.
I am working on a Script. My Problem is that For a fields BSAD-DMBTR.
I have to show this fields value as minus or plus as per condition with fields
<b>bsad-shkzg</b>. In my Internal table it's update as minus but when I am calling Write form with loop. the value is not display with minus sign.
How can I display value with minus sign in SAP script.
Regards
Swati,,Hello Guys..
Thanks for Reply. But I am doing that thing already. My Internal table is updated with minus value. My Problem is not That.
let's suppose.
itab-name = 'xyz'.
itab-value = 100.
append itab.
itab-name = 'xyz1'.
itab-value = -1 * 100.
append itab.
loop at itab.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'LINE'
function = 'SET'
type = 'BODY'
window = 'MAIN'
EXCEPTIONS
element = 1
function = 2
type = 3
unopened = 4
unstarted = 5
window = 6
bad_pageformat_for_print = 7
spool_error = 8
codepage = 9
OTHERS = 10.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
endloop.
Now when value is printed in SAP Script both value is display as plus .I want to display secound value as minus.
Please reply it's urgent.
Thanks
Swati.... -
How to display field values in long text of messages....
Hi,
Currently iam doing an userexit. In that i want to display error messages. and if we click on message it will display the long text. My question is i want to display field values in the long text. Under the long text's &system_response& i want to display a field value.
Regards
chinnaHi Chinna,
Within short and long texts, you can use placeholders, which can be replaced with the content of data objects using the MESSAGE statement. A maximum of four character-type placeholders are permitted; they are indicated by #&i# in short texts, and by #&Vi&# in long texts, where i = [1, 4]. If #&# itself is to be displayed as part of the text, it must be specified as #&&# in short texts and as "&" in long texts.
To add some detail on how to create variables in Long text, you have to go to 'commands' and in symbol option provide the variables like
&V1& &V2& and so on.
Hope this helps you.
revert for further clarification.
<b>Alwyas reward Points to useful suggestions.</b>
Regards,
Vikas
Message was edited by:
Vikas Taneja
Maybe you are looking for
-
Fonts not embedding when "save as" pdf
Version: Photoshop CS4 64 bit on Windows Vista 64. Issue: fonts not getting embedded during conversion to pdf. I am attempting to save files for commercial printing in Photoshop pdf format (file-save as-pdf). In the past, using previous versions of P
-
Transferring photos from pc to mac
I'm having a hard time transferring my photos from my pc to my new mac. I used Migration Assistant but the photos didn't transfer. Anyone have a suggestion?
-
I recently set up my Apple TV 3 in my college dorm, which uses a WPA2 Enterprise network, to airplay from my 2011 MBP on 10.8.2. It was working fine (Airplay, mirroring, home sharing), then all of a sudden Airplay and Mirroring stopped working. The i
-
hi all, I have a parent report with 5 fields. out of which 3 fields are calculated field. i have to provide the drill down for those calculated fields. eg: parent A1 A2 A5 >1 =1 <1 aaa 12 1 -2 22 bbb 2 1 0 11 I have given the drill down for the range
-
Can't download Photoshop purchase. Help!
I just purchased Photoshop subscription edition and I want to download the application, but when I go to login to Creative Cloud, I get this message "You are not eligible to use Creative Cloud services due to the Service Eligibility Requirements". Wh