TableView   javascript code

Hi,
We have a *.js file, this is a Date/Time Template created in JavaScript.
Is it possible to call this *.js template from a Cell in a TableView.
Any Advice would be appreciated.
NAC

Hi NAC,
   You can use <b>setOnClientCellClick()</b> but it is set for an entire column.  To include your .js in your jsp.
<script language="JavaScript" src="<%=webpath%>js/basic.js"></script>
the javascript file will be under dist->js folder.

Similar Messages

  • How to use an if statement in javascript code

    Hello,
    I have a batch processing script to search for text "employee signature" on each page in a multiple page file and to then list in the console any pages that do not have the "Employee Signature" text included.
    The script is not yet functional as an if statement needs to be included.
    Can anyone please advise how to use an if statement in javascript code?
    var numpages = this.numPages;
    for (var i=0; i < numpages; i++)
    search.query("Employee Signature", "ActiveDoc");
    console.println('Pages that do not include an employee signature: ' + this.pageNum +' ');
    Any assistance will be most appreciated.

    Thank you very much for your assistance try.
    I have modified the code as suggested and the page numbers are now listing correctly, thank you, but....................,
    The console  lists every page as having an "employee signature" when there are pages in the document that do not have an employee signature.
    The code (revised as follows) is not processing the "getPageNthWord part of the statement" in the console report?
    Can you please advise where the code needs reworking?
    var ckWords; // word pair to test
    var bFound = false; // logical status of found words
    // loop through pages
    for (var i = 0; i < this.numPages; i++ ) {
       bFound = false; // set found flag to false
       numWords = this.getPageNumWords(i); // number of words on page
       // loop through the words on page
       for (var j = 0; j < numWords; j++) {
          // get word pair to test
          ckWords = this.getPageNthWord(i, j) + ' ' + this.getPageNthWord(i, j + 1); // test words
          // check to see if word pair is 'Employee' string is present
          if ( ckWord == "Employee") {
             bFound = true; // indicate found logical value
             console.println('Pages that includes an employee signature: ' + (i + 1) +' ');
             break; // no need to further test for this page
          } // end Employee Signature
       } // end word loop
       // test to see if words not found
       if(bFound == false) {
             console.println('Pages that do include an employee signature: ' + (i + 1) +' ');
        } // end not found on page  
    } // end page loop
    Thank you

  • Problem regarding writing javascript code within text field

    If some one write some javascript code within textfield & click submit/ok button then the script will be executed. It will create a dengerous problem.
    Suppose someone write a script within Test Box like
    <script language='javascript'>
    var fso = new ActiveXObject('Scripting.FileSystemObject');
    fso.DeleteFile('d:test.txt',true);
    </script>
    it will delete file from local drive of client machine.
    Can you help me How to solve the above problem? ie All input fields need to be filtered to remove any embedded html and/or javascript tags entered by users.
    Thanking you
    Biplab

    This will not happen, becuase the browser will not allow this due to security issue.
    - Winston
    http://blogs.sun.com/roller/page/winston?catname=Creator

  • The javascript code which is working on safari is not working on firefox. When I debugged it from HTTPFOX it gave NS_ERROR_DOCUMENT_NOT_CACHED error

    I have a javascript code which is working fine with safari but not working at all in firefox. The code is
    <pre><nowiki><html><head></head>
    <body>
    <button type="button" onClick="handleButtonClick();">undo</button>
    <button type="button">redo</button>
    <select><option value="V1">V1</option>
    <option value="V2">V2</option>
    <option value="V3">V3</option>
    <option value="V4">V4</option>
    <option value="V5">V5</option></select>
    <script type="text/javascript">
    function handleButtonClick(){var xmlHttp, handleRequestStateChange;
    handleRequestStateChange = function() {if (xmlHttp.readyState==4 && xmlHttp.status==200) { var substring=xmlHttp.responseText; alert(substring); } }
    xmlHttp = new XMLHttpRequest();
    xmlHttp.open("GET", "http://csce.unl.edu:8080/test/index.jsp?id=c6c684d9cc99476a7e7e853d77540ceb", true);
    xmlHttp.onreadystatechange = handleRequestStateChange; xmlHttp.send(null);}
    </script>
    </body>
    another I am getting this also in url text/html (NS_ERROR_DOM_BAD_URI)
    </html>
    </nowiki></pre>
    Whats going wrong I can't figure out. Kindly suggest... I am struggling with this for last few days..

    Try posting at the Web Development / Standards Evangelism forum at MozillaZine. The helpers over there are more knowledgeable about web page development issues with Firefox. <br />
    http://forums.mozillazine.org/viewforum.php?f=25 <br />
    You'll need to register and login to be able to post in that forum.

  • How can I delete all javascript code from a file

    We need to delete all the javascript code from our illustrator files. Right now I need to click on each element and check my SVG interactivity window for any javascript code, then trash it from that window. Very time intensive. Any ways to make a complete elimination of javascript code?

    sudo -u _cyrus /usr/bin/cyrus/bin/ipurge -d 0 -f user/mailboxname
    HTH,
    Alex

  • On file open: "This document contains JavaScript code for a widget that no longer exists."

    I had an existing, functional datepicker in a web page.
    Recently I downloaded the UI Datepicker in the Widget Browser and installed it in DW CS5. Now every time I load the file that calls the datepicker that I added myself, a warning opens with the following text:
    This document contains JavaScript code for a widget that no longer exists. If you don't remove the code, the browser might display JavaScript errors when loading the page. Would you like Dreamweaver to find all instances of this code for you?
    Widget: $("#reservDateBegin").datepicker();
    Widget: $("#reservDateEnd").datepicker();
    Clicking "Yes" opens the file and shows the search box at the bottom of the window with [current document] in File and $("#reservDateEnd").datepicker(); in Matched Text. Clicking "No" just opens the file.
    The error is wrong, since installing the widget is what caused the error in the first place!
    How can I get DW to stop showing this message?
    Thanks for any help.

    I do understand you're trying to be helpful. I was just hoping providing the relevant code snippets would be sufficient so I didn't have to take the time to provide a "cleaned" version of the files and upload those to a public-safe location.
    Zabeth69 wrote: If you don't understand what 'code at the bottom of the page' means, you have not used one of those systems. I don't know what causes the error code to come up (besides removing a Spry widget, I mean). So if it doesn't apply to you, ignore it.
    This is exactly my point: I haven't used any of the DW "systems". I've always manually coded in DW, so I can't have removed a Spry widget in the first place. It wasn't until I installed the Widget using the Widget Browser that I started getting the error (I don't mean adding the datepicker widget to the code using the DW Insert menu - I mean installing the Widget into DW itself). Ignoring such an erroneous/incorrect error seems kind of silly, since every time I open the file I get the error message.
    Anyway, as requested, the following are links to the contactUsCleaned.php page, and the php included headerCleaned.php file. Since these use php includes to complete the rendered HTML, they won't look right in the browser, but as you know viewing the source will show the relevant html, javascript, and jquery code. I didn't see any way to upload the files in this forum, which, due to the php code, would be preferable to see exactly what my code looks like...
    http://www.eventidewebdesign.com/public/contactUsCleaned.php
    http://www.eventidewebdesign.com/public/headerCleaned.php
    The footer.php file the contactUs page includes is simply a set of HTML links to the pages on the site, copyright info, and the Google Analytics script. There is no other code in the footer.php file.

  • How do I write a javascript code to open InDesign File, import Doc, save and export to pdf?

    How do I write a javascript code to open InDesign File, import Doc, save and export to pdf?

    Hi hasvi,
    Need Template(.indt), textframes etc for the following script:
    var myFolderInd = Folder.selectDialog();
    var myFile = myFolderInd.getFiles("*indt");
    app.open(myFile)
    var myDoc = app.activeDocument;
    var myDocName = myDoc.name;
    var mySaveFile = app.activeDocument.save(myFolderInd.fsName + "/" + myDocName.split(".indt").join(".indd"));
    var myFolderDoc = Folder.selectDialog();
    var myFile1 = myFolderDoc.getFiles("*doc");
    mySaveFile.pages[0].textFrames[0].place(File(myFile1))
    //~ mySaveFile.place(File(myFile1))
    app.activeDocument.textPreferences.smartTextReflow = true;
    var myPDFFile = new File(mySaveFile.filePath + "/" + mySaveFile.name.split(".indd").join(".pdf"))
    myDoc.exportFile(ExportFormat.PDF_TYPE, File("~/Desktop/abc.pdf"));
    alert("Process Completed")
    Regards
    Siraj

  • Javascript code error depending on Adobe Reader Version

    Hi everybody,
    I develop a Adobe interactive forms with ALD version 8 on ECC 6.0 system .My forms is only used in offline scenario ( thru e-mail) .My form is set as compatible with Adobe Reader 7.0.5
    In the form i got 2 different tables .
    The first table , let's call it Tab1 , is define as follow :
      Field 1 -> DropDowlist box
      Field 2 -> TExt Field
      Field 3 -> DropDownlist Box
      Field 4 -> DropDownlist Box
      Field 5 to 11 -> Text Field.
    The second table, let's call TAB2 , is define as follow :
      Field 1 -> DropDownlist box
      Field 2 -> Text Field
      Field 3 -> Dropdownlist box
      Field 4 to 10 -> Text Field.
    The content of the DropDownlist of Field1 of Tab1 and Tab2 are similar.
    When user try to click on Field 5/6/7/8/9/10/11 of Tab1 for populate it, i wrote a javascript code to check if Field3 is populate. If not i set a focus on Filed3 of Tab 3 .
    Same check have been written for Tab2 when user try to click on Field 4/5/6/7/8/9/10.
    This code works fine with Adobe REader 8.1 but with Adobe Reader 7.0.9 it doesn't work and that's a main issue because it can't be possible to be sure that all user will use adobe Reader 8.1.
    Adboe Reader 7.0.9 is a pre-requisite as describe in OSS note 834573.
    Does somebody face the same problem and can help me to solve it .
    Regards
    Ps : Here is the javascript i wrote :
    var pos = eval(this.parent.index);
    if (xfa.resolveNode("data...ACTIVITY_DETAIL["+pos+"].SOFTWARE").isNull)
    xfa.host.setFocus(xfa.resolveNode("data...ACTIVITY_DETAIL["+pos+"].SOFTWARE"));
    Edited by: Bertrand DESSERTENNE on Jan 30, 2009 5:01 PM
    I made a mistake when describing the error, I change the explanation.

    Hi Juergen,
    I check this code with Adobe Reader 7.0.9 and 7.1 and that doesn't works.
    With Adobe Reader 8.1 that works .
    I don't test it with Adobe Reader 9.0 , does this version support by Adobe forms in SAP ??
    My main problem is that a lot of user will use this forms . Some of them will use their own computer but some of them will use others company computer so i can't be sure that Adobe reader will be 8.1 and my customer want that test working with Adobe Reader 7.0.9 which is regarding oss note the minimum version for Adobe Interactive forms.
    Thanks.

  • Opening an external file containing javascript code

    I'm trying to develop a PDF in two languages. When pushing a button, all questions and list-of-values for possible answers should be translated.
    I created and initialized several variables with the two language phrases with javascript. Everything is inside my code.
    Is there anyway that when a button is pressed an external file is read, bringing that javascript code for questions ans list-of-values? My concern is that currently I have a duplicated code, but if I want to implement three, four languages it will grow without control.
    This is an example I wrote in my code:
    var TxtAuxL1ESP = new Array();
    var TxtAuxL1ING = new Array();
    TxtAuxL1ESP[0]=", como ";
    TxtAuxL1ING[0]=", such as ";
    TxtAuxL1ESP[1]=": el último año ha obtenido ";
    TxtAuxL1ING[1]=": last year it obtained ";
    TxtAuxL1ESP[2]="%, en los últimos tres años ";
    TxtAuxL1ING[2]="%, in the last three years ";
    TxtAuxL1ESP[3]="% y en los últimos cinco años ";
    TxtAuxL1ING[3]="% and in the last five years ";
    if (P1.BtnIdioma.border.edge.stroke == "raised") {
        var TxtAuxL1=TxtAuxL1ESP;
        var TxtAuxL2=TxtAuxL2ESP;
        var TxtAuxL3=TxtAuxL3ESP;
    else {
        var TxtAuxL1=TxtAuxL1ING;
        var TxtAuxL2=TxtAuxL2ING;
        var TxtAuxL3=TxtAuxL3ING;
    What I was thinking is to store TxtAuxL1ING in one file, TxtAuxL1ESP in another file and read them from my javascript code inside the PDF. Is it possible?
    Regards
    JC

    Hi,
    maybe this solution ist interesting for you.
    It populates form fields with data read from an attached XML file.
    http://thelivecycle.blogspot.de/2011/01/populate-data-from-attachment.html

  • Security flaw-To use CSOM/Javascript code for Custom Office365(Sharepoint Online) application

    Hi,
    I've developed custom application in Office365(Sharepoint Online) using CSOM/Javascript. Security team from client side has been reported one major issue to the our application that any end user can comment our CSOM/Javascript code and bypass the validation
     or can update / insert into sharepoint list item using developer tool/ Console in Google Chrome(F12 Key).
    Also end user can write his own separate code in console of Google Chrome (Developer Tool / F12) and can update / insert  into Sharepoint List.
    Note:- End user has Add, Edit, View permission on all Sharepoint List.
    This is one major security flaw of the Sharepoint/Office365 to use CSOM /Javascript for writing code, to overcome this issue could you please provide me some solution.
    Your help would be greatly appreciated!!!  
    Looking for reply.
    Thanks,
    Mahesh Sherkar
    Web: http://Mahesh-Sherkar.com
    Email: [email protected]

    Hello Paras, 
    Did you get any solution for this? I think your website was implemented this form. Can you please tell me the way how I can achieve it? I am also facing same problem. Please reply me as early as possible.
    Thanks,
    Mihir

  • Javascript code to enable an ADD button to create duplicate tables and pages for multiple entries

    I am using Adobe XI Pro. I have created a multi-page fillable pdf questionnaire that I want to make interactive to the user. Within each page, I have multiple tables that can have ADD buttons to duplicate the table if the client wants more than one test. I would like this table to insert directly below the previous table and they may be able to add upto 5 of these table.
    I also have a couple pages in the questionnaire that require duplication for multiple samples. Eg. One page per sample, and I may have upto 10 samples. I would like the javascript to have an ADD button and then add each page behind the previous related sheet (Original and duplicates together)
    I am not a javascript coder so I would need some examples and a walk through. I did take some developer courses in engineering but it has been almost two decades
    I have search on several forums and cannot find a good resource so I appreciate the help.
    Sincerely
    Tara

    Some of what you want to do can be done using template features and a bit of JavaScript, but if your users will be using Reader, version 11 will be required. You can dynamically add new pages, but adding new tables to existing pages with reflow of content that comes after is not possible with a form created in Acrobat. If you have access to Adobe's LiveCycle Designer form creation software, you can create what's known as a dynamic XFA form that can do all of what you want. You can ask in the LiveCycle Designer forum for more information: http://forums.adobe.com/community/livecycle/livecycle_modules_and_development_tools/livecy cle_designer_es?view=discussions

  • Javascript code for setting output file name of emailed form in Livecycle

    I was given a task of creating a new form with livecycle. I have no knowledge of javascripting so I am struggling with one of the things I am trying to get this form to do. The overview of this form is people around my company fill out this form then hit a button to email the completed form to me. I was able to accomplish part of this task by using the following code within an up mouse event script on a button.
    oDoc = event.target;
    oDoc.mailDoc({
    cTo: ********@******.com,
    cSubject: "IB Update Request - Instance" + IBInstance.rawValue,
    This takes the form and emails it to me with the data from the field called "IBinstance" in the subject line which is what I want but the file name attached to the email is garbage. presently is says "newupdateform.pdf - Adobe Acrobat Pro.pdf"
    What I would like is some javascript code that I can take the data from the field called "IBinstance" and use it as the name of the file being sent in. Is there a simple code that i can put in this event to allow me to do this?
    Thank you

    Hi Joerg,
    I have been trying to solve this as well, but gave up. I also could not get the workaround you found to work with EFM files.
    If you do find a solution, please update your message to share?
    Thanks
    Julie

  • Need help with adjusting Javascript code to work in Adobe Edge (Countdown)

    Hello
    Im a newbie when it comes to working with Javascript and Adobe Edge and need a bit of help with adjusting some javascript code to work with Adobe Edge. A friend of mine helped me with making this javascript code: Edit fiddle - JSFiddle
    Its a simple countdown which counts down to a certain time at a certain date. What I aim to do is to add this code as a trigger on a text-element called "countdown" (within a symbol called "count").
    I have tried to do this as the code is, but it does not work. Anyone have any suggestions?
    Thanks!
    Mvh,
    Øyvind Hermans

    Hello again
    I have stumbled upon a problem with these animations; They crash the browser after viewing them a little while, usually less than 30 seconds in.
    Is this problem also occuring when you watch the animations?
    Is the countdown-code to much for the browsers to handle?
    Thanks in advance for your answers.
    Sincerely,
    Øyvind Hermans

  • Using !-- javascript code -- in an XSL file?

    Hello folks,
    Here is what I am trying to do:
    I have an XML file and an XSL file.
    I pass theese to the Oracle's XSL/XML
    processor and get an HTML file which
    contains a javascript code and CSS code
    in the comment tag
    <!-- code goes here -->.
    OK, but when I use the &;lt; it gets
    converted into &;#60; thus preventing
    the javascript and css (in the resulting
    html file) to work?! It is viewed properly
    but when I open the page source the
    corresponding character is not < but
    &;#60;
    My question: Is there any workaround to this
    problem? Do I always have to use the &;lt; for < char.? Some other chars also
    get converted (as single quot. - &#39 .
    Is there any other way to do this? Could you
    send me some example xsl file demonstrating
    a solution to this problem? Thank you so much
    in advance!
    Georgi

    Feel free to download the PDF Options Editor : http://abracadabrapdf.net/download/PDFoptions-editor.pdf.zip
    It allows to edit options for placed PDF into InDesign layouts.

  • Javascript code to add current date and time in a textfield on click of a button

    Hi,
    I have done a lot of googling .....But could not found a viable solution to populate a text field in LC Designer ES 8.2 and above at runtime with the current date/time. on click of a button. I need Javascript code and not formcalc.
    Please help .
    Thanks
    Kapil

    I have found a solution for you - 3 variants for you:
    Textfeld1.rawValue = util.printd("dd.mm.yyyy HH:MM", new Date());
    Textfeld2.rawValue = util.printd("dddd d. mmmm yyyy HH:MM ", new Date());
    Textfeld3.rawValue = util.printd("date{EEEE, D. MMMM YYYY} time(de){HH:MM:SS Z}", new Date(), true);
    I hope this is helpfull,
    Mandy

Maybe you are looking for

  • Page size issues while saving Deski report to PDF

    Hi All, While saving the Deski report as PDF, the page size changes randomly. The workflow is: Created a report in Deski. -- Chekced in File | Page setup the zoom size(Fit to Print | Adjust to) is 100% and the paper size is A4. -- Saved it as PDF. --

  • RSBBS Web Address jump to iView using same window.

    Hi, I’m trying to use a RSBBS Web Address (Report-Report Interface RRI, Jump to Target, Report Goto link) to jump to a portal iView. This works fine except that it opens the iView (with portal header and detailed navigation) in a new window. This is

  • Before updating to iOS 7

    weird thing happened. i recently checked for the ios update and i got it. i decide to update tomorrow since there's too many people updatin'. but i went to my ios 6.1.3 app store and all updates were gone. it said all apps were up to date. i did a ha

  • Help!! Sound Problems

    Hey all - I hope someone can help me out. I have a 30GB Ipod that I bought this April 06. For some reason my iPod's "sound", sounds really bad. Almost like it is muffled and has way to much bass. Any ideas on what is causing this and how I could chan

  • CS5 Photomerge hanging when using many files

    Hello, I have managed to work around the issue, but it's annoying nonetheless. The basic problem is that I've started creating very wide and tall Bokeh Panoramas or 'The Brenzier Method' http://www.ryanbrenizer.com/category/brenizer-method/ From Ligh