Start workflow using javascript

function AfterSave() {
alert("in");
var scriptbase = _spPageContextInfo.webAbsoluteUrl + "/_layouts/15/";
$.getScript(scriptbase + "SP.js", function () {
$.getScript(scriptbase + "SP.Runtime.js", function () {
$.getScript(scriptbase + "SP.WorkflowServices.js", function () {
var itemId=5;
var subscriptionId = '{8891EB88-D7F6-495B-A420-877E74754522}';
var clientContext = SP.ClientContext.get_current();
var web = clientContext.get_web();
clientContext.load(web);
var wfManager = SP.WorkflowServices.WorkflowServicesManager.newObject(clientContext, clientContext.get_web());
clientContext.load(wfManager);
alert("in2");
var subscription = wfManager.getWorkflowSubscriptionService().getSubscription(subscriptionId);
clientContext.load(subscription);
alert("in3");
clientContext.executeQueryAsync(
function(sender, args){
alert("Subscription load success. Attempting to start workflow.");
var inputParameters;
wfManager.getWorkflowInstanceService().startWorkflowOnListItem(subscription, itemId, inputParameters);
clientContext.executeQueryAsync(
function(sender, args){ alert("Successfully starting workflow."); },
function(sender, args){
alert("Failed to start workflow.");
alert("Error: " + args.get_message() + "\n" + args.get_stackTrace());
function(sender,args){
alert("Failed to load subscription.");
alert("Error: " + args.get_message() + "\n" + args.get_stackTrace());
function closeInProgressDialog() {
if (dlg != null) {
dlg.close();
function showInProgressDialog() {
if (dlg == null) {
dlg = SP.UI.ModalDialog.showWaitScreenWithNoClose("Please wait...", "Waiting for workflow...", null, null);
hi friends
i am using above code to start workflow
there is no error in code but it is not starting.
please help me to figure out my problem

Hi,
You can't start workflow in Javascript object model in SP 2010
http://social.technet.microsoft.com/Forums/sharepoint/en-US/84659489-eba7-4a41-a137-820b01d4bc69/start-a-sharepoint-2010-workflow-using-javascript?forum=sharepointgeneralprevious
Please remember to click 'Mark as Answer' on the answer if it helps you

Similar Messages

  • Using javascript:SP.UI.ModalDialog.showModalDialog with Workflow Initiation

    I'm trying to use "javascript:SP.UI.ModalDialog.showModalDialog" with a workflow initiation page.  I can get it to start but the "Cancel" Button doesn't work.  Can anyone give me a clue?
    javascript:SP.UI.ModalDialog.showModalDialog({url:"{SiteUrl}/Workflows/Assign%20Corrective%20Action/Assign%20Corrective%20Action.aspx?List={ListId}&ID={ItemId}&Source={Source}",title:"Custom Form"});return false;
    David Jenkins

    Hi David,
    To reproduce this issue, Could you give me your detailed process and code?
    In addition, for the 'Cancel' and 'Start' buttons, if you want to reture to the original page after clicking, you can open the custom workflow and create a rule and add a 'Close the form' action for the two button.
    Here is an article about starting a workflow with a initiated parameters through JavaScript, please take a look at:
    http://www.sharepointblogs.be/blogs/timmy/archive/2011/09/15/starting-a-workflow-with-a-initiated-parameters-through-javascript.aspx
    I hope this helps.
    Thanks,
    Wendy
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Wendy Li
    TechNet Community Support

  • Issue while starting a workflow using a form submission cq5

    Hi,
    I have followed the below mentioned tutorial and completed it.
    http://dev.day.com/docs/en/cq/current/workflows/create-models.html#par_reference
    Once done, I did try to start the workflow using a normal form submission, by giving workflow name in the "Start Workflow" box.
    Once clicked it will send the notification to my inbox, and when I double click, the form 1 will be displayed. Once submitted form two will be displayed.
    But when I submit the form 2, it thorws the below exception.
    But when I start the same workflow using the sidekick, It works perfectly fine. I am guessing that the {payload}.html is not getting set when the WF is initaited by a form submission.
    Could you please help with this. Thank you !
    Exception
    Not Found
    Cannot serve request to /content/usergenerated/mywebsite/en/products/product12/cq-gen1361441037192/1361448480595_ 27.html in org.apache.sling.servlets.get.DefaultGetServlet
    Request Progress:
          0 (2013-02-21 17:38:19) TIMER_START{Request Processing}
          0 (2013-02-21 17:38:19) COMMENT timer_end format is {<elapsed msec>,<timer name>} <optional message>
          0 (2013-02-21 17:38:19) LOG Method=GET, PathInfo=/content/usergenerated/mywebsite/en/products/product12/cq-gen1361441037192/13614 48480595_27.html
          0 (2013-02-21 17:38:19) TIMER_START{ResourceResolution}
          1 (2013-02-21 17:38:19) TIMER_END{1,ResourceResolution} URI=/content/usergenerated/mywebsite/en/products/product12/cq-gen1361441037192/1361448480 595_27.html resolves to Resource=JcrNodeResource, type=sling:Folder, superType=null, path=/content/usergenerated/mywebsite/en/products/product12/cq-gen1361441037192/136144848 0595_27
          1 (2013-02-21 17:38:19) LOG Resource Path Info: SlingRequestPathInfo: path='/content/usergenerated/mywebsite/en/products/product12/cq-gen1361441037192/13614484 80595_27', selectorString='null', extension='html', suffix='null'
          1 (2013-02-21 17:38:19) TIMER_START{ServletResolution}
          1 (2013-02-21 17:38:19) TIMER_START{resolveServlet(JcrNodeResource, type=sling:Folder, superType=null, path=/content/usergenerated/mywebsite/en/products/product12/cq-gen1361441037192/136144848 0595_27)}
          1 (2013-02-21 17:38:19) TIMER_END{0,resolveServlet(JcrNodeResource, type=sling:Folder, superType=null, path=/content/usergenerated/mywebsite/en/products/product12/cq-gen1361441037192/136144848 0595_27)} Using servlet org.apache.sling.servlets.get.DefaultGetServlet
          1 (2013-02-21 17:38:19) TIMER_END{0,ServletResolution} URI=/content/usergenerated/mywebsite/en/products/product12/cq-gen1361441037192/1361448480 595_27.html handled by Servlet=org.apache.sling.servlets.get.DefaultGetServlet
          1 (2013-02-21 17:38:19) LOG Applying Requestfilters
          1 (2013-02-21 17:38:19) LOG Calling filter: org.apache.sling.bgservlets.impl.BackgroundServletStarterFilter
          1 (2013-02-21 17:38:19) LOG Calling filter: org.apache.sling.rewriter.impl.RewriterFilter
          1 (2013-02-21 17:38:19) LOG Calling filter: com.day.cq.wcm.core.impl.WCMRequestFilter
          1 (2013-02-21 17:38:19) LOG Calling filter: org.apache.sling.i18n.impl.I18NFilter
          1 (2013-02-21 17:38:19) LOG Calling filter: com.day.cq.theme.impl.ThemeResolverFilter
          1 (2013-02-21 17:38:19) LOG Calling filter: com.day.cq.wcm.foundation.forms.impl.FormsHandlingServlet
          1 (2013-02-21 17:38:19) LOG Calling filter: org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter
          1 (2013-02-21 17:38:19) LOG Calling filter: com.day.cq.wcm.mobile.core.impl.redirect.RedirectFilter
          1 (2013-02-21 17:38:19) LOG RedirectFilter did not redirect (MobileUtil.isMobileResource() returns false)
          1 (2013-02-21 17:38:19) LOG Calling filter: com.day.cq.wcm.core.impl.warp.TimeWarpFilter
          1 (2013-02-21 17:38:19) LOG Applying Componentfilters
          1 (2013-02-21 17:38:19) LOG Calling filter: com.day.cq.wcm.core.impl.WCMComponentFilter
          1 (2013-02-21 17:38:19) LOG Calling filter: com.day.cq.wcm.core.impl.WCMDebugFilter
          1 (2013-02-21 17:38:19) TIMER_START{org.apache.sling.servlets.get.DefaultGetServlet#0}
          1 (2013-02-21 17:38:19) LOG No renderer for extension html
          1 (2013-02-21 17:38:19) LOG Applying Error filters
          1 (2013-02-21 17:38:19) LOG Calling filter: org.apache.sling.rewriter.impl.RewriterFilter
          1 (2013-02-21 17:38:19) TIMER_START{handleError:status=404}
          1 (2013-02-21 17:38:19) TIMER_END{0,handleError:status=404} Using handler /libs/sling/servlet/errorhandler/404.jsp
          2 (2013-02-21 17:38:19) LOG Found processor for post processing ProcessorConfiguration: {contentTypes=[text/html],order=-1, active=true, valid=true, processErrorResponse=true, pipeline=(generator=Config(type=htmlparser, config={}), transformers=(Config(type=linkchecker, config={}), Config(type=mobile, config=org.apache.sling.jcr.resource.JcrPropertyMap@88fc5d1), Config(type=mobiledebug, config=org.apache.sling.jcr.resource.JcrPropertyMap@170420bb), Config(type=contentsync, config=org.apache.sling.jcr.resource.JcrPropertyMap@1000e0cb), serializer=Config(type=htmlwriter, config={}))}
          2 (2013-02-21 17:38:19) TIMER_END{2,Request Processing} Dumping SlingRequestProgressTracker Entries
    ApacheSling/2.2 (Day-Servlet-Engine/4.1.24, Java HotSpot(TM) 64-Bit Server VM 1.7.0_07, Windows 7 6.1 amd64)

    Hi chamila,
        I never tried the example. Exception is not clear. Could you please post more stack trace from log files.
    Thanks,
    Sham

  • Error in starting workflow queue listener

    I have registered jobs with OEM using Warehouse builder workflow deployment
    wizard. Following jobs has been registerd with OEM :
    1) ACRM_IWF_ACRM_PWF
    2)ACRM_IWF_OWB_STD_BEGIN
    3) ACRM_IWF_OWB_STD_END
    4) ACRM_IWF_OWB_STD_ERROR
    Now i submit "ACRM_IWF_ACRM_PWF" from the OEM . I shows me status of the JOB as
    "Failed" and gives the following error message:
    Error in starting workflow listener: ** Initializing queue listener
    ** Initialized queue listener
    ** Recovering item type ACRM_IWF
    ** In recovery mode
    ** Recovery complete
    ** Processing all item types
    ** Waiting to dequeue message in listener
    ** Processing job 0x4143524D5F4957465F4F57425F5354445F424547494E
    Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String
    index out of range: -1
    at java.lang.String.substring(String.java:1085)
    at
    oracle.wh.runtime.workflowrt.QueueListener.parseParameters(QueueListener.java:10
    03)
    at oracle.wh.runtime.workflowrt.QueueListener.startJob(QueueListener.java:798)
    at
    oracle.wh.runtime.workflowrt.QueueListener.processJobs(QueueListener.java:746)
    at
    oracle.wh.runtime.workflowrt.QueueListener.initAndRun(QueueListener.java:299)
    at oracle.wh.runtime.workflowrt.QueueListener.main(QueueListener.java:197)
    1

    This is not actually a Workflow component, this is part of the Oracle Warehouse Builder product, although the name is similar to the Workflow Agent Listener in v2.6.
    I have registered jobs with OEM using Warehouse builder workflow deployment
    wizard. Following jobs has been registerd with OEM :
    1) ACRM_IWF_ACRM_PWF
    2)ACRM_IWF_OWB_STD_BEGIN
    3) ACRM_IWF_OWB_STD_END
    4) ACRM_IWF_OWB_STD_ERROR
    Now i submit "ACRM_IWF_ACRM_PWF" from the OEM . I shows me status of the JOB as
    "Failed" and gives the following error message:
    Error in starting workflow listener: ** Initializing queue listener
    ** Initialized queue listener
    ** Recovering item type ACRM_IWF
    ** In recovery mode
    ** Recovery complete
    ** Processing all item types
    ** Waiting to dequeue message in listener
    ** Processing job 0x4143524D5F4957465F4F57425F5354445F424547494E
    Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String
    index out of range: -1
    at java.lang.String.substring(String.java:1085)
    at
    oracle.wh.runtime.workflowrt.QueueListener.parseParameters(QueueListener.java:10
    03)
    at oracle.wh.runtime.workflowrt.QueueListener.startJob(QueueListener.java:798)
    at
    oracle.wh.runtime.workflowrt.QueueListener.processJobs(QueueListener.java:746)
    at
    oracle.wh.runtime.workflowrt.QueueListener.initAndRun(QueueListener.java:299)
    at oracle.wh.runtime.workflowrt.QueueListener.main(QueueListener.java:197)
    1

  • How to get page number from the PDF using Javascript

    Hi,
    We are having list of Single page PDF. The pdf are named in the order,
    ISBN_Author_01.PDF  (with real page number as i)
    ISBN_Author_02.PDF  (with real page number as ii)
    ISBN_Author_03.PDF  (with real page number as iii)
    ISBN_Author_04.PDF  (with real page number as 1)
    ISBN_Author_05.PDF  (with real page number as 2)
    ISBN_Author_06.PDF  (with real page number as 3)
    ISBN_Author_nn.PDF  (with real page number as 500)
    Here each pdf has a page number and in sequential order.
    The task is to check whether all the pdfs are in sequential order (i.e i, ii, iii, 1, 2, 3). If any page is missing, the script should throw an error report.
    To do this task, I am writing a Javascript to get the real page number from the PDF.
    Can anybody help me how to get the page number from the PDF using Javascript.
    Thanks,
    Gopal

    The "real" page number within a PDF is the count of the physical page starting at 0, zero.
    pageNum numPages
    The number printed on each page is the page label.
    setPageLabels  getPageLabel
    You will have to open each PDF and your script would need to know the page label for that file. I would expect you would need to build a 2 dimensional  array of the file names and the page label for the page within that array.

  • How can I use JavaScript extention functions with Xalan for transforming XML with XSL

    While transforming standart XML and XSL files to HTML with this servlet:
    package mypackage1;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import java.util.*;
    import java.net.URL;
    import javax.xml.transform.*;
    import javax.xml.transform.stream.StreamSource;
    import javax.xml.transform.stream.StreamResult;
    import org.mozilla.javascript;
    public class Servlet2 extends HttpServlet
    private static final String CONTENT_TYPE = "text/html; charset=windows-1252";
    public void init(ServletConfig config) throws ServletException
    super.init(config);
    public void doGet(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException
    try
    response.setContentType(CONTENT_TYPE);
    PrintWriter out = response.getWriter();
    TransformerFactory tFactory = TransformerFactory.newInstance();
    Source xmlSource = new StreamSource(new FileReader("c:/aaa.xml"));
    Source xslSource = new StreamSource(new FileReader("c:/bbb.xsl"));
    Transformer transformer = tFactory.newTransformer(xslSource);
    transformer.transform (xmlSource, new StreamResult(out));
    catch (Exception e)
    e.printStackTrace();
    everything is going ok,
    but when try to use javascript function in XSL file, for example like in this:
    <?xml version="1.0"?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
    xmlns:lxslt="http://xml.apache.org/xslt" xmlns:my-ext="ext1"
    extension-element-prefixes="my-ext">
    <lxslt:component prefix="my-ext"
    functions="getdate">
    <lxslt:script lang="javascript">
    function getdate() {
    var d = new Date();
    return d.toUTCString();
    </lxslt:script>
    </lxslt:component>
    <xsl:template match="/">
    <p><xsl:copy-of select="my-ext:getdate()"/></p>
    </xsl:template>
    </xsl:stylesheet>
    recieve error-message:
    XSL-1000: (Fatal Error) Error while parsing XSL file (Extension function namespace should start with 'http://www.oracle.com/XSL/Transform/java/'.).
    What kind of namespace I should specify?

    Hello, Paul.
    I'm sure you may not use JavaScript as a language for creating XSLT extention functions with Oracle XDK Parser. This is since parser might have JavaScript interpreter to work with JavaScript, but it has not.
    If you need to build any XSLT extention functions you must build them as Java class' static methods.
    After that, you define the usage of the class by mean of namespace declaration as:
    xmlns:your-ns="http://www.oracle.com/XSL/Transform/java/yourpackage.Yourclass"
    (Prefix "http://www.oracle.com/XSL/Transform/java/" may differs if you use non-Oracle XML parser)
    and use class' static method in XSLT:
    <xsl:value-of select="your-ns.staticMethodName(paramsIfAny)"/>
    In your case you may wish to use standard Date class:
    xmlns:date="http://www.oracle.com/XSL/Transform/java/java.util.Date"
    <xsl:value-of select="date:toString(date:new)"/>

  • Getting error while publishing workflow using SP designer for SharePoint 2013

    Hi,
    I am try to setup Workflow manager for our sharepoint applications.
    WF manager set ran without any issue.
    I registered the SPWorkflow service which succeeded as well. The Workflow service application shows "Workflow is connected"
    I am creating a workflow using sharepoint designer using my credential (not Service account). I am able to save it but while publishing, its prompting with an error.
    The error says "Errors were found while compiling the workflow.The workflow files were saved but cannot run." Clicking advanced button show
    "Microsoft.SharePoint.SPException: We're sorry, we weren't able to complete the operation, please try again in a few minutes. If you see this message repeatedly, contact your administrator.
       at Microsoft.SharePoint.SPScaleOutDatabaseMap.CreateSqlSession(ISPScaleOutDatabaseMapProvider mapProvider, Byte[] compositeKey, Guid forceRefreshVersion, Guid& version)
       at Microsoft.SharePoint.SPScaleOutDatabaseCommandExecutor.Execute(ExecuteDelegate operation, ISPScaleOutDatabaseMapProvider mapProvide"
    Any help would be highly appreciated
    Thanks,

    Hi,
    According to your post, my understanding is that you got error while publishing workflow using SharePoint designer for SharePoint 2013.
    Please check whether the Central Admin > Manage Service Application-> “App Management Service” is started.
    Please check whether the “Configure service application associations”,  ”App Management Service” is already associated.
    Then please check whether the “Manage Services on server” and the “App Management Service” is started.
    In addition, please try to re-register Workflow Service.
    If the issues still exists, please follow the steps in the
    Steps to Verify that Server Is Correctly Set Up. After you verified that the server is correctly set up, follow the steps in the
    Steps to Troubleshoot Workflow Management Service and
    Troubleshooting the Service Bus for Windows Server then retry your action related to publishing workflows
    More information:
    http://wp.ahcheng.com/2013/03/23/error-were-found-when-compiling-the-workflow-the-workflow-files-were-saved-but-cannot-be-run/
    http://sp2013.pro/2013/04/solution-errors-were-found-when-compiling-the-workflow-the-workflow-files-were-saved-but-cannot-be-run-cannot-set-unknown-member/
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • How to know if a file browser item is not null using javascript fucntion

    Hi
    <br><br>
    I tried to use javascript for validation. I have a file browser item named P55_FILE_NAME and I would like to know if this item is null or not before submit.
    <br>
    I wrote this function :<br><br>
    function validate_import(f_n){<br>
         if (trim(document.getElementByName(f_n).src) == "")<br>
         {<br>
         alert ("File name is empty.");<br>
         document.getElementByName(f_n).focus();<br>
         }<br>
         else{<br>
         doSubmit('SUBMIT');<br>
         }<br>
    } <br><br>
    When I press submit button I got an error, sounds like the src method does not exist in my input item. <br>
    Then, I looked my source page an I found this :<br><br>
    input type="file" name="p_t01" size="30"
    <br><br>
    there is know src method and the name is not P55_FILE_NAME and I don't want to use <b>p_t01</b> that will change.<br>
    <br>
    I need your help.<br>
    Benn

    Hello,
    The p_txx notation is the internal name the ApEx engine attaches to each page item. It starts with p_t01 (for the first item on page) and can end with p_t99 (hence, the max 99 items per page limit). You can see these names in your HTML source code.
    The bug in the File Browse item (fixed in version 2.2) is that the ID of the item is the internal name instead of the item name. Hence, in order to use DOM, you need to use this internal notation.
    If the File Browse item id is p_t01, you can null its content by using something like that (V2.0 notation) :
    html_GetElement('p_t01').value = '';I'm using the same, and similar code, for manipulating this type of item with no problems.
    Please document the use of this workaround, as when you'll upgrade your ApEx system, you will have to change this code back to the standard – item id equal item name.
    (Please follow Scott's advise, and keep your logic connected issues on the same thread. It will get you more quick and accurate help).
    Regards,
    Arie.

  • Generic object services (GOS) - Start workflow box is allways empty

    Dear colleagues,
    i have installed a brand new IDES ERP 6.0 successfully but when entering a number of standard transactions like mm02, va03, fb03 etc and trying to execute the GOS toolbox, I can never start any workflow. I click on the 'start workflow' button of the GOS-toolboy but the selection box is allways empty. Did I miss anything? Since there are so many BOR objects that apply to the objects of the standard transactions, there should be at least something to start. For example BOR BUS1001 (material master): When in MM02, why does the GOS-toolbox for workflows not show the related workflows that use BUS1001?
    Thank you very much for your answers
    Best regards
    Daniel

    Udo,
    You should start a new discussion - you'll get more responses.
    Anyhoo, to make a workflow appear in the GOS 'start workflow' list, just follow these simple rules:
    - confirm which BOR object is involved in your transaction (eg BUS1001006 for MM03)
    - make sure that the BOR object is a mandatory input of your workflow
    - make sure that there are no other mandatory inputs
    - make sure that the workflow (WS*) is set to 'General Task' (nb this is client dependent)
    Once all these things are done, refresh the buffer (SWU_OBUF) and it should work.
    cheers
    Paul

  • How to create business operation for starting workflows

    How to create business operation for starting workflows from worklist?
    When I call methods that implements business operation from java class everything
    works fine(wlpi-ejb.jar is required), but when I call business operation from
    Studio I can't use classes from wlpi-ejb.jar.

    Business operation is called by WLIS. So, I include wlpi-ejb.jar into WLIS classpath.
    Studio uses deployed EJB from wlpi-*.jar, I don't know why Studio doesn't see
    methods from deployed EJBs when WLIS classpath contains wlpi-ejb.jar.
    "Andrew Pitonyak" <[email protected]> wrote:
    >
    When studio starts, what is your classpath? If you use the included batch
    file to start it, then your class path may not include this :-)
    Andrew
    "Raul" <[email protected]> wrote in message
    news:[email protected]..
    How to create business operation for starting workflows from worklist?
    When I call methods that implements business operation from java classeverything
    works fine(wlpi-ejb.jar is required), but when I call business operationfrom
    Studio I can't use classes from wlpi-ejb.jar.

  • What is the Design to Deployment Workflow using DW with WordPress?

    I am a Designer and Developer/programmer. This is a complete workflow question: What is the Design to Deployment Workflow using DW with WordPress? For example, is it:
    PS/IL > DW > WP? (Photoshop or Illustrator, Dreamweaver, WordPress?)
    Or is Edge Reflow inserted between PS and DW?
    PS > ER > DW > WP?
    Are these workflows iterative and, whats the word, recursive - we are able to go back and forth?
    My understanding is that the Edge tools are not up to the coding standards of DW, and ER > DW (Edge Reflow to Dreamweaver) is not seamless or even practical.
    Where does the Stack come in? MAMP (or LAMP/WAMP) of course, jQuery/jQuery UI, WordPress and other items; how integrated are these things?
    I used to be a Flex developer and quite comfortable with the Design to Dynamic Deployment workflow of Illustrator or Photoshop to Flash Catalyst to Flash Builder; moreover, I thought the Eclipse IDE was excellent with its database introspection capabiliities, debugging etc. Adobe really pushed this workflow, then instead of innovating and standing behind its own product with 98% market penetration, Adobe disembowelled Flash right before everyones eyes.
    What about Prototyping, which is certainly part of the process? Fireworks is on the kibosh. Illustrator, while excelling at some aspects falls short of making a functional prototype (unless you're tying in Acrobat to link the pages), and while Photoshop is Edge Reflows darling, Edge seems redundant with DW and spits out twacky code.
    (Muse of course is unusable for professional developers, but it makes you wonder why some of those UI elements where not employed in DW whose interface seems antiquated by comparison).
    It seems Adobe is bloody all over the place, more like a rabbing drunk with a microphone rather than the dependable go-to software company for creatives the world over.
    In my opinion, workflow from beginning to end is important. Having a million different options to try to accomodate everyone is not. Some guidance in this department is greatly appreciated!
    Best,
    Dylan

    I have not used Edge Reflow myself.  Nor do I espically like WordPress.  But my typical workflow is:
    PS for Design Concept and web images.
    DW for CSS, HTML & JavaScript.
    3rd party editors like Zend Studio & Navicat for PHP & MySql development.
    Nancy O.

  • Using Javascript to require 2 drop down menus to have something selected

    Hi everyone. I'm trying to get 2 drop down menus to each have something selected when the form is submitted. I'm using javascript for this, but I can't get it to work. Basically, if one is blank and the other one isn't, I want an error to pop up saying they have to fill in the one that is blank and vice versa. What am I doing wrong? Here's what I have for the javascript and on the form below. My 2 drop down names are Mfg_Spec_Prod_Approval_Initials and Mfg_Spec_Prod_Approval_Rev. Thanks for anyone's help!
    Andy
    <SCRIPT LANGUAGE="JavaScript">
            function verify() {
                var partNumber = '';
                var ecoNumber = '';
                var ProdInit;
                var ProdInitValue='';
                var ProdRev;
                var ProdRevValue='';
                var allArray = document.getElementById('listofids').value.split(",");
                var error=false;
                for(var i=0;i<allArray.length;i++) {
                    ProdRev = document.getElementById('Mfg_Spec_Prod_Approval_Rev'+allArray[i]);
                    ProdInit = document.getElementById('Mfg_Spec_Prod_Approval_Initials'+allArray[i]);
                    ProdRevValue = ProdRev[ProdRev.selectedIndex].value;
                    ProdInitValue = ProdInit[ProdInit.selectedIndex].value;
    <!--- This code is if the BOM Initials is not empty and the PNR Initials is empty.--->
                    if(ProdInitValue != '' && ProdRevValue == '') {
                        error=true;
                        ecoNumber = document.getElementById('ECID'+allArray[i]).value;
                        partNumber = document.getElementById('Part_Number'+allArray[i]).value;
                        alert("You must enter a Rev for ECO " + ecoNumber + " Part Number: " + partNumber);
                    else if(ProdRevValue != '' && ProdInitValue == '') {
                        error=true;
                        ecoNumber = document.getElementById('ECID'+allArray[i]).value;
                        partNumber = document.getElementById('Part_Number'+allArray[i]).value;
                        alert("You must enter your initials for ECO " + ecoNumber + " Part Number: " + partNumber);
                if(error) {
                return false;
            else {
                return true;
        </script>
    Start of form
    <cfform name="EditItem" method="post" action="My_Machining_action.cfm" onsubmit="return verify();">
    <cfset MfgSpecProdInitials = DocumentationSearch.Mfg_Spec_Prod_Initials>
    <td align="center">
    <cfif Mfg_Spec_Prod_Initials Is Not ""<!---  and Mfg_Spec_Prod_Initials EQ cookie.UserInitials --->>
    <select name="Mfg_Spec_Prod_Approval_Initials#ItemID#" id="Mfg_Spec_Prod_Approval_Initials#ItemID#">
    <option value=""></option>
    <cfloop query="ShowProdInitials">
    <option value="#Initials#"
    <cfif #Initials# EQ MfgSpecProdInitials>selected</cfif>>#Initials#</option>
    </cfloop>
    </select>
    <cfelse>
    </cfif>
    </td>
    <cfset MfgSpecProdRev = DocumentationSearch.Mfg_Spec_Prod_Rev>
    <td align="center">
    <cfif Mfg_Spec_Prod_Initials Is Not ""<!---  and Mfg_Spec_Prod_Initials EQ cookie.UserInitials --->>
    <select name="Mfg_Spec_Prod_Approval_Rev#ItemID#" id="Mfg_Spec_Prod_Approval_Rev#ItemID#">
    <option value=""></option>
    <cfloop query="ShowDocRevChoices">
    <option value="#Doc_Rev_Initials#"
    <cfif #Doc_Rev_Initials# EQ MfgSpecProdRev>selected</cfif>>#Doc_Rev_Initials#</option>
    </cfloop>
    </select>
    <cfelse>
    </cfif>
    </td>
    <input type="submit" value="Update">

    Eddie,
       I actually got this javascript below to work so if one drop down is left blank, and the other one is filled out, an error will pop up saying to entering either some initials or a rev. The only problem is that I have a dynamic list of drop downs in rows, so I need this javascript to run for each row. If I do the 1st row with 1 drop down selected and the other not, it gives me the error, which is perfect. But if I want the 2nd row to error out, for instance, doing the same thing, the error will not pop up. How do I make this work so it does this for each row since the list of drop downs is dynamic? My drop down menu names are Mfg_Spec_Prod_Approval_Initials and Mfg_Spec_Prod_Approval_Rev.
    <script type="text/javascript">
                        function verify() {
                            var Mfg_Spec_Prod_Approval_Initials = document.getElementById('Mfg_Spec_Prod_Approval_Initials');
                            var Mfg_Spec_Prod_Approval_Rev = document.getElementById('Mfg_Spec_Prod_Approval_Rev');
                            if(Mfg_Spec_Prod_Approval_Initials.selectedIndex == '' && Mfg_Spec_Prod_Approval_Rev.selectedIndex != '') {
                                alert('select Initials!');
                                return false;
      else if(Mfg_Spec_Prod_Approval_Rev.selectedIndex == '' && Mfg_Spec_Prod_Approval_Initials.selectedIndex != '') {
                                alert('select a Rev!');
                                return false;
                            return true;
                    </script>
    Andy

  • Using javascript to change the "Overall Result" cell in WAD

    Hi experts,
    I am trying to use javascript to change the text of the "Overall Result" cell in my web template using BI 7.0. I am not familiar with javascript, but I this is what I have done so far.
    I dragged the web item "Script" into my web template and I inserted the following code:
    function change_overall_result_to_average() {
    var cell = document.getElementsByTagName("TD");
    var cellText;
    for (i = 0; i < cell.length; i++)
          cellText = cell<i>.innerText;
               if (cellText == "Overall Result")
                     cell<i>.innerText = "Average";               
    In the XHTML view I am using added the onload function to start the javascript every time the web template is loaded. The code works fine when the web template is first loaded and the cell text is changed to "Average". However, if I navigate in my web template, the javascript function is not triggered, and the cell is therefore changed back to "Overall Result". For example, this happens when I pick another selection from one of my dropdown boxes, such as changing the selection from year 2008 to year 2007.
    I don't really know how to solve this problem in an easy way, and the current solution is not good enough. I hope one of you guys can suggest an easy way of fixing this:-)
    Best Regards,
    Morten

    Woodstock apparently renders some Javascript/DOM with some homegrown widget framework which on its turn renders the HTML DOM tree instead of plain vanilla HTML. Correct me if I'm wrong, to confirm this, just view the generated HTML source of the page.
    After some Googling I found out that you need getProps() and setProps() to get and set element attributes respectively.
    [http://google.com/search?q=webuijsf+domnode+site:sun.com].
    If you stucks with this, I recommend you to post this question at a forum or mailinglist devoted to Woodstock, e.g at their own homepage at dev.java.net or the Netbeans forum at nabble.com. You're here at a Sun JSF forum, not at a Woodstock forum.

  • How to trigger a workflow using generic object services?

    Hi Experts,
    Let me know on how to trigger a workflow using generic object services.
    My requirement is to trigger the FI document reversal document using Object services.
    Any info or docs relevant to this, please share with me..
    Thanks,
    Dinesh.

    Dinesh,
    First of you need to check if the transaction has a BO (in released status) published to use the GOS.
    These are the pre-requisites for GOS
    http://help.sap.com/saphelp_46c/helpdata/en/94/aa532cddd511d289860000e8216438/content.htm
    Once done.. check that you have valid workflow linkages active for this BO.
    Now when you click on the 'start workflow' the system will show all relevant workflows for the BO to choose from and to start.

  • How can I use javascript in a Text Area with HTML editor??

    My question is... how can I use javascript in Text Area with HTML editor??
    I can use javascript functions that change the content of Text Areas but i can´t if i try in text area with html editor....
    I need to limit number of characters in a text area with html editor and i can´t.
    could anybody help me please?

    I have been experiencing similar problems with the HTML Editor and have managed to find an answer that should start to answer some of my questions. The Apex HTML Editor Standard is actually an HTML editor called FCKeditor. The FCKeditor has a Javascript API that can be found at http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/JavaScript_API. Unfortuately this doesn't seem to give the whole answer and I found more at http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:49607.
    I needed to get the text entered within my html editor standard (e.g. P1_MYTEXT) and use it within my javascript function. I did this by using the following script
    <script language="JavaScript" type="text/javascript">
    function showtext(){
    var oEditor = FCKeditorAPI.GetInstance('P1_MYTEXT');
    var editortext = escape(oEditor.GetXHTML(oEditor.FormatOutput));
    alert(editortext);
    </script>
    Hope this helps.
    Matthew

Maybe you are looking for

  • "No airport card is installed" when power adapter is not connected

    Hi I am getting the "No Airport Card is Installed' message whenever my Macbook Pro does not have the power adapter connected. When the power is connected everything works fine. If it is disconnected, the airport icon turns grey, airport disappears, a

  • How to post a Movie into Itunes-STORE?

    Hi ! Im trying to find out if its possible to post a movie into Itunes-store. I build a Web-site where people can learn from movies. Some workshops... Now I would like to make it also on Itunes = Iphone.... Can anyone help me and explain how thats po

  • SFC printing set-up question

    Hi, I have problem wit printing SFCs after releasing the ShopOrder. We have Loftware in use. I have SO qty of 100. Then I release all SFCs. Depending on document settings (print by SFC / SO) I either get 1. One file with all SFCs information 2. One f

  • Can I run dota 2 on my MacBook Pro

    Do you guys think i can run DOTA 2 with my macbook pro (13 inch, Mid 2009)? OS X Yosemite Processor: 2.26 GHz Intel Core 2 Duo Memory: 2 GB 1067 MHz DDR3 Graphics: NVIDIA GeForce 9400M 256 MB

  • N73 restore backup on phone problems

    Hi! I made a backup using PC Suite and it was succesful, when I wanted to restore it back on my phone the process is also succesful, the phone then restarts but there is nothing there. None of the contacts etc is visible. Does anyone know how to rest