Passing Values to Window
I feel like this should be easy but I am missing something.
I have a <mx:Window> I am using. I need to be able to
pass a simple parameter to it when I call it from the main app.
What am I missing?
Thanks.
A function or a property?
Is the parameter an existing property of the Window object? A
property of a child object of your Window object? A parameter of an
existing method? etc...
Similar Messages
-
I have the next problem:
I have a text box named "City" , and next to it I have a button, which open a new window where the user can search for a specific city. For expample, when the search window opens, the user can input %new%, and then the same page load new york, new yersey, etc, so the user pick one, and accept.
So the city that the user chose, have to be passed somehow to the first page. How can I do this, pass the value to the first page? that is how can I pass the city "new york" for example, from the search window to the first window?
Thanks a lot.You have two options:
1) use javascript to set a form field (recommended)
2) use the session
a popup window has the same session as the opener. As for javascript, you can use something like:
window.opener.formname.fieldname.value = document.formname.city.value;to set the field 'fieldname' in the parent page. -
Pass values between Windows phone app and wpf
Hi,
i am creating a windows phone app where it is like a remote for desktop app which have timer start stop and break
where start should activate the desktop applicaition timer like that.
what are the possibility that i can control wpf(desktop) app with a windows phone app directly without any database sort of thing.
thank youFor help with the WPF side of this you'll be better off posting in the WPF forum.
There isn't any remote control system built in, but you can use standard networking to implement your own. From the phone side take a look at the
Connecting to networks and web services documentation. In particular, the
Adding support for networking and
Connecting with sockets sections are likely to get you on the right path. -
Passing values from javascript in pop up window to parent jsp
Hi
I am trying to pass values from a pop up window to the main window that popped this child window , with the idea to have the parent window refresh itself with value from pop up window.But the values are not going through.I do a request on the hidden variable but when the parent
jsp refreshes , the variable is still null...
The following is the code i have .
Parent jsp:a.jsp
<form name='summary'>
<input type=hidden name=customerid value="">
<input type="button" class="textButton" name="action" value="customerlist" onClick="javascript:openWin('b.jsp','800','350')">
<script>
function openWin(loc, w, h) {
var newWin = window.openloc,"HTML",'dependent=1,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=' + w + ',height=' + h);
newWin.window.focus();
</SCRIPT>
<%
String optionVal = request.getParameter("customerid");%>
var user = "<%= optionVal%>";
</form>
child jsp- b.jsp (pop up window)
<script>
function closer(){
var val = document.formname.id.selected.value;
window.opener.document.summary.customerid.value = val;
window.opener.location.reload();
</script>
<form name = formname>
<input type="text" name="id" value = ''>
<input type="button" class="textButton" value="select"
onClick="closer();window.close();">
</form>
Any ideas on what i am missing
Thanks
Arnuse window.opener.document.forms[0].filedname.value = 'value u need to set'
-
How to pass values from main window to pop-up window?
I want to pass a value from the main window (1st form) to pop-up window (2nd form). The first form is of name booking.jsp and 2nd form is of name Fund_booking.jsp. I am using window.showModalDialog to open the window. I think, I have written right code in main window to pass the value but even then I am not able to get it on pop-up window. I am not even able to display an alert on pop-up window saying "hi" by writing a function on save Button in pop-up window. The code is as follows:
On booking.jsp:
<script>
function popup()
var aForm;
aForm = D_requisition_id.options[D_requisition_id.selectedIndex].text;
\\Here I have captured value from a drop down box in my main window form and assigned it to the variable.
alert(aForm);
var myObject =new Object();
myObject.Brandcode = aForm;
alert(myObject.Brandcode);
window.showModalDialog("Fund_booking.jsp",myObject,"dialogHeight:400px;dialogWidth:420px;");
</script>
<button name="B_FundBooking" tabIndex=4 style='POSITION:absolute;LEFT:393;TOP:292;WIDTH:100;height:24;BACKGROUND-COLOR:buttonface' onClick ="popup()">Fund Booking</button>
On Fund_booking.jsp:
<SCRIPT>
var oMyObject = window.dialogArguments;
var sBrandcode = oMyObject.Brandcode;
alert(sBrandcode);
</SCRIPT>
Even the following alert is not getting displayed in pop-up window;
<script>
function ValidateData()
alert("Hi");
</script>
<button name="B_Save" tabIndex=1 style='POSITION:absolute;LEFT:255;TOP:315;WIDTH:75;height:24;BACKGROUND-COLOR:buttonface' onClick ="ValidateData()">Save</button>
I am using DIV instead of frames in my both forms. I just want to get that value in my pop-up window to write a query based on which data will get displayed in my table of pop-up window.
Plz help me to solve this problem.Well, this is actually a JavaScript question, not a Java question but I can give some hints.
When you do pop-up windows you need to put JavaScript in the html of the pop-up itself. Data can be passed by creating new fields in the window object, which the popup can access via the window.openner field.
So, before invoking the popup add any data to be passed to the window object, then the onLoad function in the popup grabs the data. -
Passing value from JavaScript window to form
Hi,
Coul'd You help me?
I have a test form. I open new JavaScript window from this form. I generate list of authors in this window by the procedure show_list. I want to pass value from JavaScript window back to test form, but
the command "window.opener.document.forms[idx_form].elements[idx_fld].value = val;"
don't pass value to test form. Where is mistake?
Thanks Vaclav
-------------- test form --------------
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=windows-1250">
<TITLE>Edit</TITLE>
<SCRIPT LANGUAGE="JavaScript">
<!-- Comment out script for old browsers
function get_list(frm, fld)
var idx_form, idx_fld;
idx_form = get_idx_form(frm);
idx_fld = get_idx_field(idx_form, fld);
var w = open ("http://vasekora/pls/portal309/ahs.RD_CISEL.SHOW_LIST" + "?startPg=1" + "&master_fld=" + "ID_AUTHOR" + "&slave_fld=" + "NAME" + "&ownr=" + "REDAKCE" + "&tbl_name=" + "AUTHORS" + "&cmd_qry=" +"" + "&idx_form=" + idx_form + "&idx_fld=" + idx_fld,"wn_Authors","width=500,height=600,resizable=yes,menubar=yes, location=yes");
if (w.opener == null)
w.opener = self;
w.focus();
function get_idx_form(p_form_name)
var v_index, v_full_name, v_return;
for(v_index=0; v_index < document.forms.length; v_index++)
v_return = -1;
v_full_name = document.forms[v_index].name.split(".");
if (v_full_name == p_form_name)
v_return = v_index;
break;
return v_return;
function get_idx_field(idx_form, field_name)
var v_index, v_full_name, v_return;
for(v_index=0; v_index < document.forms[idx_form].length; v_index++)
v_return = -1;
v_full_name = document.forms[idx_form].elements[v_index].name.split(".");
if (v_full_name == field_name)
v_return = v_index;
break;
return v_return;
//-->
</SCRIPT>
</HEAD>
<BODY>
<FORM NAME="f_aut_new" ACTION="javascript:testclose()" METHOD=POST TARGET="_blank">
<INPUT TYPE="text" NAME="id_aut">
<IMG SRC="images/list.gif" alt="Seznam" border="0" align=bottom><BR><BR>
<INPUT TYPE="submit" VALUE="Save">
<INPUT TYPE="reset" VALUE="Cancel">
</FORM>
</BODY>
</HTML>
-------------------- end test form --------------
procedure show_list
startPg integer,
master_fld varchar2,
show_fld varchar2,
ownr varchar2,
tbl_name varchar2,
cmd_qry varchar2,
idx_form integer,
idx_fld integer
is
TYPE cur_typ IS REF CURSOR;
c cur_typ;
c_cnt cur_typ;
i integer;
pg rd_types.pages_t;
odkaz varchar2(4000);
bk_url varchar2(4000);
s1 varchar2(4000);
var_mfld integer;
var_sfld varchar2(8000);
bl boolean;
var_cmd varchar2(2000);
begin
htp.HTMLOPEN;
htp.HEADOPEN;
htp.p('<SCRIPT LANGUAGE="JavaScript">');
htp.p('<!-- Comment out script for old browsers');
htp.p('function Close_List(val, idx_form, idx_fld)');
htp.p('{');
htp.p('window.opener.document.forms[idx_form].elements[idx_fld].value = val;');
htp.p('self.close();');
htp.p('}');
htp.p('//-->');
htp.p('</SCRIPT>');
htp.HEADCLOSE;
htp.BODYOPEN;
if cmd_qry is null then
s1 := 'SELECT a.'||master_fld||', a.'||show_fld||' FROM '||ownr||'.'||tbl_Name||
' a ORDER BY a.'||show_fld;
else
var_cmd := UPPER(cmd_qry);
s1 := 'SELECT a.'||master_fld||', a.'||show_fld||' FROM '||ownr||'.'||tbl_Name||
' a WHERE UPPER(a.'||show_fld||') LIKE ''%'||var_cmd||'%'' ORDER BY a.'||show_fld;
end if;
i := 1;
OPEN c FOR s1;
LOOP
FETCH c INTO var_mfld, var_sfld;
IF c%FOUND THEN
IF i >= pg.StartRec AND i <= pg.EndRec THEN
odkaz :=''||var_sfld||'';
htp.p(i||': '||odkaz||' ('||var_mfld||')<BR>');
ELSE
IF i > pg.EndRec THEN
EXIT;
END IF;
END IF;
ELSE
EXIT;
END IF;
i := i + 1;
END LOOP;
htp.p('<BR><B><INPUT TYPE=BUTTON ONCLICK="javascript:self.close();" VALUE="Close"></B><BR><BR>');
CLOSE c;
htp.BODYCLOSE;
htp.HTMLCLOSE;
end;If this makes any difference: Instead of using "var w = open..." try "var w = window.open..."
-
Pass values between views of different window
Hello Experts,
I am a newbie in ABAP Webdynpro. I have 2 views in 2 different windows. I want to pass values calculated from one view to the other view. But i cannot connect the views.
If the views were within the same window, I could connect them using inbound and oubound plugs with parameters. However in this case i am unable to establish the navigation link between these 2 views.
Has anyone of you experts come across such kind of requirement? If so, can you please guide how to connect the 2 views?
Thanks and regards,
Nitish.Everyone,
I was finally able to connect the 2 views by using the component controller.
I created an attribute on the context of the component controller and read/set of the attribute of component controller on the button click event.
To access the attribute of the component controller, please find below a code snippet which was useful to me:
Data declaration for accessing the component controller
DATA:
lo_component type REF TO if_wd_component,
lo_context type REF TO if_wd_context,
lo_controller type REF TO if_wd_controller,
lo_node type ref to if_wd_context_node,
lo_child type REF TO if_wd_context_node.
DATA lo_el_test_depts TYPE REF TO if_wd_context_element.
get component controller API
lo_component = wd_comp_controller->wd_get_api( ).
lo_controller ?= lo_component.
accessing the context of the component controller
CALL METHOD lo_controller->get_context
RECEIVING
context = lo_context.
lo_context is the required context, from here we can manipulate its components
get to the root node in context of component controller
lo_node = lo_context->root_node.
using lo_node i was able to read and write to the attribute i created in component controller.
Thank you all for your help.
Nitish.
Edited by: Nitu_0105 on Apr 8, 2011 3:29 PM -
Hello Experts,
I am trying to test usage of f4 help function module.
We want to dynamically pass values from remote machines into the given input parameters of a Given Search help and receive the output into a table (no dialogs required .. so no pop ups )
I wrote a test program to just test if we can really do that at runtime ?
This program pops up the window of search help First I want to surpress that window and Second I have no clue
( How to pass the input parameters as value eg. 20 to a given field as we pass manually )
Can some one suggest something here ?
REPORT ZTEST_F4_TEST.
data lt_return TYPE TABLE OF DDSHRETVAL.
data ls_return TYPE DDSHRETVAL.
data lt_return_ddic TYPE TABLE OF zDDSHRETVAL.
data ls_return_ddic TYPE zDDSHRETVAL.
PARAMETERS ptable type tabname.
PARAMETERS pfield type fieldname.
PARAMETERS pshelp type SHLPNAMe.
CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
EXPORTING
tabname = ptable
fieldname = pfield
SEARCHHELP = pshelp
* SHLPPARAM = ' '
* DYNPPROG = ' '
* DYNPNR = ' '
* DYNPROFIELD = ' '
* STEPL = 0
* VALUE = ' '
MULTIPLE_CHOICE = 'X'
DISPLAY = 'F'
SUPPRESS_RECORDLIST = 'X'
* CALLBACK_PROGRAM = ' '
* CALLBACK_FORM = ' '
* SELECTION_SCREEN = ' '
* IMPORTING
* USER_RESET =
TABLES
RETURN_TAB = lt_return
* EXCEPTIONS
* FIELD_NOT_FOUND = 1
* NO_HELP_FOR_FIELD = 2
* INCONSISTENT_HELP = 3
* NO_VALUES_FOUND = 4
* OTHERS = 5
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
data lv_count type i.
delete lt_return where fieldname <> pfield.
sort lt_return by fieldval.
delete ADJACENT DUPLICATES FROM lt_return COMPARING fieldval.Hello Sim,
We will be exposing the Input parameters and Output lists of the SAP Search helps (simple search helps only) as input output of a Webservice.
So I need to understand how can we exploit the SAP Search Helps ?
What function modules can take these inputs as structures and can provide the output in form of a table ?
Regards,
Ravi -
How can u pass value in SAP Script?& where?
Hi,
PASSING TABLE VALUES AS AN ARGUMENT TO SAPSCRIPT:
In the line editor, specify the table field arguments enclosed by '&' symbol as follows:
/E ELEMENT
&KNA1-KUNNR& ,, &KNA1-NAME1& ,, &KNA1-LAND1&
Save -> Activate.
In the Print Program, specify following code:
TABLES KNA1.
CALL FUNCTION 'OPEN_FORM'
EXPORTING
FORM = 'ZSHABFORM1'
LANGUAGE = SY-LANGU.
SELECT * FROM KNA1.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'ELEMENT'
WINDOW = 'MAIN'.
ENDSELECT.
CALL FUNCTION 'CLOSE_FORM'.
Save -> Activate -> Execute.
Regards,
Priya. -
How to pass value from report to form?
Dear,
I built a report and I create button on report too. This
button will show a form that I want it to automatically show
receivable values from report so that user don't complete them.
So I create a button on the report . I enter Javascript in
PL/SQL Code tab in '...after displaying the footer' as follow :
htp.formOpen
(owa_util.get_owa_service_path||'portal30.wwa_app_module.link?
p_arg_names=_moduleid&p_arg_values=1736929105&p_arg_names=_show_h
eader&p_arg_values=YES&p_arg_names=GNO&p_arg_values=1&p_arg_names
=QNO&p_arg_values=2');
htp.formSubmit(null,'New Answer');
htp.formClose;
GNO , QNO is value which I want to pass
As you can see, the above code can pass only static value.
But I want to pass values that is the condition of this report.
I mean,such as, this report show data that gno=1 and qno=2 and I
want to pass these values to form. So both value will appear in
gno and qno field.
So please tell me what should I do. Please help me. I don't
know how to do it. I look forward to hearing from all of you.
Please!!!!!! Don't hesitate to answer.
Thank you very much
Sirin KittichotpanichHi Marc,
Yes, you have it correct in what I am trying to do and if I put a default value in the hidden item on page 2 and run it then that works fine. I just can't get the value from the form passed to page 2 for some reason. There are actually 22 items on the form that can be filtered but just using COREID for simplicity. When I run the form I am just entering a value in the COREID field to try and return those records. Most of the other items on the form are displayed as Popup LOV(fetches first row). Would the values of all these be done the same in a comma delimited list for the items and values? I was trying to get at least one of them working first. Here is the search result that comes up in the debug window:
Search Results
0.01: Item: P2_COREID HIDDEN
0.01: show report
0.02: determine column headings
0.02: parse query as: MOTEAMSAPEX
0.02: binding: ":P2_COREID"="P2_COREID" value=""
0.02: print column headings
0.02: rows loop: 15 row(s)
No data found.
Here is the SQL statement:
select coreid, serialnumber
from MOTEAMS.V_ASSETS where
instr(UPPER("COREID"), UPPER(:P2_COREID)) > 0
The branch settings are:
Set these items: P2_COREID
With these values: &P1_COREID (also tried this with period at the end)
I am new to this and not familiar with apex.oracle.com. How would I go about posting to that site?
Thanks,
Pam -
Apexers,
I need help with this modal popup, it works correctly but not passing values from page page1 to my page3. How do i pass these paramater values to page3,
function modalWin() {
if (window.showModalDialog) {
window.showModalDialog("f?p=&APP_ID.:3:&SESSION.:POP:NO::P3_EMPNO:#P1_CUSTOMER_ID#::","name","dialogWidth:600px;dialogHeight:400px");
else {
window.open("f?p=&APP_ID.:3:&SESSION.:POP:NO::P3_EMPNO:101","name","height=400,width=600,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no ,modal=yes");
thanks & regards.Hi,
try using this syntax
function modalWin() {
if (window.showModalDialog) {
window.showModalDialog("f?p=&APP_ID.:3:&SESSION.:POP:NO::P3_EMPNO:" + $v('P1_CUSTOMER_ID') + "::","name","dialogWidth:600px;dialogHeight:400px");
else {
window.open("f?p=&APP_ID.:3:&SESSION.:POP:NO::P3_EMPNO:101","name","height=400,width=600,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no ,modal=yes");
}regards,
Erik-jan -
Pass Value by Form Based on Procedure in Target Frame
I made a form based on procedure and trying to pass all variables to a target frame called "dest2". I got the sample code on this forum and used window.location, but then I figured it can't pass values to another frame. I tried window.open, but can't seem to figure out how to code it.
Basically on the page, it has the portal form using stored procedure, and a IFRAME named "dest2".
The detail my stored procedure is:
====================
Create or Replace Procedure WM.TEST
p_from_date IN VARCHAR2,
p_to_date IN VARCHAR2,
p_desformat IN VARCHAR2,
as
begin
htp.p('<script>');
htp.p('window.location="http://domain/portal/page?_pageid=1063,801014&_dad=portal&_schema=PORTAL&p_from_date='||p_from_date||'&p_to_date='||p_to_date||'&p_p_desformat='||p_desformat||'"');
htp.p('</script>');
end;
===============
Does anybody know how to modify this procedure to pass value to target frame = "dest2" ?
Thanks,
SalHi,
For documentation purpose, you can read Oracle9iAS Portal Bible -
they have a complete chapter on creating forms based on stored
procedure.
Hope this helps.
Regards,
Jatinder -
How to Pass values between one webdynpro application to another
Hi ,
I know How to Pass Values Between the Application by URL But For My Requirement NO need The Pass in URL Rather Than That Please any one TEll me How to GEt VAlues BEtween the application......
Thanks
ANANTH.If you dont want to pass values through URL, then you must have to use component Usage with interface node.
Or you can try like this,
by appending field value to url,
Data w_url type string,
w_value type string.
get the url of calling aplication
call method cl_Wd_utilities->construct_wd_url
exporting application name = name of second application( to which u want to pass parameter )
importing out_absolute_url = w_url.
***Make the value type compatible that has to passed with url.
w_string = lv_pernr
***Now attach the parameter and its value with url that have to passed to 2nd application
call method cl_http_Server=>append_field_url
exporting name = 'pernr'
value = ' w_value'
changing url = w_url.
then popup window for 2nd application with above url
lo_window = lo_window_manager->create_external_application ( url = w_url ).
lo_window -> open( ).
***now in wddoinit of 2nd application
data lv_param type string
lv_param = wdr_task=>client_window->get_parameter( ' pernr ').
Now you can use lv_param in 2nd application.
Regards
srinivas -
Pass values between different frames
Dear Friends from Adobe.
I need a lot of help from you.
I have a project with Flash Action Script 2.0 and would like
to know if you have to pass values between different frames.
Example:
Passing a value of a inputbox the frame 1 for a inputbox in
frame 2.
OBS: If possible could pass the solution through e-mail?
Now, very grateful.
Diogo Areas.Using AS2 you can either name the input textfield instance on
the stage or, you can name the variable property of the input
textfield. You can name either of these from the Property Inspector
window. Once named, you can then have access to the value of the
text that is entered. It will be either instanceName.text or
variableName.
The scope of either of these values lasts only as long as the
textfield instance exists. So, if the first textfield is in frame
7, for instance, and is only in frame 7, and you want to use the
value in another frame, say frame 20, then you'll have to store the
value outside of the textfield for later use. You can do this by
creating a variable in the first frame of the movie, and then
placing the text from the textfield in frame 7 into that variable.
Then at frame 20, you can retreive that value and use it in the
textfield in frame 20.
Alternately, you can continue the instance of the textfield
in frame 7 out through frame 20. The content will continue to be
available. You can add keyframes to the layer that the textfield is
in at frame 7, and move the object off the visible area of the
stage, so that it won't be seen, if you like. -
Hi, I am calling a Background job in my program. I am using JOB_OPEN, JOB_SUBMIT and JOB_CLOSE FM to start a job. My need is to pass a value to the job program(job program doesnt have any selection screen values). Is their any way without creating variants each time to pass value to it.
Please advice.....Hello,
You can first use JOB_OPEN which returns job number. Then build ranges or parameters to use SUBMIT to call the program.
Eg: SUBMIT RM06BB20 AND RETURN
WITH S_EKGRP IN R_EKGRP
WITH S_EKORG IN R_EKORG
WITH S_FLIEF IN R_FLIEF
WITH S_KONNR IN R_KONNR
USER sy-uname VIA JOB w_jobname
NUMBER w_job_number.
Now use JOB_CLOSE.
Thanks,
Venu
Maybe you are looking for
-
pls help..every time i connect to the internet while playing mp3's or just any applications or programs that produces sound and even when streaming some clips through the internet, my computer restarts..any sound that is produced when i am online it
-
How can I transfer movies from my PC to my new IPod ?
I got an IPod touch 4th generation as a Fathers Day present and I want to transfer a movie from my Lap top to my IPod. How can I do this ? Thank you
-
Tuple Record deleted in MDM does not reflect in ECC
Hello Experts, We have a scenario for central creation of Material master data in SAP MDM 7.1 and syndication to SAP ECC system. We are using tuples for Long text & Alternate unit of measure. The problem is as below: If we create a material with 1 or
-
Please HELP ME. Trim Enabler Corrupted my OS
Hi All, yesterday I made a big mistake. Following the Trim enabler developer page, in order to make the program to work, I used terminal in recovery mode to write this command lines: "Recovering from stop sign on boot screen For those who are stuck o
-
I would like to find out if there are any 3rd party (Free or for purchase) libraries which contain enhanced graphics objects. For example, I would like to find a robust strip chart capable of displaying multiple simultaneous (Time locked or common X