Passing values to JavaBean function using jsp scriplet

Hi,
I have a JavaBean funtion that is SaveData(parameters)
which save the values from HTML form.
Now i want a code for pass the values from HTML form to SaveData() function using jsp scriptlet.
I used the code
<jsp:useBean id="JDBC" class="bean.JDBCBean" scope="application"></jsp:useBean>
<%=JDBC.saveData(phonenumber,manufacturer,model,email,country,newsletter)%>
Here
JDBCBean -> Bean Name
phonenumber,manufacturer,model,email,country,newsletter ->HTML form's text values
But it didnt work properly.
Anyone help me to correct this.

Hi,
i have the same code like above
I have to pass the parameters with form name under the following code.
<jsp:useBean id="JDBC" class="bean.JDBCBean" scope="application"></jsp:useBean>
<%=JDBC.saveData(registration.phonenumber.value,id_type.value,id_style.value,registration.email.value,registration.scountry.value,player_type.values)%>
Here
registration -> HTML form name
But i got the error for
package registration does not exist
out.print(JDBC.saveData(registration.phonenumber.value,id_type.value,id_style.value,registration.email.value,registration.scountry.value,player_type.values));
How to i correct this?
Anyone help me......

Similar Messages

  • How to pass value from Javascript function to JSP ?

    hi,
    hello i have 2 jsp page and one external javascript page.
    from page 1.jsp
    i am calling a fuction named fun(1).and i am passing that value to external
    javascript page
    from external javascript.js
    i am getting this value in the fun(w) and sending this Page2.jsp like this
    var url = "page2.jsp?id ="+w;
    http.open("get","page2.jsp?id ="+w );
    and in page2.jsp
    i am getting that value like
    String k = request.getParameter("w");
    but this is showing error. how cloud i get that value on this page2.jsp ?
    plz any one help me to study this
    regards
    Vishnu Sankar S

    hello sir
    thank u very much..i got the output
    Message was edited by:
    vishnu_shankar

  • How to get the values of an Array using JSP Tags

    Hey guys,
    I need some help. I've splited a String using
    fn:split(String, delim) where String = "1,2,3,4" and delim is ,
    This method returns an Array of splited Strings. how do i get the values from this array using jsp tags. I don't wanna put java code to achive that.
    Any help would be highly appreciated
    Thanks

    The JSTL forEach tag.
    In fact if all you want to do is iterate over the comma separated list, the forEach tag supports that without having to use the split function.
    <c:set var="list" value="1,2,3,4"/>
    <c:forEach var="num" items="${list}">
      <c:out value="${num}"/>
    </c:forEach>The c:forTokens method will let you do this with delimiters other than a comma, but the forEach tag works well just with the comma-delimited string.

  • Passing values to a function

    Hi, i'm new to Coldfusion, and i'm a little confused in
    regards to passing parameters to a function using
    <cfinvokeargument>. My question is: Does the name of
    parameter in the cfinvokearguments have to be the same name as the
    cfargument name that you're passing the value to? Because that
    seems to go against the whole "black box" thing i was taught. And
    is there a way to pass the values without having to have to know
    the name of the variables in the function?

    If you are passing variables to the function then yes the
    names need to be the same. There are ways around this which goes to
    your second question about passing variables without knowing the
    name. (see
    http://livedocs.macromedia.com/coldfusion/7/htmldocs/wwhelp/wwhimpl/common/html/wwhelp.htm ?context=ColdFusion_Documentation&file=00001056.htm)
    As an example I have a document that I want to index and some
    indexes will be filled out by the user and some will not so how
    would I be able to tell which vars are passed to the
    function….So I would loop the Indexes assigned to the
    document and check to see if they were passed to the CFC doing
    something like this...
    EXAMPLE:
    <cfquery name="getDocIndexes_rs"
    ... this is a query to the get the document's indexes ....
    </cfquery>
    <cfloop query="getDocIndexes_rs">
    <!--- check the arguments scope to see if this index var
    exist --->
    <cfif
    isDefined("arguments.Index#getDocIndexes_rs.IndexID#")>
    <!--- if defined then get the value ---->
    <cfset IndexValue =
    arguments["Index"&getDocIndexes_rs.DMIndexID]>
    <!--- do something with indexvalue ....... ---->
    Ok that was probably a bit much so to simplify this here....
    When I sent the variables to the function I did not use the
    cfargument to specify the name(s) because I have no idea what they
    were at the time.
    As an example for yourself pass a variable to a function
    using the cfinvokeargument but do not use the cfargument tag. Then
    return the variable by doing this.
    <!---- THE CFC PAGE (named testreturn.cfc) --->
    <cfcomponent>
    <cffunction name="myFunction" access="public"
    returntype="string">
    <cfset myResult= arguments.testvar>
    <cfreturn myResult>
    </cffunction>
    </cfcomponent>
    <!---- THE CFM PAGE THAT CALLS THE CFC --->
    <cfinvoke component="YourPath.testreturn"
    method="myFunction" returnvariable="myResult">
    <cfinvokeargument name="testvar" value="HELLO">
    </cfinvoke>
    <cfoutput>#myResult#</cfoutput>
    Hope that wasn’t confusing enough for you...I am tired
    so that is my excuse and this is the best I can do at the moment.

  • Query in passing value to a function module

    Hi All ,
    I have a small query in the below code about the way i have passed value into a function module :
    CALL FUNCTION 'AUTHORITY_CHECK'
      EXPORTING
      USER                      = SY-UNAME
        OBJECT                    = 'E_INVOICE'
        FIELD1                    = 'BEGRU'
      VALUE1                    = ' '
       FIELD2                    = 'BUKRS'
       VALUE2                    = '$BUKRS'
       FIELD3                    = 'ISU_ACTIVT'
       VALUE3                    = '1,2,5,6'
       FIELD4                    = 'VKTYP_KK'
      VALUE4                    = ' '
    EXCEPTIONS
       USER_DONT_EXIST           = 1
       USER_IS_AUTHORIZED        = 2
       USER_NOT_AUTHORIZED       = 3
       USER_IS_LOCKED            = 4
       OTHERS                    = 5
    IF SY-SUBRC <> 0.
    MESSAGE 'User doesnt have sufficient authorizations' TYPE 'E'.
    EXIT.
    The query is on the field  VALUE3                    = '1,2,5,6' , is the format correct. If this is not right could someone please suggest the correct approach.
    thanks

    Hi Balaji,
    as that is parameter you can use at a time only one value..
    if you check in that FM we have other parameters VALUE1 to VALUE10..
    why don't you use those...
    Thanks!

  • EMAIL FUNCTION USING JSP

    HOW CAN I WRITE A EMAIL FUNCTION USING JSP
    WHICH HAVE FORWARD, REPLY, REPLAY ALL, AND ADDRESS BOOK LIKE YAHOO EMAIL FUNCTION
    HOW CAN I WRITE IT?

    I meant you would face a considerable challenge trying to write
    public static void main(String[] arg) { } with your Caps-Lock key stuck.
    You would not even be able to escape your way out of it with
    \u0070\u0075\u0062\u006C\u0069\u0063 \u0073\u0074\u0061\u0074\u0069\u0063 \u0076\u006F\u0069\u0064 \u006D\u0061\u0069\u006E(S\u0074\u0072\u0069\u006E\u0067[] \u0061\u0072\u0067) { } as the "\u" escape sequence also contains a lowercase character.

  • Significance of pass value checkbox in function module

    Hi all,
    Here is a confusion.....While creating a custom function module,i have checked the update module or RFC call radio button going to its attributes.But in the importing parameter if i pass a structure,it is giving a syntax error.It is only allowing table parameter.But if i check the pass value checkbox,it is not givng any syntax error if i pass any structure in the importing parameter.Can anybody please explain me the significance of pass value checkbox?
    Thanks in advance.......

    Hi,
    Function modules are cross-program, reusable procedures that are organized into function groups, and whose functions are implemented between the statements FUNCTION and ENDFUNCTION. Function modules and their interfaces are created in the Function Builder.
    Function Module Interfaces
    The parameter interface of a function module is defined in the Function Builder. It includes the definition of interface parameters and the specification of exceptions that can be triggered by a function module. The Function Builder automatically generates comment lines below the FUNCTION statement in the source code of the function module, which represent the interface of the function module with the following syntax:
    Syntax
    ... [IMPORTING parameters]
    [EXPORTING parameters]
    [CHANGING parameters]
    [TABLES table_parameters]
    [{RAISING|EXCEPTIONS} exc1 exc2 ...]
    The syntax and semantics of IMPORTING, EXPORTING, CHANGING, RAISING, and EXCEPTIONS mainly correspond to the definition of method interfaces with [CLASS-]METHODS. The additional option of defining table parameters using TABLES is obsolete.
    Interface parameters
    The interface parameters are defined on the relevant tab pages in the Function Builder.
    IMPORTING parameters are input parameters. When the function module is called, a suitable actual parameter must be specified for every non-optional input parameter. The content of the actual parameter is passed to the input parameter when the call is made. The content of an input parameter for which 'pass by reference' is defined cannot be changed in the function module.
    EXPORTING parameters are output parameters. When the function module is called, a suitable actual parameter can be specified for every output parameter. The content of an output parameter that is defined for <b>'pass by value'</b> is transferred to the actual parameter if the function module is completed without errors. An output parameter that is defined for pass by reference is not initialized when the function module is called.
    CHANGING parameters are input and output parameters. When the function module is called, a suitable actual parameter must be specified for every non-optional input or output parameter. When the function module is called, the content of the actual parameter is passed to the input/output parameter, and when the function module is completed, the content of the input/output parameter is passed to the actual parameter.
    TABLES parameters are table parameters. Table parameters are obsolete CHANGING parameters that are typed as standard tables with a header line. If an internal table without a header line or a table body is passed as an actual parameter to a formal parameter of this type, an empty local header line is generated in the function module. If an internal table with a header line is used as an actual parameter, both the table body and the header line are passed to the function module. Pass by value is not possible in formal parameters defined using TABLES. Formal parameters defined with TABLES can be replaced by formal parameters defined with CHANGING. A local work area can be created for the internal table in the function module by using the addition LIKE LINE OF itab of the DATA statement.
    Exceptions
    The exception of a function module are defined on the Exceptions tab page in the Function Builder. Here you can select exception classes to define whether class-based exceptions are declared or non-class-based exception are defined. Class-based exceptions are represented in the above syntax by RAISING, and non-class-based exceptions are represented by EXCEPTIONS.
    The addition RAISING is used to declare class-based exceptions that can be propagated from the function module to the caller. Exceptions in the categories CX_STATIC_CHECK and CX_DYNAMIC_CHECK must be explicitly declared, otherwise a propagation can lead to an interface violation. A violation of the interface leads to the treatable exception CX_SY_NO_HANDLER. Exceptions of the category CX_NO_CHECK are implicitly always declared. The declaration of exceptions of the category CX_STATIC_CHECK is statically checked in the syntax check. For exceptions of the category CX_DYNAMIC_CHECK, the check is not performed until runtime. In a function module in which class-based exceptions are declared with the RAISING addition, the statement CATCH SYSTEM-EXCEPTIONS cannot be used. Instead, the relevant treatable exceptions should be handled in a TRY control structure.
    The addition EXCEPTIONS is used to define a list of non-class-based exceptions that can be triggered in the function module using the statements RAISE or MESSAGE RAISING. Exceptions defined in this way - as with formal parameters - are bound to the function module and cannot be propagated. If an exception of this type is triggered in a function module, and no return value has been assigned to it with the homonymous addition EXCEPTIONS of the CALL FUNCTION statement when the call was made, this leads to a runtime error.
    Note
    For new developments after release 6.10, SAP recommends that you work with class-based exceptions that are independent of the function module.
    RFC is a technology which is used to access a functions (Modules) from
    the remote systems.
    If a function module is set as remote enabled which can be access from
    the remote system via RFC.Eg: U can access the Remote enabled function modules in ur VB,Webdynpro,Java,Visual composer program.
    A function module can be set as remote enabled by SE37->Go to ur FM->click the option Button "remote enabled".
    But Normal function modules can not accessd from the remote system.
    Good Example for RFC enabled function module is : BAPI(Business Application Programming Interface)
    Note: All BAPIs are Remote enabled but not all remote enabled function modules are BAPI.
    CALLING A FUNCTION MODULE:
    1)In U ABAP Editor --> Click "Patter" ---> Selection Option Button "Call Function"
    --> Write the Corresponding FM name --> Hit Enter
    2)The appropriate import ,export Parameters will be displayed in ur editor
    3)Pass the Values Here.
    Also check these links.
    http://www.geocities.com/victorav15/sapr3/abapfun.html
    Check this link:
    http://help.sap.com/saphelp_erp2004/helpdata/en/9f/db988735c111d1829f0000e829fbfe/content.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/ef/d94b78ebf811d295b100a0c94260a5/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/43/41341147041806e10000000a1553f6/frameset.htm
    Check this link:
    http://help.sap.com/saphelp_erp2004/helpdata/en/9f/db988735c111d1829f0000e829fbfe/content.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/ef/d94b78ebf811d295b100a0c94260a5/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/43/41341147041806e10000000a1553f6/frameset.htm
    See the following links:
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/9f/db970e35c111d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/9f/db970e35c111d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/9f/db970e35c111d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/9f/db970e35c111d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/9f/db970e35c111d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/26/64f623fa8911d386e70000e82011b8/content.htm
    Regards,
    Srilatha.

  • Using JSP scriplets in the JSF tags

    Hi,
    I haven't done that much JSP development using various tag libraries prior to looking at JSF, hence this very basic question:
    I am declaring and manipulating Java variables in my JSP. Is there a way to access those in my JSF tags? It seems that something like:
    <%
    String myString="MyLabel";
    %>
    <h:view>
    <h:outputText id="myID" value="<%=myString%>" />
    </h:view>
    blows up in the JSF processor.
    I am porting some stuff to JSF and hence do not use backing beans in all cases.
    Any suggestions/ideas/pointers are greatly appreciated.
    Thanks in advance,
    Vadim.

    JSF action element attributes take JSF EL expressions, not Java expressions. A JSF EL expression has access to objects in one of request, session or application scope only, not to scripting variables. One way to get your example to work is by putting the String in one of these scopes within the scriptlet, e.g.:
    <%
      String myString="MyLabel";
      request.setAttribute("myString", myString);
    %>
    <h:view>
      <h:outputText id="myID" value="#{myString}" />
    </h:view>But, if you're porting a JSP-based application to JSF, I strongly recommend that you move all scriptlet code into beans; otherwise it's kind of pointless to migrate to JSF. The strength of JSF is its separation of UI layout and application logic.
    Even though JSP happens to be one way to wire up a JSF view with JSF components, JSF has very little to do with JSP. You need to understand the basic JSF component model, event-driven development, and use JavaBeans to really gain any benefits. Don't be fooled into believing that JSF is "just a new JSP tag library" by the support for JSP as the default presentation layer; it's far more than that, and I personally believe that using JSP as the presentation layer makes using JSF a lot harder than it should be. In fact, most of the issues posted in this forum are issues with the JSP layer, not with the core JSF components or the infrastructure classes.
    Hans Bergsten (EG member)

  • How to pass values from one function to another

    Hi,
    I am a middle school teacher and a newbie in Flash Actionscript. I am trying to create a countdown timer for use in my class during tests. The start and pause functions work as required, but not the pause button. When I click on the pause button, the timer is reset to 0:00:00. Please help. Here is the code I had written so far:
    var Subject1timeLeftHr;
    var Subject1timeLeftMin;
    var Subject1timeLeftSec;
    Subject1start_btn._visible = true;
    Subject1pause_btn._visible = false;
    Subject1rotor_mc.gotoAndStop(1);
    Subject1rotor_mc._visible = false;
    Subject1durationHr_txt.text = "0";
    Subject1durationMin_txt.text = "00";
    Subject1durationSec_txt.text = "00";
    Selection.setFocus(Subject1durationHr_txt);
    function SubjectdurationHr(SubjectxdurationHr_txt, SubjectxdurationMin_txt)
    if (SubjectxdurationHr_txt.length == 1)
    Selection.setFocus(SubjectxdurationMin_txt);
    function SubjectdurationMin(SubjectxdurationMin_txt, SubjectxdurationSec_txt)
    if (SubjectxdurationMin_txt.length == 2)
    Selection.setFocus(SubjectxdurationSec_txt);
    function SubjectdurationSec(SubjectxdurationSec_txt, SubjectxdurationHr_txt)
    if (SubjectxdurationSec_txt.length == 2)
    Selection.setFocus(SubjectxdurationHr_txt);
    Subject1durationHr_txt.onChanged = function()
    SubjectdurationHr(Subject1durationHr_txt,Subject1durationMin_txt);
    Subject1durationMin_txt.onChanged = function()
    SubjectdurationMin(Subject1durationMin_txt,Subject1durationSec_txt);
    Subject1durationSec_txt.onChanged = function()
    SubjectdurationSec(Subject1durationSec_txt,Subject1durationHr_txt);
    function startcountdown(SubjectxdurationLeft, SubjectxdurationHr, SubjectxdurationHr_txt, SubjectxdurationMin, SubjectxdurationMin_txt, SubjectxdurationSec, SubjectxdurationSec_txt, Subjectxduration, SubjectxstartTime, SubjectxendTime, Subjectxtimer_mc, Subjectxpause_btn, Subjectxstart_btn, Subjectxrotor_mc, SubjectxtimeLeft, SubjectxtimeLeftHr, SubjectxtimeLeftMin, SubjectxtimeLeftSec, SubjectxtimeLeftHr_txt, SubjectxtimeLeftMin_txt, SubjectxtimeLeftSec_txt)
    delete SubjectxdurationLeft;
    delete SubjectxdurationHr;
    delete SubjectxdurationMin;
    delete SubjectxdurationSec;
    delete Subjectxduration;
    delete SubjectxdurationHr_txt.text;
    delete SubjectxdurationMin_txt.text;
    delete SubjectxdurationSec_txt.text;
    SubjectxstartTime = getTimer();
    Subjectxtimer_mc.onEnterFrame = function()
    if (SubjectxdurationHr_txt.text == Nan || SubjectxdurationMin_txt.text == Nan || SubjectxdurationSec_txt.text == Nan)
    else
    SubjectxdurationHr = 60 * 60 * 1000 * Number(SubjectxdurationHr_txt.text);
    SubjectxdurationMin = 60 * 1000 * Number(SubjectxdurationMin_txt.text);
    SubjectxdurationSec = 1000 * Number(SubjectxdurationSec_txt.text);
    Subjectxduration = SubjectxdurationHr + SubjectxdurationMin + SubjectxdurationSec;
    SubjectxendTime = SubjectxstartTime + Subjectxduration;
    SubjectxdurationLeft = SubjectxendTime - getTimer();
    if (SubjectxdurationLeft > 0)
    SubjectxdurationHr_txt._visible = false;
    SubjectxdurationMin_txt._visible = false;
    SubjectxdurationSec_txt._visible = false;
    Subjectxpause_btn._visible = true;
    Subjectxstart_btn._visible = false;
    Subjectxrotor_mc._visible = true;
    Subjectxrotor_mc.play();
    SubjectxtimeLeft = SubjectxdurationLeft / (1000 * 60 * 60);
    SubjectxtimeLeftHr = Math.floor(SubjectxtimeLeft);
    SubjectxtimeLeftMin = Math.floor((SubjectxtimeLeft - SubjectxtimeLeftHr) * 60);
    SubjectxtimeLeftSec = Math.floor(((SubjectxtimeLeft - SubjectxtimeLeftHr) * 60 - SubjectxtimeLeftMin) * 60);
    SubjectxtimeLeftHr_txt.text = String(SubjectxtimeLeftHr);
    if (SubjectxtimeLeftHr_txt.length < 1)
    SubjectxtimeLeftHr_txt.text = "0" + SubjectxtimeLeftHr_txt.text;
    SubjectxtimeLeftMin_txt.text = String(SubjectxtimeLeftMin);
    if (SubjectxtimeLeftMin_txt.length < 2)
    SubjectxtimeLeftMin_txt.text = "0" + SubjectxtimeLeftMin_txt.text;
    SubjectxtimeLeftSec_txt.text = String(SubjectxtimeLeftSec);
    if (SubjectxtimeLeftSec_txt.length < 2)
    SubjectxtimeLeftSec_txt.text = "0" + SubjectxtimeLeftSec_txt.text;
    else
    delete Subjectxtimer_mc.onEnterFrame;
    SubjectxtimeLeftHr_txt.text = "";
    SubjectxtimeLeftMin_txt.text = "";
    SubjectxtimeLeftSec_txt.text = "";
    SubjectxdurationHr_txt._visible = true;
    SubjectxdurationMin_txt._visible = true;
    SubjectxdurationSec_txt._visible = true;
    Subjectxrotor_mc.gotoAndStop(1);
    Subjectxrotor_mc._visible = false;
    SubjectxdurationHr_txt.text = "0";
    SubjectxdurationMin_txt.text = "00";
    SubjectxdurationSec_txt.text = "00";
    Subjectxpause_btn._visible = false;
    Subjectxstart_btn._visible = true;
    Selection.setFocus(SubjectxdurationHr_txt);
    function pausecountdown(SubjectxdurationHr_txt, SubjectxtimeLeftHr, SubjectxdurationMin_txt, SubjectxtimeLeftMin, SubjectxdurationSec_txt, SubjectxtimeLeftSec, Subjectxstart_btn, Subjectxpause_btn, Subjectxrotor_mc)
    delete Subjectxtimer_mc.onEnterFrame;
    SubjectxdurationHr_txt.text = String(SubjectxtimeLeftHr);
    SubjectxdurationMin_txt.text = String(SubjectxtimeLeftMin);
    SubjectxdurationSec_txt.text = String(SubjectxtimeLeftSec);
    Subjectxstart_btn._visible = true;
    Subjectxpause_btn._visible = false;
    Subjectxrotor_mc.stop();
    Subject1pause_btn.onRelease = function()
    pausecountdown(Subject1durationHr_txt,Subject1timeLeftHr,Subject1durationMin_txt,Subject1t imeLeftMin,Subject1durationSec_txt,Subject1timeLeftSec,Subject1start_btn,Subject1pause_btn ,Subject1rotor_mc);
    Subject1start_btn.onRelease = function()
    startcountdown(Subject1durationLeft,Subject1durationHr,Subject1durationHr_txt,Subject1dura tionMin,Subject1durationMin_txt,Subject1durationSec,Subject1durationSec_txt,Subject1durati on,Subject1startTime,Subject1endTime,Subject1timer_mc,Subject1pause_btn,Subject1start_btn, Subject1rotor_mc,Subject1timeLeft,Subject1timeLeftHr,Subject1timeLeftMin,Subject1timeLeftS ec,Subject1timeLeftHr_txt,Subject1timeLeftMin_txt,Subject1timeLeftSec_txt);
    Subject1cancel_btn.onRelease = function()
    Subject1timeLeftHr_txt.text = "";
    Subject1timeLeftMin_txt.text = "";
    Subject1timeLeftSec_txt.text = "";
    Subject1durationHr_txt._visible = true;
    Subject1durationMin_txt._visible = true;
    Subject1durationSec_txt._visible = true;
    Subject1durationHr_txt.text = "0";
    Subject1durationMin_txt.text = "00";
    Subject1durationSec_txt.text = "00";
    Subject1timeLeftHr_txt._visible = true;
    Subject1timeLeftMin_txt._visible = true;
    Subject1timeLeftSec_txt._visible = true;
    Subject1pause_btn._visible = false;
    Subject1start_btn._visible = true;
    Subject1rotor_mc._visible = false;
    Subject1rotor_mc.gotoAndStop(1);
    delete Subject1timer_mc.onEnterFrame;
    delete Subject1durationLeft;
    delete Subject1duration;
    delete Subject1durationHr_txt.text;
    delete Subject1durationMin_txt.text;
    delete Subject1durationSec_txt.text;

    I think you need to spend some time reducing your code to practical levels.  You seem to be passing everything in the book to every function and I would guess that probably none of it is necessary.  If you declared those variables at the beginning, then you don't need to pass them into any function because they are gobally available to any of the code/functions that follows them.  Similarly, if you have textfields on the stage, you do not need to pass those into any functions for the same reason.
    I see you making overuse of "delete" (and possibly errant use as well).  Probably the only thing you might want/need to use is...
    delete Subjectxtimer_mc.onEnterFrame;
    Which stops the enterframe activity from firing off, which I will guess is being used to update the textfields that indicate the time.
    And that conditional that uses == Nan isn't likely to do anything except wonder what an Nan is.  Textfields hold strings, which are quoted.  SO unless you have a variable named Nan somewhere that has a String value assigned to it, that conditional won't be doing anything for you.  You probably won't need it at all if you get this working properly.

  • Passing value from javascript function to servlet

    Hello everybody,
    i need to pass parameter from javascript function to servlet.
    what i wrote is :
    function callPopulateServlet(t)
    var h =document.NewRequest.services;
    var y = t.selectedIndex;
    alert(h.options[y].value);
    var id=h.options[y].value;
    <%session.setAttribute("id",id);%> // am getting error at this point
    document.NewRequest.submit();
    with this id am quering values from database through servlet.
    any body knows plz help me.
    thanks,
    anil.

    this is the error am getting
    Stacktrace:
         org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:85)
         org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
         org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:435)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:298)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:277)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:265)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:299)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

  • Pass Values between two Function Modules RFC in Portal

    I need to pass values ​​between 2 FM RFC.
    I have an implicit enhancement in HRMSS_RFC_EP_READ_GENERALDATA RFC function module.
    PERNR LIKE  PSKEY-PERNR
    ENHANCEMENT 1  Z_ESS_EXPORT_PERNR.    "active version
      EXPORT pernr to memory id 'PMK'.
      set parameter id 'PMK' field pernr.
    ENDENHANCEMENT.
    On the other hand an RFC function module that has the code:
            pmk    LIKE PSKEY-PERNR,
            pmk_2  LIKE PSKEY-PERNR.
      get parameter id 'PMK' field pmk.
      IMPORT pmk_2 FROM MEMORY ID 'PMK'.
    When the execution is done in development environment, the modules function at the level of R3, the "get parameter id" works only if the debbuger is classic, otherwise not work. The Import to memory id never works.
    In the environment of quality, r3 do not work any of the 2 sentences. If run from portal (which is as it should be) does not work.
    Thanks if anyone can help me get the problem. Both function modules are executed at the portal.
    Regards
    Edited by: Daynet1840 on Feb 15, 2012 2:02 AM

    When the execution is directly in r3, in development environment or quality, does the set / get parameter id. Export / Import memory id not work.
    But if the FM are called from the portal, does not the set / get parameter id.
    I tried changing the sentence as I indicated harishkumar.dy still not working.
    Madhu: They're in different function groups, one is standard and the other not.
    Regards
    Edited by: Daynet1840 on Feb 15, 2012 3:08 PM
    Edited by: Daynet1840 on Feb 15, 2012 3:11 PM

  • How to write printing function using JSP?

    dear all,
    i want to add a printing function in my project but i do not know how to do it? could anyone teach me how to do it?
    thanks
    eric

    salut eric,
    you can do it this way :
    1 - create a html link in your code to this javascript
    function : (I am using Struts, but you can write it in
    pure html
    <html:link href="#bodyStart"
    onclick="openWindowForPrinting()"
    titleKey="msg.status.print">      <bean:message
    key='app.print' />
    <script language="JavaScript">
    <!--
    window.open = SymRealWinOpen;
    //-->
    </script>
    </html:link>
    >
    >
    2 - here is the javascript function : it open a window
    with the "print.jsp" page.
    function openWindowForPrinting(){
    window.open('/your_project/pages/common/print.jsp','',
    'left=150, top=150 , status=no, directories=no,
    toolbar=no, menubar=yes, location=no, scrollbars=yes,
    resizable=yes, dependant=yes');
    3 : here is the print.jsp page : You have only to
    create a session variable called
    "currentBodyRelativeLocation", which content the
    relative URL to the page you want to print (for
    example, the boby of the current page).
    <%@ taglib uri='/WEB-INF/tlds/perso.tld'
    prefix='perso' %>
    <html>
    <head>
    <perso:csslink page='${cssRelativeLocation}' />
    </head>
    <body onload="var SymTmpWinOpen = window.open; window.open = SymWinOpen; printPage();; window.open = SymTmpWinOpen;">
    <body>
    <jsp:include page="${currentBodyRelativeLocation}"/>
    </body>
    <script language="JavaScript">
    <!--
    window.open = SymRealWinOpen;
    //-->
    </script>
    </html>
    <script language='javascript'>
    function printPage(){
    window.print();
    window.close();
    </script>
    hai,
    i'm not very understand how is your code work. when i write html code, do i need to mind about this code: "msg.status.print" ? what is this code mean?
    i have too much question on this thing. would you mind to be further explain to me? or is it any reference for me to refer? i'm really new to write printing function on JSP.
    i never write this function before. i'm feel so lost.....:(
    thanks again
    eric

  • Pass values to formulas runtime using cr4e

    I need urgently to find a way for passing a value to formula runtime using cr 4 eclipse.
    Hope this is implemented in some way.

    <p>You should be able to use the FormulaField&#39;s setText() method to pass a formula (which evaluates to some value) at runtime.  Take a look at the <a href="http://devlibrary.businessobjects.com/BusinessObjectsXIR2SP2/en/en/JRC_SDK/jrc_java_api_doc/doc/jrcsdk_java_apiRef/index.html" target="_blank">JRC API Reference</a> on the DevLibrary for details.</p><p>-MJ</p>

  • How To pass the value within the page using jsp?

    How to passing the textbox value within the jsp page without using javascript or reload the page.
    I have a scenario like this:
    I have a textbox named as "accno" which allow user to key in the accno. After key in the accno, this accno value will used to do a query from database using jstl.
    here is part of my code
    <input name="accno" type="text" onChange="checkLC()"/>
    <sql:query var="results" dataSource="${db}">
    select accno,name from account where accno = '<%=value get from accno textbox%>'          
    </sql:query>
    <c:out value="${result.rows[0].name}"/>
    note that onChange() is the javascript when user key in accno then automatically go to check database then only show out the name. So how can i get the '<%=value get from accno textbox%>' from accno textbox.

    How to passing the textbox value within the jsp page
    without using javascript or reload the page.No, jsp executes on the remoter server, the text box is on a client machine, you need to send information to the server over the network, http does this with a request, which will reload the page.....................

  • How to pass value from Javascript function to a Java class method

    Hi All,
    I want to pass a value, which I catch in a Javascript function to a method in a Java class. I have tried many combinations but it gives me error.
    This is the way I am doing
    function assignBill() {
    proj = projPh.substring(0,indSlash);
    <% myproject.getProj(" project_cd = '" + proj + "'");%>
    proj is the variable which I want to pass to getProj methods.
    If any one has done this, please let me know. Thanks for your help.
    Ritesh Mehta

    The only way to receive something from clients page is to submit it somehow: through a form or link, but the info has to make it back to the server obviously. I dont know how your app works, but you can use the the javascript -location.href- function(i think) to submit the var to the server and process it there.

Maybe you are looking for

  • Automatic Po creation from shopping cart

    Dear All, I found that this issue has been discussed many time, but all the messages are talking about split criteria. When I create a shopping cart with mulitple items (all the items are just copy of first item...... no question of split criteria) a

  • Is your Zen Touch froz

    Does it hang at the "Zen Touch" screen? Is it not accesible whatsoever?Okay here's the thing. A lot of people are having this problem, even I had it. So this is what you need to do: First off, try running a cleanup of your Zen. To run the cleanup you

  • Using snow leopard on external hard drive w/Mountain Lion OS Mac

    I need to use Snow Leopard in order to use some expensive software that will not work in Lion or Mountain Lion. All of our computers have been upgraded to Mountain Lion, whcih doesn't support Rosetta. I was able to install Snow Leopard on an external

  • How to use iPhoto in screen saver under maverick os

    With the Lion or Leopard O/S i am able to use my pictures directly from  iPhoto as screensavers.  However after upgrade to Maverick, it is now impossible to select iPhoto events as a source for any of the screensavers! any ideas, please help!

  • Forum question: How to set Show All Messages as default?

    I seem to remember there was a way to set this as a default, so that when one clicks on a topic, all new (unread) posts are shown. Currently, I only see a subset of the new postings, and I have to click on "Show All Messages" to see them all. The num