How to pass javascript variables into an Edge Animate project from HTML

I have just about got the basics nailed for Edge Animate now - coming from a Flash background it's been fairly straight forward, nice work so far (but more on that later)
I have had to build a "promoted items" slider for the homepage on one of our sites....previously this would have been a flash animation but, hey ho .
I originally built it as a jQuery extension/plugin but found it too time consuming to make minor alterations - that's where Edge came in and SEEMED to fill the job pretty well.
Now for the moment i'll put on hold the whole issue about how we NEED to be able to work with dom-level elements directly on the page (eg, animating divs and images within a ul-li structure which is how these things usually work) and concentrate on the Edge specific issue...
I've seen a few people asking this same question, but none of the answers either a) work at all for me , or b) are good enough for what I need to do.
see previous solutions here http://support.muse.adobe.com/message/4658175 and here : http://forums.adobe.com/thread/1065343
My project uses an internal array of data, and while in "preview" mode it works reasonably well.
in the Stage creationComplete event i have Edge code like, for example :
   var imagesArray = ["images/img1.jpg", "images/img2.jpg", "images/img3.jpg"];
   var headlinesArray = ["product 1", "product 2", "product 3"];
   var subTxtArray = ["lovely widgets", "smelly doo-dads", "purple whatchamacallits"];
   var linksArray = ["http://www.adobe.com", "http://www.adobe.co.uk", "http://www.adobe.net"];
   //variables set to full internal scope, used immediately after this and called from sub-elements afterwards
   sym.getComposition().getStage().setVariable("imagesArrayData", imagesArray);
this code obviously needs to be changed via the HTML page that is calling it.
IDEALLY i would have these elements already on the page ( <div><h1>Product 1</h1><img src="....  etc ) and then jquery it to hell to make it look funky. This is how we NEED to be doing it in the future...that way our content is still searchable and findable by search bots etc. Edge will output a "static" version of the page, i tried that, but it won't work for dynamically built objects. There's no way i've found of building an array of Symbols based on the existing DOM structure like you can do in jQuery itself.
however, in the meantime i'll settle for being able to set a javascript call up somewhere - like the old flashvars solution (which was horrible fudge, but worked as a way to get data into a project )
i'd REALLY rather not use an internal jSon call .... it's adding uneccessary bandwidth and additional server processing when the data it needs has already been retrieved from the database when the HTML page is drawn - AND it means i need to make sure that the json producing web service gets ported accross to any other projects that use this same "slider"
i've tried removing the internal declaration and changing my HTML to :
<script>
var imagesArray = ["images/img1.jpg", "images/img2.jpg", "images/img3.jpg"];
   var headlinesArray = ["product 1", "product 2", "product 3"];
   var subTxtArray = ["lovely widgets", "smelly doo-dads", "purple whatchamacallits"];
   var linksArray = ["http://www.adobe.com", "http://www.adobe.co.uk", "http://www.adobe.net"];
</script>
<!--Adobe Edge Runtime-->
     <script type="text/javascript" charset="utf-8" src="index_edgePreload.js"></script>
etc
but this hasn't worked.
i'm going to attempt the solution using
AdobeEdge.bootstrapCallback(function(compId) { ....
as found on http://forums.adobe.com/thread/1065343
but this doesnt explain how to set up Stage level variables, rather than targeting a specific Edge property
Anyone got any ideas? Or do I just scrap the project?
IMHO : Adobe need to be careful of falling into the same mindset that most of the anti-flash brigade have.
Please remember that Flash is used for WAY more than just adverts.
At the moment, Edge will work great as a way to put a simple animation onto the page with REALLY basic interactivity - suitable for a basic advert - but we need our HTML5 animations and scripts to be fully dynamic, data-driven, and portable, and preferably using existing DOM elements.
One last thing, any chance of a feature to say "my page already uses jQuery, don't import Edge's own outdated version"
Message was edited by: j1mp

I have just about got the basics nailed for Edge Animate now - coming from a Flash background it's been fairly straight forward, nice work so far (but more on that later)
I have had to build a "promoted items" slider for the homepage on one of our sites....previously this would have been a flash animation but, hey ho .
I originally built it as a jQuery extension/plugin but found it too time consuming to make minor alterations - that's where Edge came in and SEEMED to fill the job pretty well.
Now for the moment i'll put on hold the whole issue about how we NEED to be able to work with dom-level elements directly on the page (eg, animating divs and images within a ul-li structure which is how these things usually work) and concentrate on the Edge specific issue...
I've seen a few people asking this same question, but none of the answers either a) work at all for me , or b) are good enough for what I need to do.
see previous solutions here http://support.muse.adobe.com/message/4658175 and here : http://forums.adobe.com/thread/1065343
My project uses an internal array of data, and while in "preview" mode it works reasonably well.
in the Stage creationComplete event i have Edge code like, for example :
   var imagesArray = ["images/img1.jpg", "images/img2.jpg", "images/img3.jpg"];
   var headlinesArray = ["product 1", "product 2", "product 3"];
   var subTxtArray = ["lovely widgets", "smelly doo-dads", "purple whatchamacallits"];
   var linksArray = ["http://www.adobe.com", "http://www.adobe.co.uk", "http://www.adobe.net"];
   //variables set to full internal scope, used immediately after this and called from sub-elements afterwards
   sym.getComposition().getStage().setVariable("imagesArrayData", imagesArray);
this code obviously needs to be changed via the HTML page that is calling it.
IDEALLY i would have these elements already on the page ( <div><h1>Product 1</h1><img src="....  etc ) and then jquery it to hell to make it look funky. This is how we NEED to be doing it in the future...that way our content is still searchable and findable by search bots etc. Edge will output a "static" version of the page, i tried that, but it won't work for dynamically built objects. There's no way i've found of building an array of Symbols based on the existing DOM structure like you can do in jQuery itself.
however, in the meantime i'll settle for being able to set a javascript call up somewhere - like the old flashvars solution (which was horrible fudge, but worked as a way to get data into a project )
i'd REALLY rather not use an internal jSon call .... it's adding uneccessary bandwidth and additional server processing when the data it needs has already been retrieved from the database when the HTML page is drawn - AND it means i need to make sure that the json producing web service gets ported accross to any other projects that use this same "slider"
i've tried removing the internal declaration and changing my HTML to :
<script>
var imagesArray = ["images/img1.jpg", "images/img2.jpg", "images/img3.jpg"];
   var headlinesArray = ["product 1", "product 2", "product 3"];
   var subTxtArray = ["lovely widgets", "smelly doo-dads", "purple whatchamacallits"];
   var linksArray = ["http://www.adobe.com", "http://www.adobe.co.uk", "http://www.adobe.net"];
</script>
<!--Adobe Edge Runtime-->
     <script type="text/javascript" charset="utf-8" src="index_edgePreload.js"></script>
etc
but this hasn't worked.
i'm going to attempt the solution using
AdobeEdge.bootstrapCallback(function(compId) { ....
as found on http://forums.adobe.com/thread/1065343
but this doesnt explain how to set up Stage level variables, rather than targeting a specific Edge property
Anyone got any ideas? Or do I just scrap the project?
IMHO : Adobe need to be careful of falling into the same mindset that most of the anti-flash brigade have.
Please remember that Flash is used for WAY more than just adverts.
At the moment, Edge will work great as a way to put a simple animation onto the page with REALLY basic interactivity - suitable for a basic advert - but we need our HTML5 animations and scripts to be fully dynamic, data-driven, and portable, and preferably using existing DOM elements.
One last thing, any chance of a feature to say "my page already uses jQuery, don't import Edge's own outdated version"
Message was edited by: j1mp

Similar Messages

  • How to pass a variable into a cfc?

    prior to calling the cfinvoke, I have coding that determins a
    variable "X"
    I need to pass X into a cfc so it can complete the query held
    there.
    So I tried
    <cfinvoke component="A"
    method="AList"
    returnvariable="AResults">
    <cfinvokeargument name="x" value="#X#"
    /></cfinvoke>
    correct so far?
    Now over on the cfc page is where I'm getting stuck
    Inside my cffunction I'm adding <cfargument name="X" />
    But how do I get the value in?

    I don't quite understand your question. Can you rephrase?
    But before all that, bear in mind that one doesn't pass a
    variables into a
    *CFC*, one passes it into a function within the CFC. And as
    with all
    functions, one passes values into the function by passing it
    as an
    argument. But - of course - the function has to be coded to
    expect the
    argument.
    Your own sample code demonstrates this in action:
    <cfinvokeargument name="abbrCode"
    value="#companyAbbrCode#" />
    (NB: lose the trailing slash: this is CFML, not XML).
    So you know how to do that.
    Hence me not quite understanding what you're actually asking.
    Adam

  • How to pass javascript variable to jsp function

    i want to check which table header (that is <th> in html )is clicked and based on that a jsp funtion do a query in database and should show records in sorted way according to which column head is clicked.
    Table is created in html.
    My function is
    Vector varray = workcaseid.getWorkcaseId(Long.parseLong(MasterAccountNumber),SelectedColumn);
    <table border="1">
              <th ><label onClick="<%SelectedColumn="workcase_id";%>">Workcase Id</label></th>
              <th><label onClick="<%SelectedColumn="status_id";%>">Status</label></th>
    <tr><td>etc</td></tr>
    </table>

    im using bean for business login, following mvc model,and i think mvc is one of good design practice to use.
    <jsp:useBean id="workcaseid" scope="session"class="beanFiles.SearchWorkcaseId" />
    varray = workcaseid.getWorkcaseId(Long.parseLong(MasterAccountNumber),SelectedColumn);
    just tell me whether it is possible to pass javascript variable to jsp variable or not.i can do it by using hidden input type,using form and submit button.

  • How tp pass javascript variables/arrays to a servlet?

    Plz help me in passing javascript variables/arrays to a servlet

    Hi,
    I am creating table rows & columns containg text fields dynamically as follows:
    function addRowToTable()
    var tbl = document.getElementById('tblSample');
    var lastRow = tbl.rows.length;
    // if there's no header row in the table, then iteration = lastRow + 1
    var iteration = lastRow;
    var row = tbl.insertRow(lastRow);
    // right cell
    var cellRight = row.insertCell(0);
    var el = document.createElement('input');
    el.type = 'text';
    el.name = 'txtRow' + iteration;
    el.id = 'txtRow' + iteration;
    el.size = 20;
    cellRight.appendChild(el);
    Now i am calling function addRowToTable() from jsp page as + key is pressed to add rows dynamically.
    So as per rows different textfields are also getting created dynamically with different id & name.
    Now i am getting session attributes containing the values for textfields from servlet.
    but i am not able to map the values for dynamic textfields getting created?
    I want to print values in appropriate fields.
    Plz help me.

  • How to pass bind variable into oracle reports 6i - Parameter form

    Hello All,
    I want to pass bind variable into Oracle Reports 6I - Parameters.
    I have tried out that but got the below error :-
    rep-0781 : Bind variables are not allowed in the select statement
    Kindly help me is there any option which allow me to pass bind variables into Oracle reports 6I.
    Thanks
    HARSH SHAH

    Hi,
    may be its not possible to use :P_PARAM1 in user parameter of oracle 6i reports
    but u can full fill user requirement using oracle forms
    create a form as like as report parameter window
    then create parameter list and run report
    PROCEDURE Run_Emp_Report IS
      pl_id ParamList;
    BEGIN
      pl_id := Get_Parameter_List('tmpdata');
      IF NOT Id_Null(pl_id) THEN
        Destroy_Parameter_List( pl_id );
      END IF;
      pl_id := Create_Parameter_List('tmpdata');
      Add_Parameter(pl_id, 'PARAMFORM', TEXT_PARAMETER, 'NO');
      Run_Product(REPORTS, 'empreport', SYNCHRONOUS, RUNTIME, FILESYSTEM, pl_id, NULL);
    END;
    thanks
    mostafiz mitul
    Dhaka Bangladesh

  • How do I link a google drive edge animate project to an iframe?

    I have a simple edge animate project as a test. It has the following files in the root:
    edge_includes folder containing 3 images and edge.5.0.1.min.js
    project.html
    project_edge.js
    I want to be able to have these files stored on google drive (or dropbox or alternative) and link to them through an iframe on my website. I've tried doing this by keeping the file structure the same on google drive and just referencing the shared link of the html file, but the project will not work.
    I've also tried replacing the src links of the edge.5.0.1.min.js file and the image files to their shared links on the google drive. This didn't work either.
    Is there any way to host the files externally and have them still reference each other properly so the html file can be linked into an iframe on a different site?
    Many thanks in advance
    Barry

    Just to add the relevant requested information:
    I am using the latest version of Edge animate (2014.1)
    Google chrome (and IE desktop not metro as backup)
    If anyone wants to see the file then I'm happy to link to it, but I don't think the question really warrants it.
    Thanks again.

  • How to pass javascript variable to PLSQL stored procedure

    Hi,
    How can I pass a javascript variable to a database procedure. I have a form with a radio button group and would like to save the value of the selected radio button to a database table by passing the value to the stored procedure.
    Thanks

    Hi
    You can use iframe to call the procedure. Here is an example used in dynamic page or pl/sql portlet. The pl/sql procedure is called myprocedure and resists in the schema myschema. This example passes 2 parameters, but I have not yet reased a limit.
    First the call within a javascript function:
    myiframe.location.href="myschema.myprocedure?p_myprameter1=" + vJvascriptparameter1 + "&p_myprameter2=" + vJvascriptparameter2;
    Then the iframe:
    <iframe id="myiframe" height="0" width="0" frameborder="0"></iframe>
    You can let the pl/sql procedure print a value, that can be used i the portlet. You can get the value in a javascript this way:
    myvalue=top.window.frames["myiframe"].document.body.innerHTML;
    Best regards
    Klaus

  • How to pass  JavaScript variable value throuh netui form ??

    Hi All,
    I have reqmnt,where in I need to pass the value from JavaScript function through
    Form submission.
    I could able to pass this through simple HTML form using SIMPLE HTML tags. How
    can i do the same thing using NETUI tag (NETUI form)??
    Can somebody throw some input on this??
    TIA,
    RAM.

    Excellent - Thats what I was also looking.
    RAM.
    Thomas Cook <[email protected]> wrote:
    >
    Here's an example of what I think you're trying to do:
    <netui:html>
    <body>
    <netui:form action="submitIt" tagId="myForm">
    <netui:button value="Submit It" onClick="return setFormValue()"/>
    <script>
    function setFormValue()
    var form = document.getElementById( getNetuiTagName( "myForm",
    this ) );
    var newVal = document.createElement( "input" );
    newVal.type = "hidden";
    newVal.name = "foo";
    newVal.value = "bar";
    form.appendChild( newVal );
    return true;
    </script>
    </netui:form>
    </body>
    </netui:html>
    Thomas
    RAMt wrote:
    Hi All,
    I have reqmnt,where in I need to pass the value from JavaScript functionthrough
    Form submission.
    I could able to pass this through simple HTML form using SIMPLE HTMLtags. How
    can i do the same thing using NETUI tag (NETUI form)??
    Can somebody throw some input on this??
    TIA,
    RAM.
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
    <title></title>
    </head>
    <body>
    Here's an example of what I think you're trying to do:<br>
    <br>
    <tt><nobr><netui:html></nobr><br>
    <nobr>  <body></nobr><br>
    <nobr>    <netui:form action="submitIt" tagId="myForm"></nobr><br>
    <nobr>    <netui:button value="Submit It" onClick="return
    setFormValue()"/></nobr><br>
    <nobr>    <script></nobr><br>
    <nobr>      function setFormValue()</nobr><br>
    <nobr>      {</nobr><br>
    <nobr>          var form
    = document.getElementById( getNetuiTagName(
    "myForm", this ) );</nobr><br>
    <nobr>          var newVal
    = document.createElement( "input" );</nobr><br>
    <nobr>          newVal.type
    = "hidden";</nobr><br>
    <nobr>          newVal.name
    = "foo";</nobr><br>
    <nobr>          newVal.value
    = "bar";</nobr><br>
    <nobr>          form.appendChild(
    newVal );</nobr><br>
    <nobr>          return true;</nobr><br>
    <nobr>      }</nobr><br>
    <nobr>    </script></nobr><br>
    <nobr>    </netui:form></nobr><br>
    <nobr>  </body></nobr><br>
    <nobr></netui:html></nobr></tt><br>
    <br>
    Thomas<br>
    <br>
    RAMt wrote:
    <blockquote cite="[email protected]" type="cite">
    <pre wrap="">Hi All,
    I have reqmnt,where in I need to pass the value from JavaScript function
    through
    Form submission.
    I could able to pass this through simple HTML form using SIMPLE HTML
    tags. How
    can i do the same thing using NETUI tag (NETUI form)??
    Can somebody throw some input on this??
    TIA,
    RAM.
    </pre>
    </blockquote>
    </body>
    </html>

  • How to pass a variable into sqlplus script from file

    here is my problem :
    I have plenty of sql scripts to run. So every time I need to run sqlplus /nolog @scriptxx.name<enter> and then type login<enter>, password<enter>, second login<enter> , second password<enter> - and when it finishes again from the beggining with next one...
    I am fed up with passing these parameters every time. I would like to create a file (files?) with these logins and passwords (located f.ex. in directory where I run the script) then tells, in some way, to my scripts that answers for their questions is inside this file(s).
    Is there any way to do it in such a way ?
    something like: accept DataUser char %read from file user1.txt without my inerteraction%
    ps.
    I cannot add directly these parameters to script because I need to run them on different servers (DEVs and PRODs) and every server has different users and passwords
    KP>

    Actually the START command would resolve the issue, in conjunction with passing parameters and DEFINEs in a sensible manner.
    DEFINE dathasb = '&1'
    ACCEPT dathasb char prompt 'etc...'
    When dathasb already has a value, ACCEPT won't prompt.
    Too many people start hacking and don't use the power of Oracle because they don't the needful : Reading the documentation.
    Other than that obviously the series of scripts needs of course to be re-engineered.
    Asking interactively for a password .... even 20 years back we already didn't do this anymore.
    Of course that was the time when exporting anything beyond the VAX 11/750 to Eastern Europe was prohibited because of US export regulations ;)
    You could store the passwords in Oracle Wallet and be done with it.
    You could use OS authenticated accounts and be done with it.
    But then you still didn't post a version, even not when requested.
    Sybrand Bakker
    Senior Oracle DBA

  • How to add Creative Commons code from GitHub to my Edge Animate project?

    Hi there!
    I am pretty new to Edge Animate, and I am trying to figure out how to add in a GitHub Creative Commons html code to my Edge Animate project.
    I have a feeling there is an easy solution- which I can't seem to figure out...
    Thanks in advance!

    Yes- thanks for asking!
    I would like to use an html code that is available in the GitHub Creative Commons library. I would like to import the html code for the collapsable force layout from the Creative Commons GitHub library found here: http://bl.ocks.org/mbostock/1062288#index.html into my Edge Animate project.
    I am hoping that once I have been able to import this code, that I can than use Edge Animate to customize how it is displaying- i.e. add call-out boxes to the bubbles etc.
    Any advice you may have would be greatly appreciated!

  • How to pass a JavaScript variable into a java method

    I would like to know how to pass a JavaScript variable into a java method with in a <% %> tag inside a JSP file like so:
    <%@ page contentType="text/html;charset=windows-1252"%>
    <html>
    <head>
    <script LANGUAGE="JavaScript">
    myValue = someDynamicValue;
    <% System.out.println(myValue)%>
    </script>
    </head>
    <body>
    </body>
    </html>
    obviously "System.out.println(myValue)" will not work because myValue is seen as a java variable and not a JavaScript variable.
    I would like to know how to let the jsp file, that I wrote in the above code, see myValue as a JavaScript variable and not a java variable so that I can pass it to a java method.
    NOTE: the java method does not have to be a println() method, it can be any method of my choice.
    NOTE: someDynamicValue is a JavaScript value that can dynamically change

    I don't believe you can. JSPs are really just elaborate templates that an engine such as Tomcat parses and generates an HTML page based on. That page is then displayed to the user. By the time you want to use some function in Javascript, the JSP has already been parsed and generated.
    Basically, Javascript and JSPs can't talk to each other. One's server-side and the other is client-side.

  • How to  pass a variable value into a custom planning function via a web

    Can some one tell me
    How to  pass a variable value into a custom planning function via a web template?
    What are the different types of Planning function parameters available and what is the difference between them?
    Thanks
    babu

    Hi Sutrtha,
    Yeah I got the pop up asking to select the variables used, I have selected ENTITY_ID that was used by the interfaces, but on execution of the package the Scenario did not work as the passeed variable #ENTITY_ID is set to 0 instead of the value I am passing.
    Am I missing something?
    Regards
    B

  • How do I put text into an Edge File that clients can edit easily afterwards

    Hi
    Can anyone explain how I can put text into an edge file (styled with google fonts) and make it so that clients can access the text and update the text as they require?
    Previous suggestion was dynamically loading a .txt file - any instructions would be most appreciated.
    Thanks.

    Hi Resdesign!
    Your code is very useful to learn how to use Json in Adobe Edge Animate!
    But I have a question: why you use ( i ) as argument of the function UpdateInfo and when you recall it you use ( index )?
    $.getJSON('slides.json', function(data){
              //for(var i=0; i<data.length; i++){
    function updateInfo(i){
                        sym.$("photo").css({"background-image": "url('"+data[i].image+"')"});
                        sym.$("pillar").html(data[i].pillar);
                        sym.$("what").html(data[i].what);
                        // position
              index = -1;
              sym.$("btn").click(function(){
              index++;
                        if (index>=5){
                                  index = 0;
              updateInfo(index);
    Many thanks for your attention!
    Davide

  • How to pass session variable value with GO URL to override session value

    Hi Gurus,
    We have below requirement.Please help us at the earliest.
    How to pass session variable value with GO URL to override session value. ( It is not working after making changes to authentication xml file session init block creation as explained by oracle (Bug No14372679 : which they claim it is fixed in 1.7 version  Ref No :Bug 14372679 : REQUEST VARIABLE NOT OVERRIDING SESSION VARIABLE RUNNING THRU A GO URL )
    Please provide step by step solution.No vague answers.
    I followed below steps mentioned.
    RPD:
    ****-> Created a session variable called STATUS
    -> Create Session Init block called Init_Status with SQL
        select 'ACTIVE' from dual;
    -> Assigned the session variable STATUS to Init block Init_Status
    authenticationschemas.xml:
    Added
    <RequestVariable source="url" type="informational"
    nameInSource="RE_CODE" biVariableName="NQ_SESSION.STATUS"/>
    Report
    Edit column "Contract Status" and added session variable as
    VALUEOF(NQ_SESSION.STATUS)
    URL:
    http://localhost:9704/analytics/saw.dll?PortalGo&Action=prompt&path=%2Fshared%2FQAV%2FTest_Report_By%20Contract%20Status&RE_CODE='EXPIRED'
    Issue:
    When  I run the URL above with parameter EXPIRED, the report still shows for  ACTIVE only. The URL is not making any difference with report.
    Report is picking the default value from RPD session variable init query.
    could you please let me know if I am missing something.

    Hi,
    Check those links might help you.
    Integrating Oracle OBIEE Content using GO URL
    How to set session variables using url variables | OBIEE Blog
    OBIEE 10G - How to set a request/session variable using the Saw Url (Go/Dashboard) | GerardNico.com (BI, OBIEE, O…
    Thanks,
    Satya

  • Error while Passing shell variable into exec UTL_MAIL.SEND

    Hello,
    I am new in shell scripting, please help me to rectify, whats wrong in my code.
    login='system/manager'
    code=`
    sqlplus -s $login <<EOF
    set heading off
    SELECT tablespace_name,(SUM(bytes/1024/1024)) FROM dba_free_space WHERE tablespace_name IN ('PIN00','PINX00','SYSTEM','SYSAUX','UNDOTBS1','STATSPACK') GROUP BY tablespace_name;
    EOF`
    exec UTL_MAIL.SEND(sender=>'[email protected]', recipients=>'[email protected]', cc =>'[email protected]' , subject=>'$ORACLE_SID BACKUP', message =>'$code')
    exit;
    EOF
    echo "sqlplus exited"
    ERROR:
    ORA-01756: quoted string not properly terminated
    SP2-0734: unknown command beginning "SYSTEM ..." - rest of line ignored.
    SP2-0734: unknown command beginning "PIN00 ..." - rest of line ignored.
    SP2-0734: unknown command beginning "PINX00 ..." - rest of line ignored.
    SP2-0734: unknown command beginning "SYSAUX ..." - rest of line ignored.
    SP2-0044: For a list of known commands enter HELP
    and to leave enter EXIT.
    Edited by: 929236 on Apr 21, 2012 12:46 AM
    Edited by: 929236 on Apr 21, 2012 12:48 AM

    Hello,
    Thanks for your review.
    But please look into below output i am getting after running below code
    ORACLE_BASE=/oracle; export ORACLE_BASE
    ORACLE_HOME=$ORACLE_BASE/product/10.2.0.4/db_1; export ORACLE_HOME
    ORACLE_SID=pindb; export ORACLE_SID
    PATH=/usr/sbin:$PATH; export PATH
    PATH=$ORACLE_HOME/bin:$PATH; export PATH
    LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
    CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
    login='system/manager'
    code=`
    sqlplus -s $login <<EOF
    set heading off
    set feedback off
    SELECT tablespace_name,(SUM(bytes/1024/1024)) FROM dba_free_space WHERE tablespace_name IN ('PIN00','PINX00','SYSTEM','SYSAUX','UNDOTBS1','STATSPACK') GROUP BY tablespace_name;
    exit`
    output:
    PIN00 28287.1172 PINX00 93813.1367 STATSPACK 54.1875 SYSAUX 215.125 SYSTEM .1015625 UNDOTBS1 745.8125 6 rows selected.
    Here its working very fine but when i am passing code variable to utl_mail.send procedure, its giving error same as i mentioned previous. I have put all the environment variable as well. But when i put utl_mail.send and pass CODE variable into it it gives error.
    ORACLE_BASE=/oracle; export ORACLE_BASE
    ORACLE_HOME=$ORACLE_BASE/product/10.2.0.4/db_1; export ORACLE_HOME
    ORACLE_SID=pindb; export ORACLE_SID
    PATH=/usr/sbin:$PATH; export PATH
    PATH=$ORACLE_HOME/bin:$PATH; export PATH
    LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
    CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
    login='system/manager'
    code=`
    sqlplus -s $login <<EOF
    set heading off
    set feedback off
    SELECT tablespace_name,(SUM(bytes/1024/1024)) FROM dba_free_space WHERE tablespace_name IN ('PIN00','PINX00','SYSTEM','SYSAUX','UNDOTBS1','STATSPACK') GROUP BY tablespace_name;
    exit`
    $ORACLE_HOME/bin/sqlplus -s /nolog << EOF
    connect / as sysdba
    exec UTL_MAIL.SEND(sender=>'[email protected]', recipients=>'[email protected]', cc =>'[email protected]' , subject=>'$ORACLE_SID BACKUP', message =>'$code')
    exit;
    EOF
    echo "sqlplus exited"
    ERROR:
    ORA-01756: quoted string not properly terminated
    SP2-0734: unknown command beginning "PIN00 ..." - rest of line ignored.
    SP2-0734: unknown command beginning "PINX00 ..." - rest of line ignored.
    SP2-0734: unknown command beginning "STATSPACK ..." - rest of line ignored.
    SP2-0734: unknown command beginning "SYSAUX ..." - rest of line ignored.
    SP2-0044: For a list of known commands enter HELP
    and to leave enter EXIT.
    SP2-0734: unknown command beginning "SYSTEM ..." - rest of line ignored.
    SP2-0734: unknown command beginning "UNDOTBS1 ..." - rest of line ignored.
    sqlplus exited
    Thanks,
    Ashish
    Edited by: user13271251 on Apr 22, 2012 11:49 PM

Maybe you are looking for