Script within a cfset variable

Hi,
Is it possible to hold the following code within a coldfusion
variable to be outputted on a page?...
<style type="text/css">
#strap {
background-image: url(images/mypic.jpg);
</style>
I would like to be able to dynamically change the background
image on demand.
Thanks

Is it possible to hold the following code within a coldfusion
variable
to be outputted on a page?
Sure, no problem.
Oh, would you like a suggestion on how?
<cfoutput>
<cfsaveContent variable="styleBlock">
<style type="text/css">
##strap{
background-image:url(#imageVar#);
</style>
</cfoutput>
<cfoutput>#styleBlock#</cfoutput>
Note: the escaping of the pound-sign id symbol since this
code is inside
an output block.

Similar Messages

  • Spawn a new PDF using Java Script within LC Designer

    I am trying to spawn a new PDF file to be created from an existing PDF using Java Script within the LC designer
    I have this example but I can't get it to work
    function createPdf()
        pdf = pdf$();
        pdf.addText('Hello World');
        pdf.writeToFile('c:/temp/hello_world.pdf');
        window.open('file://c:/temp/hello_world.pdf');
    Is it possible to create a PDF like this within LC Designer?

    Hi
    I would like to see if it was possible.  I thought it would be easy, as
    there is a standard batch processing sequence (Print 1st page of all) using
    Java that comes with Acrobat 7.  This allows you to print the first page of
    a number of files that you select when the sequence is run.  Its code is:
    /* Print 1st Page */
    /* This sequence prints the first page of
       each document selected to the default printer.
    this.print
    To my uninformed mind it seemed logical that the same code, slightly
    modified to print all pages, should work from within a form.
    Anyway, if there is a way to choose individual files, I would appreciate
    that.
    Thanks
    Rob

  • Unable to run Groovy scripts within procedure

    Hi all,
    We are managing to automate objects promotion to PROD environment using Groovy. The thing is that we are able to run the script in the Groovy tool successfully, but we are not able to run the same script within a procedure in ODI. The version that we are using is 11.1.1.6.5.
    Do you know if this needs further configuration? Does it needs any updgrade?
    Below, the script we are currently using, it´s just to create a new physical and logical architecture on the topology tab and write an entry on the context to link logical to physical. Any help would be highly appreciated. Thanks.
    Fernando.
    import oracle.odi.core.persistence.transaction.support.DefaultTransactionDefinition;
    import oracle.odi.domain.util.ObfuscatedString;
    import oracle.odi.domain.model.OdiModel;
    import oracle.odi.domain.topology.OdiLogicalSchema;
    import oracle.odi.domain.topology.OdiPhysicalSchema;
    import oracle.odi.domain.topology.OdiDataServer;
    import oracle.odi.domain.topology.OdiContext;
    import oracle.odi.domain.topology.OdiTechnology;
    import oracle.odi.domain.topology.OdiContextualSchemaMapping;
    import oracle.odi.domain.topology.AbstractOdiDataServer;
    import oracle.odi.domain.topology.finder.IOdiContextFinder;
    import oracle.odi.domain.topology.finder.IOdiTechnologyFinder;
    def createLogicalSchema(contextCode, techCode, schName, dataserverName, userName, password, url, driver, schema) {
    txnDef = new DefaultTransactionDefinition();
    tm = odiInstance.getTransactionManager()
    txnStatus = tm.getTransaction(txnDef)
    contextFinder = (IOdiContextFinder) odiInstance.getTransactionalEntityManager().getFinder(OdiContext.class);
    context = contextFinder.findByCode(contextCode);
    techFinder = (IOdiTechnologyFinder) odiInstance.getTransactionalEntityManager().getFinder(OdiTechnology.class);
    tech = techFinder.findByCode(techCode);
    lschema = new OdiLogicalSchema(tech, schName)
    dserver = new OdiDataServer(tech, dataserverName)
    con = new AbstractOdiDataServer.JdbcSettings(url, driver)
    dserver.setConnectionSettings(con)
    dserver.setUsername(userName)
    dserver.setPassword(password)
    pschema = new OdiPhysicalSchema(dserver)
    pschema.setSchemaName(schema)
    pschema.setWorkSchemaName(schema)
    cschema = new OdiContextualSchemaMapping(context, lschema, pschema)
    odiInstance.getTransactionalEntityManager().persist(lschema)
    odiInstance.getTransactionalEntityManager().persist(dserver)
    tm.commit(txnStatus)
    return lschema
    lschema = createLogicalSchema("DEVELOPMENT", "ORACLE", "LS_HAL_TEST", "DS_HAL_TEST", "ODI_TEST", ObfuscatedString.obfuscate("odi_test"),
    "jdbc:oracle:thin:@ourservername:10710:DBAA6T", "oracle.jdbc.OracleDriver", "ODI_TEST")
    Notice i've changed the actual name of our server for "ourservername" because I don't know if I´m able to post that information.
    Thanks.

    Hi,
    I did try to hard code the parameters values, and it still didn't work. However, I did get a little bit closer, I found out that it doesn't work only whne my stored procedure uses a temporary table.
    Any though, why the temporary table would cause this error ?
    Thanks

  • Calling a Perl Script within a JSP page

    Can anyone suggest a technique for calling a Perl Script within a JSP page.
    Thanx
    Raymis

    Runtime.exec()
    URL.openConnection().connect()

  • Cfset variable as a list loop value

    I'm trying to use a list loop to create 30 numbers then set
    that list
    with cfset.
    Instead of typing <cfset Questions = 1,2,3,4...etc.>
    I'd like to make a
    list loop generate the 30 numbers. I just can't figure out
    how to set
    these 30 numbers as a value into a cfset variable named
    "Questions".
    Here's three things I've tried. All return errors:
    <cfloop index="QuestionNumber" from="1" to="30">
    #QuestionNumber#,
    </cfloop>
    <cfset QuestionNumber = Questions>
    And this:
    <cfset Questions =
    <cfloop index="QuestionNumber" from="1" to="30">
    #QuestionNumber#,
    </cfloop>
    >
    And this;
    <cfloop index="QuestionNumber" from="1" to="30">
    <cfset Questions = #QuestionNumber#,>
    </cfloop>

    ksmith wrote:
    > Or brute force it like:
    >
    >
    > <cfset loopList = "">
    >
    > <cfloop index="QuestionNumber" from="1" to="30">
    > <cfif (QuestionNumber GT 1)>
    > <cfset apost = ",">
    > <cfelse>
    > <cfset apost = "">
    > </cfif>
    > <cfset loopList = loopList & apost &
    #QuestionNumber#>
    > </cfloop>
    >
    > <cfdump var="#loopList#">
    >
    Thank you ksmith.

  • Photoshop scripts within Actions

    Ok so I am currently trying to run a photoshop script within an action specifically Image processor.
    I can include the script by importing menu item although evyerthing i run the action i have to set up the script aka choose folder locations etc.
    My question.. is there a way to set the defaults so that the action automatically runs the script?
    Please help its driving me mad!

    Not sure what you mean exactly, but that the dialog is raised when you trigger Image Processor seems as expected.
    Why an Action anyway and not a proper Script for the whole operation?

  • Is it possible to use a Script within an action? - it doesn't seem to work...

    Is it possible to use a Script within an action? - it doesn't seem to work...
    I'm using the 'round any corner' script from SATO Hiroyuki..., and  I'd like to apply it to only one anchor point (on multiple boxes)

    An Action can call a script from the File>Scripts menu by means of the Add Menu Item Action step. But it will only work for the duration of your Illustrator work session. If you quit AI and then restart it, the Add Menu Item step will be blank. This bug has been reported for FOUR FULL VERSIONS of this sloppy program.
    However, if I am correctly understanding your description of what you are trying to automate, an Action will not be able to automate the selection of a particular anchorpoint in multiple paths. You'd have to make the selections all at first. Whether the script would then apply as desired to each path depends on how the script is written.
    JET

  • Call unix script within plsql block

    Hi all,
    can i call a unix script within a plsql block for example
    my unix script name is - Diff_dataload_process.sh
    declare
    begin
    select * from ......;
    Diff_dataload_process.sh
    exception
    end;
    please help me.
    Thanks,
    Krupa

    Hi, I think you need something like this:
         DBMS_SCHEDULER.create_program
         (program_name => 'sch_program',
    program_type => 'EXECUTABLE',
    program_action => '/home/nobody/input/test_job.sh',
    number_of_arguments => 0,
    enabled => TRUE,
    comments => 'Test Program'
    end;
    and there's another ways to do it:
    [calling shell|http://www.dba-oracle.com/t_execute_shell_script_plsql_procedure.htm]

  • Run a BR or Calc Script within another BR

    Is there a way from which I can run one Business Rule/Calculation Script in another Business Rule/Calculation Script (Run one BR/Calc Script within another BR)?
    Edited by: 930603 on May 3, 2012 4:44 PM

    Hi,
    Do you want to run two BR's parallel y, why you are not going for sequences option, you can divide your rule in parts and run the rules in the sequence you want.
    run one Business Rule/Calculation Script in another Business Rule/Calculation Script (Run one BR/Calc Script within another BR)?I don't think so you can call one BR from other, if you want the same might be you have to write CDF for calling the BR/CalcScript within the BR. or you can use Essbase Macro option.(+I am not sure for this option+)
    Thanks,
    Avneet Singh Bhatia

  • Calling set of sql scripts within a sqlscript

    Hi i tried running set of scripts as follows
    SQL>@c:\c1 which connects to the DB
    and i have two more scripts within c1 as follows
    connect usrname/pwd
    @c:\i1
    @c:\i2
    exit
    While running this i get the following error
    SP2-0310: unable to open file "@c:\i1.sql"
    SP2-0310: unable to open file "@c:\i2.sql"
    however if i run as SQL>@i1 SQL>@i2 my execution seems to be fine, it errors out if i wrap it into c1 as mentione above, am i doing something wrong or missing something.

    I see that in your script you run @c:\i1 and in SQLPlus you run SQL>@i1. What happens when in SQLPlus you run SQL>@c:\i1.
    I see that you are working on Windows. Usually the starting directory for SQLPlus on Windows is $ORACLE_HOME\bin and not c:\.

  • F:verbatim and scripts within IE browser?

    Within a .jspx page (JDev 10.1.3.1), the following code runs fine on Firefox 1.5.09, but does not run on IE 6.0 or 7.0. Are there any known issues with either using f:verbatim or script within IE browser?
    <f:verbatim>
    <SCRIPT SRC="_timer.jsp"></SCRIPT>
    </f:verbatim>
    I also tried:
    <script type="text/javascript" src="_timer.jsp"></script>
    Thanks

    Hi,
    I'm not sure it will be working, but try your code with space between <SCRIT...> and </SCRIPT> tags or better move </SCRIPT> tag to the next line.
    Kuba

  • Passing variables to a SQL script within GC

    Does anyone know if it is possible to pass in a variable to a SQL script job within Grid Control? I don't see that I can but I wanted to ask a larger group before cloing the loop on this.
    For example, I have a few different databases which contain schemas which contain date-range daily partitioned tables. I have a single code block which normally accepts the table_owner as a variable then loops through to analyze the current day partition. I'd love for OEM to be able to have the job submitted to different database targets whilst passing in a different schema name.
    Thank you in advance!

    This can be done in two steps, but first create a table containing 1 field in all the target databases (something like table_owner) you want to analyze. Before running the analyze script change in all the to be analyzed databases the table_owner (as a job?). Then run the analyze script that contains a statement that first reads the table_owner and use this table_owner as the variable you want.
    Even more simple would be to use a database link from the to be analyzed db's to a central db so you only have to change the table_owner in one table.
    Eric

  • Script PL SQL  with variable

    Hi
    I Must to execute a PL/SQL if work fine then I execute other, But if first not work I want out without to execute of the second
    SET LINESIZE 1000
    SET SERVEROUTPUT ON
    SET TERM  ON
    SET HEAD OFF
    SET ECHO OFF
    VAR  V_FLAG  number
    SPOOL C:\TEMP\MYLOG.TXT
      ----FIRST PL/SQL
      BEGIN
      EXCEPTION
        WHEN OTHER THEN
         BLA BLA
        :v_flag :=1;
      END; 
       ------- SECOND PL/SQL
      BEGIN
        IF  :V_FLAG = 1 THEN
           RETURN;
        END IF;
      EXCEPTION
       WHEN OTHERS THEN
          BLA BLA
      END;But when I execut script It show me
    V_FLAG
    1Is there some way for no to show , or Other way for to do same thing (Continue second PL/SQL if First work fine )
    thanks

    Do these have to be two separate PL/SQL blocks within
    a SQL*Plus script? If so, the SQL*Plus
    [url=http://download-uk.oracle.com/docs/cd/B19306_01/s
    erver.102/b14357/ch12052.htm]WHENEVER SQLERRORsetting can exit SQL*Plus when an unhandled PL/SQL
    exception occurs. You would need to remove the
    exception handler or re-raise the exception in it,
    otherwise the block completes successfully and
    SQL*Plus has no way of knowing anything ever went
    wrong.
    If you place both blocks within one enclosing PL/SQL
    block you can have all the procedural control you
    need using PL/SQL.
    Thank you
    In First BLOCK If number records inserted in Table is not Equal 17 then It do not must to continue second block , then I used a variable
      IF  SQL%ROWCOUNT =17THEN
         DBMS_OUTPUT.PUT_LINE('RECORDS  '||   SQL%ROWCOUNT);
        -- COMMIT;
       ELSE
          DBMS_OUTPUT.PUT_LINE('RECORDS NOT EQUAL==>');
         ROLLBACK;
          :V_FLAG :=1;
         RETURN;
       END IF;Then When :V_FLAG =1 I use Return in Second Block, but it Show me
    V_FLAG
    1

  • Context Menu to Execute a powershell script within selected directory.

    Hi,
    I'm trying to run a powershell script from a context menu, I've been able to create a context menu, however, when I attempt to run the script it will only run at the default location. What I'd like to do is right-click a folder then click "Do Script"
    and have it run the script with the location set to the directory I right clicked.
    So for clarities sake, if I right click C:\example then when the script runs it should recognize .\ as C:\example
    This is what I currently have in my registry entry. However it's shouting about how there is no parameter for Set-Location that matches -File, I can see that it's taking the Set-Location command, then it's trying to see if -File will is a perameter for it,
    but I' trying to use -File for the powershell command. Anyone have any ideas for that?
    PowerShell -Command "Set-Location -LiteralPath '%V'" -File C:\script\Test.ps1
    Any ideas? I'm wondering if there is something in Powershell like how Bash has something like this to do commands inline
    $ > Command -parameter <arg> && Command -parameter <arg>

    To setup a script to launch in a men from within a context menu you must create a the following.
    Create the following keys:
    HKEY_CLASSES_ROOT\Directory\Shell\<Script Name>
    HKEY_CLASSES_ROOT\Directory\Shell\<Script Name>\command
    Within <Script Name> change the (Default) value to the words you want to have as a context menu example, "Launch Script Here".
    Within the command Key change the (Default) value to
    PowerShell.exe -File "C:\Script_location\script_name.ps1" "%v"
    PowerShell.exe is executed with the -File flag followed by the scripts exact location and "%v " is a variable pointing to the location that was selected.

  • Problem in assigning script array to Js variable

    There is a huge list(20,000) of cities that has to be put into a script array for the further use in the jsp page. so this script array is created once for all when the login is made for the application and stored a session variable. The sample of the script array is like-----
    <script>
    strArrCityName[17463]= "Zoar";
    strArrCityID[17463]= "10599";
    strArrCityStateID[17463]= "3";
    strArrCityName[17464]= "Zoarville";
    strArrCityID[17464]= "10600";
    strArrCityStateID[17464]= "3";
    </script>
    the entire stuff from <script>---</script>(uncluding the script tags is stored as a string in the session (strSessionCityArr))
    Now the porblem is i need to store this array into a js variable on jsp page load.
    I order to that i need to declare a js variable in jsp page
    ex::
    <html>
    <body>
    This is a sample jsp page created by <%= strUserName%>
    <script>
    var cityarry = "<%=session.getAttribute('strSessionCityArr')%>";
    </script>
    </body>
    </html>
    when i assign the array to the js variable , the <script> tag inside the string is conflicting with the <script> tag that of the jsp page.
    This throws the js error and the futher loading of the page is stopped.
    The reason i am storing it in the js variable is i will be painting the script array dyanamically on click of a button.
    Also in need both the script tags in the array is in other jsp pages i will painting the array on page load by using the out.println(strCityArray)
    I need a way in which this script array can be stored in js variable or any method by which i can directly get it from the session on button click
    Thanx in advance
    Manu

    i had tired constructing the script array using the JS but JS logic is always slower ...my point was not to do it all with JS code. My point was that unless you know how to properly define it as JS-only code, then it makes it hard to figure out how to break that up to Java generated code. It's clear to me that you don't have a very good grasp of what you're trying to do.
    The second point is, in some JSPs i need the <script> tags to be included in the array. No they don't. You can always put the <script> tags around what your Java variable includes if you are using that content in several places...
    <script><%= session.getAttribute('strSessionCityArr') %></script>

Maybe you are looking for

  • How can i authorize music from one apple id acount to another

    how can i authorize music from one apple id acount to another? My IPhone 5 wont play my songs that were purches from my old apple id account

  • Open/Save Dialog Box Freeze

    Hello, Since updating to 10.4.7, the open/save dialog box freezes (beachball) after selecting a folder. Can anyone please point me in the right direction in solving my issue. I used the ComboPPC updater and then ran Cocktail to repair permissions, cr

  • I need to install LabView RT on a cFP-2010, but I only have LabView RT 2012 (need 8.5.1???)

    Hello, I have a cFP-2010 module that I got ahold of which has a software problem.  When I got into the module through MAX, I got a message that said there was no software loaded and that the module was operating in safe-mode.  I rebooted the cFP-2010

  • Viewing pdf files in Union Bank's site

    When we login to Union Bank's site, and we try to view a pdf file, a pop up message appears stating "It appears that your system either does not have the software needed to view the requested document or, if it does, the software is not properly conf

  • Problem with my config

    Hello, I have the following goals of implementing my 877w: 1) Two vlans, one for wired, one for wireless. 2) DHCP giving IP leases for both vlans, using a pool for each vlan. 3) Allowing the clients of both vlans to access the internet through my ads