How to pass expression to .js file

Hello Techies,
I am trying to an expression to java script function.
Here is my code
<script language="javascript">
    <!--
     document.write('<script type="text/javascript" language="javascript" src="<%=Context%>/htmls/js/Set.js">');
    //-->
    </script>
  onClick="JavaScript:doSubmit('<%= sss %>')"In set.js file I had written the code like the following
function doSubmit(requestType) {
       alert(document.xxxForm.<%=xyz%>.value);
          I had placed this set .js file in separate folder named as JS.
I had placed the .jsp files in one folder named as jsp.
How to call the doSubmit() in the set.js file from the jsp file.
Thanks,
Krishna

What i am trying is I am having a combo box in which any item is selected and clicked add button the request must send to the server else we will get one alert msg that "Plz check the evalution".
<script language="javascript">
    <!--
     document.write('<script type="text/javascript" language="javascript" src="<%=Context%>/htmls/js/set.js">');
    //-->
    </script>
   some code
<input
                        type="button"
                        name="submitButton"
                        value="Save"
                        onClick="JavaScript:doSubmit('<%= Request.add %>')"
                    />The set.js file is
var current = location.toString();
var noProtocol = current.split('//')[1];
var context = noProtocol.split('/')[1];
function doSubmit(requestType) {
  alter("inside doSubmit");
var evalutionValue =   document.setForm.<%=request.EVALUATION%>.value;
      if( evalutionValue == '' || evalutionValue == null)
            alert("plz select the Evalution ");
            return false;
     document.forms["setForm"].elements["<%= request.REQUEST_TYPE %>"].value = requestType;
            document.forms["ruleSetForm"].submit();
        }How can I do this one

Similar Messages

  • How to pass parameters to configuration files

    Hello,
    I have an application which uses several libraries and frameworks like log4j and hibernate.
    Each library/framework is configured via its own configuration file, some configuration files are in xml format and others are in properties format.
    Each configuration file has lots of specialized parameters that should not be exposed to the user but there are also one or two parameters that must be configured by the end user.
    For example:
    The log4j configuration file has lots of specialized parameters that the user should not see, but there is one parameter that the user must configure: the path for the application log file.
    Another example:
    The hibernate configuration file has lots of specialized parameters that the user should not see, but there is one parameter that the user musr configure: the path to the application database.
    It would be great if we can have an user-configuration-file that contains only the parameters that should be configured by the user and leave the complicated and specialized parameters in their corresponding files.
    I want to pass the properties defined in the user-configuration-file to the specialized configuration files.
    Any ideas to achieve this?
    Thanx

    Thank you very much to all for the replies.
    Ok, I can read the specialized-configuration-file into a Properties object, then read the user-configuration-file and merge the appropriate properties to get a complete Properties object.
    If the library/framework can't be configured with the Properties object, then I will need to write down the properties into a new file and tell the library/framework to load that file.
    I have used Properties objects and files before, but I don't have experience with xml configuration files.
    Is the same applicable to xml files?
    How can I load a XML files to an object and then update/add a particular property?.
    If that's possible, then: how can I write down the XML object to a new file?
    thanx
    Edited by: JoseLuis on Oct 23, 2008 11:28 AM

  • How to pass arguments to .sql file.......

    Hello,
    I want to pass arguments to .sql file which is being called from within a shell (.sh).
    suppose this is the line in shell -
    ${ORACLE_HOME}/bin/sqlplus -s abcuser/abcuser@abc < ${ABCDB_DIR}/A.sql $val >>${LOG}
    - now I want to pass '123456' to A.sql
    Please suggest how to do that.
    Thanks and regards,

    You can pass parameters to a shell script executing sql commands just like you would any other shell script.
    I have a script called test_os_variables.sh:
    sqlplus -s "/ as sysdba" << EOF
    select '$1' from dual;
    EOF
    Now I execute my script passing SHAWN as a parameter.
    ./test_os_variables.sh SHAWN
    SQL*Plus: Release 10.2.0.2.0 - Production on Tue Jan 9 08:09:46 2007
    Copyright (c) 1982, 2005, Oracle. All Rights Reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
    SQL>
    'SHAW
    SHAWN

  • How to pass csv data from file into DLL using TestStand

    Hi,
    We have data files which are of CSV format. Each row contains
    about 9 items of data, and have about 5 rows of this data (ie, 5
    test points) :
    eg
    TErrAdd1,UUT,UUT,STM1E,AU4/FR,PRBS23,BIT,10,60
    TErrAdd2,UUT,UUT,STM4O,AU3/UNFR,PRBS15,B1,20,60
    TErrAdd3,UUT,UUT,STM16O,AU4_16C/UNFR,PRBS9,BIT,7,60
    TErrAdd4,UUT,UUT,STM0E,AU3/UNFR,PRBS20,B2,5,60
    TErrAdd5,UUT,UUT,STM64O,AU4_4C/FR,PRBS11,B1,6,60
    What we want to do is to be able to directly pass each
    row of data to a C/C++ DLL. The DLL fn accepts this
    data as a vector of strings.
    eg.
    void DLLTestFn( vector const & configData )
    However, we can write a wrapper for the DLL as I don't
    think TestStand will know about vectors.
    We don't really want to have to hardcode individial references
    to each item of data in TestStand. Is this possible?
    Just read in a row from a data file, and sent it direct
    to the DLL?

    Hi Richardi,
    the principle is quite simple, however, you still need to use a programming language to make the initial file read.
    Once you've done this, you could have it as an array of strings, and pass this directly to a wrapper DLL, which would then pass the data into a string vector.
    Look up the examples\AccessingArrays\PassingArrayParametersToDll\AccessingArrays.seq
    to see how to do this without passing the sequence context.
    If you've read in the details into a container type structure already, then I've made an example which demonstrates this principle and what you'll need to pass it to a vector. (Similar principle can be used to fill in the container when you read the file in the first place.
    You cannot go directly to a vector, since TestStand doesn't understand them.
    Vector classes are difficult to export polymorphically from a DLL since the template class doesn't export, and needs specifically defining. This is what I'm assuming you're ultimately trying to do. (see ref :
    How to Export STL components inside and outside of a class
    I've used VIsual C++ 6 and TestStand 3.0
    Please let me know if this helps to answer your query.
    Thanks
    Sacha Emery
    National Instruments (UK)
    // it takes almost no time to rate an answer
    Attachments:
    for hannah vectors.zip ‏1619 KB

  • How to pass strings when downloading file

    Hi,
    I have a requirement to pass the below mentioned two string at the start of the file when download.
    wf_firstline =  '$$ADD ID=HTAUSRF1 BID=FKI4990016797'.
    wf_secondline = '*03000820000049900167970'.
    pls.provide me pointers how can this be done.
    Thanks.

    if it is a presentation file download,you have to append the data into the table before the data is filled
    and if it is in App.server download,you have to wcan write the strings before transferring the actual data.

  • How to pass argument in manifest file

    Hi,
    I want to pass argument to main class in jar. Is there any option in manifest file.

    Hmm..
    Seems that my sentence above isn't so correct.
    It possible to add custom attribute: value pairs into manifest file and
    read it later from Java class.
    Here is code sample:
    public class ManifestTest {
        public static void main(String[] args) {
            try {
                java.util.jar.JarFile jar = new java.util.jar.JarFile(System.getProperty("java.class.path"));
                for (java.util.Iterator it = jar.getManifest().getMainAttributes().keySet().iterator();it.hasNext();) {
                    Object curKey = it.next();
                    System.out.println("key: " + curKey + ", value: " + jar.getManifest().getMainAttributes().get(curKey));
            } catch (Throwable t) {
                System.out.println("exception occured: " + t);
    }

  • How to pass Variable value to SWF file in Eclipse development

    We are creating Widget file in Eclipse by using SAP Widget Foundation .
    We included one SWF file in Widget & it is working fine.
    But we are not able to pass the values to SWF file variables.?
    How to pass variables to SWF file let us know.
    Thanks & regards

    We are creating Widget file in Eclipse by using SAP Widget Foundation .
    We included one SWF file in Widget & it is working fine.
    But we are not able to pass the values to SWF file variables.?
    How to pass variables to SWF file let us know.
    Thanks & regards

  • How to pass values at runtime in JDBC - XI - File scenario

    Hi friends,
    In my scenario, data is coming from R/3 and i need to filter records from oracle database based on this data. There are 4 database tables that need to be queried using 2 select statements. The resultset after the execution of query will be mapped to the target flat file structure.
    here are my queries:
    1) Can I avoid BPM as data needs to be collected from the two database calls which involves two sender JDBC adapter instances with only one target structure?
    2) Can I use stored procedure in this scenario? If yes, than how to pass values to stored procedure at runtime via sender JDBC adapter.
    Thanks and regards,
    Nitin aggarwal.

    Hi Nitin,
    "..So i want to know if i can write multiple select statements in the stored procedure.."
    Read the below line that is mentioned in the SAP help documentation fro Sender JDBC adapter:-
    <i>Specify an SQL EXECUTE statement to execute a stored procedure, which contains exactly one SELECT statement.</i>
    I dont think it can be achieved...but there must be some workaround for this. You can probably use a join statement.
    Read this, again from the documentation:-
    <i>The expression must correspond to the SQL variant supported by the relevant JDBC driver. It can also contain table JOINs.</i>
    Regards,
    Sushumna

  • How to pass file name as parameter into url: or fo:external-graphic src

    Hello gurus,
    In my rtf I want to dynamically get the name of the image file and display the image in the report. If use hard coded image file name it works but if I try to get the name into a variable and pass that variable it is not working.
    Basically my client is having different logos for each operating unit. in the OA_MEDIA directory there are separate logos for each OU. during run time based on OU name we need to display the corresponding image. If I can get this entire path($OA_MEDIA/logo.jpg') in XML field<?CF_OU_LOGO?> then I'm able to print the logo using url:{CF_OU_LOGO}
    But I'm using seeded data source and I cant modify the data source, I need to handle this in RTF only. I could able to get the file name into a variable but not sure how to pass to url.
    could some one help me on this. I tried the following options
    <fo:external-graphic src="url($ln)" />
    url:{$ln} in web etc...
    here 'ln' is the variable which holds '$OA_MEDIA/logo.jpg'. ln is defined as <xsl:variable name="ln" select=".//CF_OPERATING_UNIT" />
    later I set the values as <?xdoxslt:set_variable($_XDOCTX, 'ln',translate( concat('${OA_MEDIA}/','Logo',.//CF_OPERATING_UNIT,'.jpg'),' ',''))?><?xdoxslt:get_variable($_XDOCTX, 'ln')?>
    thanks,
    Vijay

    Vijay
    What version of EBS is the customer running? I read somewhere that in R12 all of the concurrent parameters are passed to the XMLP template. I have not tried this but if true. You could create a conc program parameter that would hold the location of the image. You could either have the user pick the image or maybe derive it from the other parameter choices.
    Lets assume the token name is DLOGO you can reference that in your template.
    <?param:DLOGO?>
    this needs to be at the top of the template. Then where you need to embed the image just reference the value using
    $DLOGO
    You can embed this in the external graphic field
    As I mentioned I have not tested it yet, hopefully its there, if not there are ways around it. Try it first.
    Tim

  • How to pass a variable in a servlet to another jsp file?

    The variable that I wanted to pass is in a doGet function....
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.net.*;
    import java.sql.*;
    import java.io.*;
    import java.util.*;
    public class www extends HttpServlet
         public void doGet(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException     
        {try{
             String code = request.getParameter("Text");
             String current;
            response.setContentType("text/html");
            PrintWriter out = response.getWriter();
                URL yahoo = new URL("http://www.yahoo.com"+request.getParameter("Text"));<<not the actual
                URLConnection yahooConnection = yahoo.openConnection();
                DataInputStream dis = new DataInputStream( yahooConnection.getInputStream());
                String inputLine;
                String whole=null;
                int startPos,endPos,a,b,c,d,e;
                while ((inputLine=dis.readLine( ))!= null) {
                whole+=inputLine;
                dis.close();
                    a=whole.indexOf("Previous Close",0);
                    b=whole.indexOf("Previous Close",a+1);
                    c=whole.indexOf("Previous Close",b+1);
                    d=whole.indexOf("Previous Close",c+1);
                    e=whole.indexOf("Previous Close",d+1);
                    startPos = whole.indexOf("right>",e) + 6;
                    endPos = whole.indexOf(">",startPos) -4;
                       current=(whole.substring(startPos,endPos));
                        out.println(*current*);
                catch (MalformedURLException me)
                        System.out.println("MalformedURLExc eption: " + me);
                catch (IOException ioe)
                        System.out.println("Exception: " + ioe);
    }The String CURRENT is the one that I wanted to pass to another jsp file.....Or How can I call that Current in another JSP file?
    An Alternative is I wanted to directly input that String CURRENT in a mysql Database using jdbc but I dont know how to do that.....THANKS!
    Edited by: tr3k on Feb 22, 2008 12:40 AM

    If used this but it returns
                       current=(whole.substring(startPos,endPos));
                        out.println(current);
                        HttpSession session = request.getSession();
                        session.setAttribute("current", current);
                                  out.println("<form action = \"mVal_pass.jsp\" method= \"post\">");
            out.println("Update current Market Value of "+code+"?<p>");
              out.println("<input type=\"submit\" value=\"submit\">");
            out.println("</form>");This is my JSP page which supposed to be is getting the value of String CURRENT
    <HTML>
    <HEAD></HEAD>
    <BODY>
      <% String codek = request.getParameter("current");%>
    <%out.println(codek);%>
    </BODY>
    </HTML>I am getting the value of String Current but when I passed it, it returns NULL value...Help guys!

  • FTP how to pass dynamic filename/directory location - reading a file in 11g

    Hi All,
    We r using FTP adapter(SOA 11g) for getting files in remote server, May i know how to pass dynamic filename and directory where the file exists for reading in server.
    Thanks,
    Rak

    Hey according to my understanding, the Dynamic partner links are set only for the Outbound invocations only. Is my understanding right? if so, how do we create the dynamic partnerlinks for the ftp get kind of stuff...??
    Thanks in advance

  • How do I open my Final Cut Express 4.0 files in Final Cut Pro 10.1.3?

    Hello,
    I used Final Cut Pro when I was in college and when I graduated in 2010, I bought Final Cut Express 4.0. I recently bought Final Cut Pro 10.1.3 two days ago and I am having trouble opening up my old Final Cut Express 4.0 files. When I do go to open up these files they only open up with Final Cut Express and I always get the message: file's format is too new for this version of the application.
    How do I open these Final Cut Express 4.0 files in Final Cut Pro 10.1.3?
    Thank you!
    Anna

    TThere is no way to go directly from FCE to FCPX. If you know somehow who has FCP7, they can open the FCE projects and export XML files. These can be converted to FCPX XML format using the 7toX utility.

  • How to pass an xml file as a command line argument

    hi,
    i would like to know how to pass xml tags (not an xml file) while running java command. i have already compiled the code and i have a .class file generated. i need to pass this argument in the java command because i am calling a web service which requires an xml as parameter to it.
    to be precise the java code contains soap request and i need to pass xml at run time.
    pl do reply if you have any ideas or solutions...
    Thanks in advance,
    gnsinhyd

    I got the answer myself
    Got the answer myself. I needed the ActionServlet Context in the ActionClass. This is what I have done...
    It works.
    LogonAction.class
    Code:
    InputStream is = getServlet().getServletContext().getResourceAsStream("/WEB-INF/conf/menu.xml");
    XMLMenuBuilder.java
    Code:
    Document document = builder.parse(is);
    Thanks

  • XSLT - How to pass a Java object to the xslt file ?

    Hi ,
    I need help in , How to pass a java object to xslt file.
    I am using javax.xml.transform.Tranformer class to for the xsl tranformation. I need to pass a java object eg
    Class Employee {
    private String name;
    private int empId;
    public String getName() {
    return this.name;
    public String getEmpId() {
    return this.empId;
    public String setName(String name) {
    this.name = name;
    public String setEmpId(int empId){
    this.empId = empId;
    How can i access this complete object in the xsl file ? is there any way i can pass custom objects to xsl using Transformer class ?

    This is elementary. Did you ask google ? http://www.google.com/search?q=calling+java+from+xsl
    ram.

  • How to pass .txt file as an attachment to the web service (SOAP Attachment)

    Hi,
    I am creating web service using NetBeans 6.5 IDE and JAX-WS. I create a web application and then create web service using provided interface. I want to add .txt file as an attachment/parameter to the web service operation using "Add operation" interface. Don't want to add as an attachment to the SOAP message by creating it explicitly. IDE generates SOAP request and response automatically when the service is tested using "Test Web service" option. How can I add attcahment when I add operation so that it will appear in the generated SOAP message ?
    TIA.

    Hi AnitaDP,
    Attachment doesn't work in web service. You have to pass the content of the text file as a String or as an array of bytes to a method of your web service. From there, you may save the passed data in a file.

Maybe you are looking for

  • IPad not showing up as Preview Option in Folio Builder

    I'm currently using Adobe DPS (Windows), and trying to preview my folio in an iPad. I've got the Content Viewer app open on the iPad, am signed in, and am also signed in in Folio Builder. And of course, I've got the iPad plugged into the computer. Af

  • CSS won't display in Iexplore 6.0!

    Hi all: I'm attaching two snippets of code for your kind review. One is the external style sheet for my site; the other is a page where the code is used. This page displays correctly in Firefox 1.5.6 (my browser of choice) and in the latest version o

  • Does Z97 XPOWER AC support windows

    I am being very serious when I ask this question because I need to know if I have to rma this board or not. The reason I ask is because 1) all USB ports recognized/usable in BIOS 2) all USB ports recognized/usable in Linux 3) no USB ports recognized/

  • S/MIME Sign and Encrypt settings keep returning to 'Off' automatically?

    This may be more due to my limited understanding of this encryption method, but does anyone have any hints or can point me in the right direction? I have used encrypted mail on my iPhone (and PC) with iOS 5 seamlessly in the past. My certificate and

  • Iframe is not increasing its height when the content inside it is growing,

    I have an I frame in my application with src= " url" ifarme is appearing with vertical scroll bar it's not achieving the height , The parent component of the iframe is panel group layout and also I try with panel stretch layout Please help me on this