Help avert my stupidity with Javascript in JSC

I'm trying to evaluate the value of a checkbox in the onClick event.<p>
I have the following code in the onClick event:<p>
alert('mouse up event'); <p>
if document.getElementByID("form1:checkbox1").checked {<p>
    alert('box is checked');<p>
} else {<p>
    alert('box is not checked');<p>
}<p>It doesn't work as shown, but if I only use the "alert" function, I get the expected message. <p>
Can someone tell me what's wrong ?
TIA
Jim

Hi,
Try adding the paranthesis for the condition after the if key word as follows:
if(document.getElementById('form1:checkBox1').checked){
alert("box is checked");
Hope that helps
Cheers
Giri

Similar Messages

  • Help validating param fields with Javascript

    Hi,
    Rpt Escapes: B4 Form Values, I added a javascript that validates the entered date_ranges(date_from -- date_to) -- must not be > 30 days. If I used that javascript in one of the param fields (web_settings:: Additional HTML = onChange="show_alert(this.form)") -- it works. but I need to put that alert when the user clicks the submit button, so in the Rpt Escapes:: Before Form Value, I changed this:
    <body dir=&Direction bgcolor="#ffffff">
    <form method=post action="_action_"> ** CHANGED THIS TO:
    <form method=post action="_action_" onSubmit="return show_alert(this.form);">
    <input name="hidden_run_parameters" type=hidden value="_hidden_">
    <font color=red><!--error--></font>
    <center>
    <p><table border=0 cellspacing=0 cellpadding=0>
    <tr>
    <td><input type=submit></td>
    <td width=15>
    <td><input type=reset></td>
    </tr>
    </table>
    <p><hr><p>
    --- but it's not working. any ideas?
    thanks!!!

    Hello,
    I have tried with the following code (Source HTML of the parameter form):
    <head>
    <base href="http://xxxxxxx/dev6i/rwcgi60.exe/getfile/repserver/5/14532348.htm">
    </head>
    <html>
    <body bgcolor="#ffffff">
    <script>
    function validate (form)
    alert(form.DEPARTEMENT.value);
    </script>
    <form method=post action="http://xxxxxxxxx/dev6i/rwcgi60.exe?" OnSubmit="javascript:validate(this);">
    <input name="hidden_run_parameters" type=hidden value="xxxxxxxxx">
    <center>
    <p><table border=0 cellspacing=0 cellpadding=0>
    <tr>
    <td><input type=submit></td>
    <td width=15>
    <td><input type=reset></td>
    </tr>
    </table>
    <p><hr><p>
    <!-- Created by Oracle Reports 12:59 Tue Aug 13 , 2002 -->
    <table border=0 cellspacing=0 cellpadding=0 width=337>
    <tr><td width=23><td width=60><td width=15><td width=17><td width=28><td width=127><td width=32><td width=34><td width=1>
    <tr><td colspan=9 height=19>
    <tr valign=top>
    <td height=9 colspan=4>
    <td width=155 colspan=2 rowspan=2><font face="Arial"><b>Report Parameters</b></font>
    <td colspan=3>
    <tr valign=top>
    <td height=9 colspan=4>
    <td colspan=3>
    <tr><td colspan=9 height=9>
    <tr valign=top>
    <td height=9 colspan=2>
    <td width=219 colspan=5 rowspan=2><font face="Arial"><b>Enter values for the parameters</b></font>
    <td colspan=2>
    <tr valign=top>
    <td height=9 colspan=2>
    <td colspan=2>
    <tr><td colspan=9 height=9>
    <tr valign=top>
    <td height=9>
    <td width=75 colspan=2><font size=2 face="Arial"><b>Departement</b></font>
    <td colspan=2>
    <td colspan=3 rowspan=3><INPUT type=TEXT name="DEPARTEMENT" size=27 maxlength=40 >
    <td>
    <tr valign=top>
    <td height=9 colspan=5>
    <td>
    <tr valign=top>
    <td height=9 colspan=5>
    <td>
    </table>
    </center>
    </body>
    </form>
    </html>
    and the value of the parameter DEPARTEMENT is displayed in a dialog box.
    Regards

  • Help: Start Folio Download With Javascript

    I hope this is the right forum.
    I have tried unsuccessfully using all the demos I could find on Adobe's site, to initiate a Folio download from Javascript. I have built a custom store front, and want the user to start a folio download, but I can't seem to find the right method on the adobe.dps.store object to make this happen. I thought buyFolio() would do the trick but no. Does anyone have suggestions or examples I can use? Thank you.

    I hope this is the right forum.
    I have tried unsuccessfully using all the demos I could find on Adobe's site, to initiate a Folio download from Javascript. I have built a custom store front, and want the user to start a folio download, but I can't seem to find the right method on the adobe.dps.store object to make this happen. I thought buyFolio() would do the trick but no. Does anyone have suggestions or examples I can use? Thank you.

  • Need Help with Javascript

    I posted a little bit ago, but solved part of the problem I'm having with this javascript. I'm new to javascript and am trying my best to understand how to do it. I have a lightbox script that I'm trying to edit so that I can have a different image be the starting point of the images in the lightbox, depending on which is clicked. Currently, no matter how I change the script, I have the same starting image. I think that I don't understand the handlers completely that affect the total script. Any help understanding these would be helpful.
    Here's the affected html:
        <div id="content_1" class="content">
                                  <img src="file1bottom.png" width="982" height="674" alt="Photos of Holston Room" usemap="#filmstripmap1">
                <map name="filmstripmap1" >
                           <area id="1" shape="poly" coords="732,91,884,97,877,198,718,187" class="open_lightbox" href="#" alt="Photo_1">
                   <area id="2" shape="poly" coords="724,205,874,214,868,312,717,301" class="open_lightbox" href="#" alt="Photo_2">
                   <area id="3" shape="poly" coords="717,324,872,332,862,432,713,420" class="open_lightbox" href="#" alt="Photo_3">
                   <area id="4" shape="poly" coords="711,440,865,447,857,547,709,537" class="open_lightbox" href="#" alt="Photo_4">
                   <area id="5" shape="poly" coords="470,150,617,130,628,231,483,245" class="open_lightbox" href="#" alt="Photo_5">
                   <area id="6" shape="poly" coords="481,260,630,247,641,347,491,361" class="open_lightbox" href="#" alt="Photo_6">
                   <area id="7" shape="poly" coords="492,380,644,363,654,460,504,477" class="open_lightbox" href="#" alt="Photo_7">
                   </map>
    <div class="lightbox-panel">
    <img id="photo1" src="HolstonImages/00.jpg" class="ntt_media_file" alt="Room Photo 1"/>
    <img id="photo2" src="HolstonImages/01.jpg" style="display:none;" class="ntt_media_file" alt="Room Photo 2"/>
    <img id="photo3" src="HolstonImages/02.jpg" style="display:none;" class="ntt_media_file" alt="Room Photo 3"/>
    <img id="photo4" src="HolstonImages/03.jpg" style="display:none;" class="ntt_media_file" alt="Room Photo 4"/>
    <img id="photo5" src="HolstonImages/04.jpg" style="display:none;" class="ntt_media_file" alt="Room Photo 5"/>
    <img id="photo6" src="HolstonImages/05.jpg" style="display:none;" class="ntt_media_file" alt="Room Photo 6"/>
    <img id="photo7" src="HolstonImages/06.jpg" style="display:none;" class="ntt_media_file" alt="Room Photo 7"/>
    <iframe width="750" height="500" style="display:none;"
    class="ntt_media_file" frameborder="0" allowfullscreen></iframe>
    <div class="ntt_prev_button">
    <img src="fc_left_arrow.png" id="ntt_prev_media" alt="Get Previous Media Item"/>
    </div>
    <div class="ntt_next_button">
    <img src="fc_right_arrow.png" id="ntt_next_media" alt="Get Next Media Item"/>
    </div>
    <div class="ntt_close_button">
    <img src="ntt_close_button.png" id="close-panel" alt="Close Lightbox"/>
    </div>
    </div>
    <div id="lightbox_background"></div>
          </div>
    Here is the javascript (highlighted where I'm trying to add script to change it to pull up which image I want:
    $(document).ready(function(){
              // When a link of class open_lightbox is clicked this function is triggered
               $("#1.open_lightbox").click(function(){
               // Sets the opacity for the background shadow to 85%
               $("#lightbox_background").css({opacity: 0.75});
               // Makes all of the hidden parts of the lightbox appear
               $("#lightbox_background, .lightbox-panel, .ntt_close_button, .ntt_next_button, .ntt_prev_button").fadeIn(300);
               // Gets the height and width of the first media type displayed
               // Media type is a reference to any images or movies
               ntt_img_height = $('.ntt_media_file:first').css('height');
               ntt_img_width = $('.ntt_media_file:first').css('width');
               // Changes the size of the parent div that surrounds the media on screen
               // Animate will make the changes slowly for dramtic effect
               $('.ntt_media_file:first').parent().animate({
               height: ntt_img_height+100,
               width: ntt_img_width
               }, "slow");
              $("#2.open_lightbox").click(function(){
              $("#lightbox_background").css({opacity: 0.75});
              $("#lightbox_background, .lightbox-panel .ntt_close_button, .ntt_next_button, .ntt_prev_button").fadeIn(300);
               $(".ntt_media_file").is("#photo2")
               // If an img is clicked on with the id of close-panel run this function
               $("img#close-panel").click(function(){
               // Make all the lightbox elements disappear
               $("#lightbox_background, .lightbox-panel, .ntt_close_button, .ntt_next_button, .ntt_prev_button").fadeOut(300);
               // When the next button is clicked it triggers a click event on
               // the current image visible on the screen
               $("img#ntt_next_media").click(function(){
                         $(".ntt_media_file:visible").trigger('click');
               // Closes the lightbox if the escape key is pressed
               $(document).keypress(function(e) {
                         // If the key pressed was escape close the lightbox
                         if(e.keyCode == 27)
                                   $("#lightbox_background, .lightbox-panel").fadeOut(300);
               // This event is triggered any time the user clicks on anything with a
               // class of ntt_media_file.
               // It cycles through the different media types from first to last
              $(".ntt_media_file").click(function(){
                         if( $(this).next('.ntt_media_file').length == 0)
                                   // Make all visible media disappear in the lightbox
                                   $(".ntt_media_file:visible").toggle();
                                   // Display the first media in the lightbox
                                   $(".ntt_media_file:first").toggle();
                                   // Call this to resize the div that surrounds the media
                                   // based on the size of the media displayed
                                   ntt_resize_div_container();
                         } else {
                                   // Make all visible media disappear in the lightbox
                                   $(".ntt_media_file:visible").toggle();
                                   // this is a reference to the element that was clicked to trigger
                                   // this function. This statement is causing the next media
                                   // with the class ntt_media_file to appear
                                   $(this).next('.ntt_media_file').toggle();
                                   // Call this to resize the div that surrounds the media
                                   // based on the size of the media displayed
                                   ntt_resize_div_container();
               // This event is triggered any time the user clicks on the previous
               // button.
               // It cycles backwards through the different media types
               $(".ntt_prev_button").click(function(){
                         // This checks to see if a media file is available to display
                         if( $(".ntt_media_file:visible").prev('.ntt_media_file').length == 0)
                                   // Make all visible media disappear in the lightbox
                                   $(".ntt_media_file:visible").toggle();
                                   // Display the first media in the lightbox
                                   $(".ntt_media_file:last").toggle();
                                   // Call this to resize the div that surrounds the media
                                   // based on the size of the media displayed
                                   ntt_resize_div_container();
                         } else {
                                   // Get the current index value for the media shown
                                   var ntt_current_media_shown = $(".ntt_media_file:visible").index();
                                   // Get the index for the media that proceeds the current image
                                   var ntt_prev_item_to_show = ntt_current_media_shown - 1;
                                   // Toggle off all visible media in the lightbox
                                   $(".ntt_media_file:visible").toggle();
                                   // Toggle on the media previous to the last shown
                                   $(".ntt_media_file").eq(ntt_prev_item_to_show).toggle();
                                   // Call this function to resize the div based on dimensions
                                   // of the media shown in the lightbox
                                   ntt_resize_div_container();
               // Call this function to resize the div based on dimensions
               // of the media shown in the lightbox
               function ntt_resize_div_container()
                         // Get the current height and width of the visible media in lightbox
                         ntt_img_height = $(".ntt_media_file:visible").css('height');
                        ntt_img_width = $(".ntt_media_file:visible").css('width');
                        // Define the margins based on the size of the image
                        ntt_img_margin_top = (ntt_img_height / 4);
                        ntt_img_margin_left = (ntt_img_width / 4);
                         // Target the div that surrounds the visible media (it's a div)
                         // Adjust the size of the parent div based on the dimensions
                         // of the media it contains
                         $(".ntt_media_file:visible").parent().animate({
                                   height: ntt_img_height+100,
                                   width: ntt_img_width
                                   }, "fast");
                         $(".ntt_media_file:visible").parent().css({
                                  'position': 'fixed',
                                  'top': '22%',
                                  'left': '22%',
                                  'min-width': '775px',
                                  'margin-top': ntt_img_margin_top,
                                  'margin-left': ntt_img_margin_left
    Here is the link the the uploaded script and html: www.theriveroverlook.com/Trial.html

    Hi,
    May be this can help:
    <html>
    <body>
    <script language="javascript">
    var num1=0;
    var num2=0;
    var num3=0;
    function printGrade(){
    var score=prompt("Enter your score","Enter your score");
    if(score>81)
    alert("Grade : A");
    else if(score>61)
    alert("Grade : B");
    else if(score>41)
    alert("Grade : C");
    else
    alert("Grade : D");
    function input3Number(){
    num1=prompt("Enter First Number","Enter First Number");
    num2=prompt("Enter Second Number","Enter Second Number");
    num3=prompt("Enter Third Number","Enter Third Number");
    function returnMax(){
    input3Number();
    if(num1>num2){
    if(num1>num3)
    alert(num1);
    else
    alert(num3);
    }else{
    if(num2>num3)
    alert(num2);
    else
    alert(num3);
    function returnMin(){
    input3Number();
    if(num1<num2){
    if(num1<num3)
    alert(num1);
    else
    alert(num3);
    }else{
    if(num2<num3)
    alert(num2);
    else
    alert(num3);
    function daysInMonth(){
    var monthNumber=prompt("Enter Month in Number","");
    if(monthNumber==1 || monthNumber==3 || monthNumber==5 || monthNumber==7 || monthNumber==8 || monthNumber==10 || monthNumber==12)
    alert("Days in Month is : 31");
    else if(monthNumber==2)
    alert("Days in Month is : 28/29 (Leap year)");
    else
    alert("Days in Month is : 30");
    </script>
    <input type="button" name="month1" value="Days in a Month" onclick="daysInMonth()">
    <input type="button" name="B1" value="Calculate Grade" onclick="printGrade()">
    <input type="button" name="max" value="Maximum number" onclick="returnMax()">
    <input type="button" name="max" value="Minimum number" onclick="returnMin()">
    </body>
    </html>

  • Need help with JavaScript "Galleria" gallery coding

    I am trying to create a clickable gallery with the filmstrip either on the top or on left hand side for people to click to see my portfolio. I want the first photo to be auto loaded. I downloaded the javascript from;
    http://galleria.aino.se/
    I have the coding for;
    galleria.js
    galleria.classic.js
    jquery.min.js
    I try the basic tutorial given on the website http://galleria.aino.se/
    but it seem more coding are needed.
    I want the similar gallery as shown on the above website without the black void space on the side of the large photo. I do not want the Rewind and Fastforward buttons as shown on the side of the large photo (not on the thumbnail)
    I have tried downloading few similer files and trying to use their html coding but there werent the full tutorial.
    The coding below only shows two small photos left top of the page without the large photo either on top of them.
    I dont understand much about coding. Only been doing this for like few months and still learning but i am stuck now. Much apperciated if you can help me out here with what code need to go where. Many thanks.
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <script src="test/jquery.min.js"></script>
    <script src="test/galleria.js"></script>
    <script>Galleria.loadTheme('test/galleria.classic.js');</script>
    <script>$('.gallery').galleria();</script>
    </head>
    <body>
    <div class="gallery">
    <a href="_images/home/Bridge.png"><img src="_images/home/Bridge.png" width="100"></a>
    <a href="_images/home/Haz_Restaurant.JPG"><img src="_images/home/Haz_Restaurant.JPG" width="100"></a>
    </div>
    </body>
    </html>

    Using the same files, i have found a different code where they place the tumbnails at the bottom of the slideshow rather than on the side. Here is the code;
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
        <title>Galleria Demo 1</title>
        <meta http-equiv="content-type" content="text/html; charset=UTF-8">
        <meta http-equiv="imagetoolbar" content="false">
        <meta name="description" content="">
        <meta name="keywords" content="">
        <link href="test/galleria.css" rel="stylesheet" type="text/css" media="screen">
        <script type="text/javascript" src="test/jquery.min.js"></script>
        <script type="text/javascript" src="test/jquery.galleria.js"></script>
        <script type="text/javascript">
        $(document).ready(function(){
            $('.gallery_demo_unstyled').addClass('gallery_demo'); // adds new class name to maintain degradability
            $('ul.gallery_demo').galleria({
                history   : true, // activates the history object for bookmarking, back-button etc.
                clickNext : true, // helper for making the image clickable
                insert    : '#main_image', // the containing selector for our main image
                onImage   : function(image,caption,thumb) { // let's add some image effects for demonstration purposes
                    // fade in the image & caption
                    image.css('display','none').fadeIn(1000);
                    caption.css('display','none').fadeIn(1000);
                    // fetch the thumbnail container
                    var _li = thumb.parents('li');
                    // fade out inactive thumbnail
                    _li.siblings().children('img.selected').fadeTo(500,0.3);
                    // fade in active thumbnail
                    thumb.fadeTo('fast',1).addClass('selected');
                    // add a title for the clickable image
                    image.attr('title','Next image >>');
                onThumb : function(thumb) { // thumbnail effects goes here
                    // fetch the thumbnail container
                    var _li = thumb.parents('li');
                    // if thumbnail is active, fade all the way.
                    var _fadeTo = _li.is('.active') ? '1' : '0.3';
                    // fade in the thumbnail when finnished loading
                    thumb.css({display:'none',opacity:_fadeTo}).fadeIn(1500);
                    // hover effects
                    thumb.hover(
                        function() { thumb.fadeTo('fast',1); },
                        function() { _li.not('.active').children('img').fadeTo('fast',0.3); } // don't fade out if the parent is active
        </script>
        <style media="screen,projection" type="text/css">
        /* BEGIN DEMO STYLE */
        *{margin:0;padding:0}
        body{padding:20px;background:white;text-align:center;background:black;color:#bba;font:80% /140% georgia,serif;}
        h1,h2{font:bold 80% 'helvetica neue',sans-serif;letter-spacing:3px;text-transform:uppercase;}
        a{color:#348;text-decoration:none;outline:none;}
        a:hover{color:#67a;}
        .caption{font-style:italic;color:#887;}
        .demo{position:relative;margin-top:2em;}
        .gallery_demo{width:702px;margin:0 auto;}
        .gallery_demo li{width:68px;height:50px;border:3px double #111;margin: 0 2px;background:#000;}
        .gallery_demo li div{left:240px}
        .gallery_demo li div .caption{font:italic 0.7em/1.4 georgia,serif;}
        #main_image{margin:0 auto 60px auto;height:438px;width:700px;background:black;}
        #main_image img{margin-bottom:10px;}
        .nav{padding-top:15px;clear:both;font:80% 'helvetica neue',sans-serif;letter-spacing:3px;text-transform:uppercase;}
        .info{text-align:left;width:700px;margin:30px auto;border-top:1px dotted #221;padding-top:30px;}
        .info p{margin-top:1.6em;}
        </style>
    </head>
    <body>
    <h1>Galleria Demo 01</h1>
    <div class="demo">
    <div id="main_image"></div>
    <ul class="gallery_demo_unstyled">
        <li><img src="test/img/flowing-rock.jpg" alt="Flowing Rock" title="Flowing Rock Caption"></li>
        <li><img src="test/img/stones.jpg" alt="Stones" title="Stones - from Apple images"></li>
        <li class="active"><img src="test/img/grass-blades.jpg" alt="Grass Blades" title="Apple nature desktop images"></li>
        <li><img src="test/img/ladybug.jpg" alt="Ladybug" title="Ut rutrum, lectus eu pulvinar elementum, lacus urna vestibulum ipsum"></li>
        <li><img src="test/img/lightning.jpg" alt="Lightning" title="Black &amp; White"></li>
        <li><img src="test/img/lotus.jpg" alt="Lotus" title="Fusce quam mi, sagittis nec, adipiscing at, sodales quis"></li>
        <li><img src="test/img/mojave.jpg" alt="Mojave" title="Suspendisse volutpat posuere dui. Suspendisse sit amet lorem et risus faucibus pellentesque."></li>
        <li><img src="test/img/pier.jpg" alt="Pier" title="Proin erat nisi"></li>
        <li><img src="test/img/sea-mist.jpg" alt="Sea Mist" title="Caption text from title"></li>
    </ul>
    <p class="nav"><a href="#" onclick="$.galleria.prev(); return false;">&laquo; previous</a> | <a href="#" onclick="$.galleria.next(); return false;">next &raquo;</a></p>
    </div>

  • Need Help with Javascript for Acrobat Pro 9

    Hello,
    I am creating a PDF form in Adobe Acrobat Profession 9.  Not having a lot of experience with Javascript, I have found this forum very helpful and have used many of the script examples for other issues I have had.  I was hoping someone could help with the following script, I have tried many variations, cannot get it to work.
    var ratio = this.getField("ratio").value
    var concentration = this.getField("concentration").value
    var result = this.getField("result").value
    if(ratio.value>=50.00)
    {result.value ='PASS';}
    if(ratio.value".value>=40.00)
    {result.value ='PASS';}
    if((concentration.value ==61) && (ratio.value >= 49.25))
    {result.value ='PASS';}
    if((concentration.value ==61) && (ratio.value >= 39.25))
    {result.value ='PASS';}
    if((concentration.value ==62) && (ratio.value >= 48.50))
    {result.value ='PASS';}
    if((concentration.value ==62) && (ratio.value >= 38.50))
    {result.value ='PASS';}
    else
    {result.value = 'FAIL';}
    This is just a piece of the code  The concentration values run from 61 through 99 and the ratio value varies for each concentration value, there is a high ratio and a low ratio.  The result of this field with populate the results field with a PASS or FAIL.  This is not working......any help is greatly appreciated!

    Thanks George.  I updated the script to:
    // Get a reference to the result field
    var ratio = this.getField("ratio");
    // Get a reference to the result field
    var concentration = this.getField("concentration");
    // Get a reference to the result field
    var result = this.getField("result");
    if(ratio.value>=50.00)
    {result.value ='PASS';}
    if(ratio.value >=40.00)
    {result.value ='PASS';}
    if((concentration.value ==61) && (ratio.value >= 49.25))
    {result.value ='PASS';}
    if((concentration.value ==61) && (ratio.value >= 39.25))
    {result.value ='PASS';}
    if((concentration.value ==62) && (ratio.value >= 48.50))
    {result.value ='PASS';}
    if((concentration.value ==62) && (ratio.value >= 38.50))
    {result.value ='PASS';}
    else
    {result.value = 'FAIL';}
    However, I am still getting a FAIL result even when the ratio is 50.00 or equal to the passable ratio.

  • Please help with Javascript obejcts hierarchy

    Hi!
    Is following Javascript obejcts hierarchy is right?
    1. App > 2. Doc > 3. Page >
    (from Page) > 3.1 Annotation3D
    (from Page) > 3.2 Field (link)
    thank u )

    You have to have Acrobat/Reader open to open a PDF and use some or all of the Acrobat JS features.
    When Acrobat/Reader is started various folders are accessed and files within those folders read and processed to create the application. This includes dictionaries, certain global variables, various functions provided by Adobe, and user defined functions or variables. The Adobe provided functions or user provided functions or variables are accessed by their assigned name. So if you created an application folder level function in a file called 'hello.js' containing the following code:
    function HelloWorld()
    app.alert('Hello World!');
    return;
    HelloWorld();
    Each time you open Acrobat an alert box with "Hello World!" will appear.  So even without any PDF open one can perform or have a task done. With application level scripts, you can add menu item, tool bar buttons, or modify menu items, etc. So when you open Acrobat you could have a menu item to create a new blank PDF or add the JS API Reference to the "Help" menu item. And if you selected "Help => JavaScript API', the JS API Reference file would open, whether there is an open PDF or not.
    PDF files are opened at the application level, as the application needs to interpret the code of the PDF file and provide the necessary resources for displaying, calculating, linking, etc for the open PDFs. If you open a PDF pragmatically, you need to provide an object name to that PDF. Especially if you are going to reference that file with JavaScript.
    Within an open PDF there are various actions. The first is the document level scripts that are used to establish the environment in which that PDF will function. This could include special functions to sum values, compute date differences, perform special key stroke and formatting. There can even be test to see if there are any necessary application level functions available for use the the document.
    Within PDF document you can can fields, links, comments, etc. And these items only exist in the PDF document and rely on the PDF document for performing the various task or communicating those task the the application.
    By the way with the "HelloWorld" function defined in the application JavaScirpt folder, and PDF opened on that computer can have a button with the 'mouse up' action JavaScript of "HelloWorld();" for the code and any time that button is pressed the alert box that appeared when Acrobat was started will appear. But if you take that PDF to another computer that does not have that file nothing will happen or an error box will appear.
    See Getting Started - Developing for PDF by Dave Wright and look around the Planet PDF site.
    You also need to realize that Acrobat JavaScript does not run synchronously, so you do not always have the individual scripts running in the same order or speed so it is possible a script will not always start and end before the next script in line is started or ends. And if you have dependencies between these scripts you need to test to see if they are all met.

  • Help Needed With Javascript

    Hi,
    I am facing a very weird problem with javascript in Adobe LiveCycle Designer v7.1 .
    I am having a text field and i am using a javascript to manipulate its value ...
    like this.rawValue = "mohit" + "\u000a" + "gupta";
    when iview it in pdf form the output displayed is :
    mohit
    guptagupta
    Its definitely to do something with the escape sequence characters. I have even tries "\n" , "\r", String.fromCharChode(10,13) but the same result..
    Even with Form Server 7.1 while rendering the sentence breaks at first escape sequence : only mohit is displaying.
    Please if somebody have encountere thisproblem do let me know asap.
    Many Thanks
    Mohit

    Hi,
    if you are simply trying to get a field to display something like:
    mohit
    gupta
    then
    this.rawValue = "mohit\ngupta";
    or
    this.rawValue = "mohit" + "\n" + "gupta";
    should work. I am doing this successfully with Forms 7.1
    Make sure that your field is set to accept multiple lines and that it is also set to expand in height.
    John

  • Problem with JavaScript in DPS

    Hello,
    i have little problem with one HTML page in DPS. We've created HTML form, which is formatting output with JavaScript and then passing to local mail client via mailto. It works nicely in Safari on desktop, it works in Safari on iPad BUT it don't work in DPS, when we use it as HTML content (frame on page where form is loaded). Unfortunately, there is no way how to learn what's wrong - on iPad it works, it's not working just in DPS (and it's not working in Viewer on desktop too).
    Anyone have any idea what to do?
    Script is fairly simple, it's my compilation of other works, because i'm not JS programmer, just i'm skilled with google-copy-paste... So there can be some VERY trivial error, but i don't know correct syntax...
    very simple version of this form, which is not working in DPS (but everywhere else), is here
    http://dl.optio.cz/mailtoExample.html
    Thanks for any help!

    Hello,
    when used in DPS browser, it's working (as part of HTMLresources.zip). I don't know if this will help, but here is small game, which works correctly in DPS in web overlay. when you move any red circle, it will let you send results via email. But this is too complicated for my minimal skills.
    http://dl.optio.cz/Hra_en/
    Anyway, thanks for help
    Martin

  • Printing different URL with javascript

    I am trying to print a URL using javascript but i do not want to print the current page. I have searched google, this forum and a javascript book and can not seem to figure it out. To exlplain in it generic terms i want to be on one page and tell it to print another. Reason being, I am looking at an overview page and want to print a report made in Oracle reports, (Yes I could load the report and print it but i want to print multiple reports from one button)(The reports do work and are valid) Here is a rundown of what I am doing.
    From a button i am calling a 'url' with the following code:
    javascript:V_PRINT('P50_CUSTOMER_ID','P50_YEAR');
    And then in the html header i have the code: (printing same page twice, just an example)
    <script language="JavaScript" type="text/javascript">
    function V_PRINT (formItem1,formItem2) {
    var formVal1 = document.getElementById(formItem1).value;
    var formVal2 = document.getElementById(formItem2).value;
    var url1;
    var url2;
    url1 = 'http://www.google.com/search?hl=en&q=' + formVal1 + '+' + formVal2;
    url2 = 'http://www.google.com/search?hl=en&q=' + formVal1 + '+' + formVal2;
    url1 = print();
    url2 = print();
    </script>
    This code just prints the current page. I know I am calling print incorrectly and thats where i need the help. Of course I might just be approaching it all wrong. Either way I hope someone with javascript knowledge can help.
    Thanks

    Hello,
    To print a page it has to be open in the browser since all it does it call the browsers print dialog.
    Here is one solution http://www.irt.org/script/508.htm and you can also try a iframe instead of a regular frame.
    If it's crossdomain request like your example here that might cause problems as well. There might be additional problems.
    Carl

  • How to get all images in indesign CS5 with javascript?

    Hi,everybody,
    How to get all images in indesign CS5 with javascript?I want to delete them.
    Anyone can give me some example codes?
    Thanks,
    Bridge

    Hey!
    This will remove all images from your InDesign document:
    var myLinks = app.activeDocument.links.everyItem().parent;
    for(var i = 0; i < myLinks.length; i++)
        myLinks[i].remove();
    Hope that helps.
    tomaxxi
    http://indisnip.wordpress.com/
    http://inditip.wordpress.com/

  • Change page attribute with JavaScript

    Hi,
    hope someone can help.
    Is it possible to change a BSP page attribute with JavaScript??
    I have a JavaScript array with some serialnumbers. After push a save button, i want to save the array data into a page attribute.
    Some ideas?
    Regards Anton

    Hi,
    The only way of passing vars from JS to page attributes is submitting them via (hidden) values in a form or via params in an URL.
    Alternatively, you can try to let JS store things in a client cookie and let the BSP read that cookie.
    I didn't try that out yet though.
    Eddy
    PS.
    Put yourself on the SDN world map (http://sdn.idizaai.be/sdn_world/sdn_world.html) and earn 25 points.
    Spread the wor(l)d!

  • Printing PDF attachments with Javascript?

    I am very new to Javascript (and not a programmer) so please excuse my basic or un-correct terminology here! I've created an interactive pdf, and have set buttons (with javascript code) to print specific ranges of pages from the document. I've now been asked to have said buttons print attachments (which are also pdf's) in the same style... is this possible, and if so, does anyone have example code? The code that I used to print the page ranges, for example:
    print ({nStart: 0, nEnd: 5});
    Any assistance/guidance/help would be greatly appreciated!

    The document first has to be opened. You can do this via JavaScript with the doc.openDataObject method: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.509.html
    This method returns a doc object, which you can use with the print method to print the document. You should then use the closeDoc method to close the document, as mentioned in and demonstrated in the documentation linked to above.

  • How can i optimize my SEARCH ENGINE???I use godaddy.i contact them and they give me this conclusion:Search engines are not pulling up your other pages on your website because it is created with javascript. the content on the pages, (photo gallery.....

    conclusion from godaddy:
    Search engines are not pulling up your other pages on your website because it is created with javascript.
    the content on the pages, (photo gallery, My Recipes/Blog, History, Friends) need to be formatted to HTML, PHP or CSS. No search engines (google, Yahoo, Bing) can crawl//analyze webpages built with javascript.
    See if Apple allows iweb to create the pages in HTML format and ask how to make those changes.
    I spend more then 1 hour on the phone with them but we didn't find the solution...
    please i need help because like this nobody can rich my website...
    www.chefdiego.com
    thank you

    The part of iWeb pages that give the search engines problem is the navbar.  That's javascript based.  One way to get around that is to create another blank page in the site that's not  included in the navbar. 
    Add a text based navbar in that page with just the other pages in the site. 
    Also you can use that page for creating the sitemap for Google at Create your Google Sitemap Online - XML Sitemaps Generator.
    Have you let Google know your site exists? This website describes how to get it recognized: Get your iWeb website found in search engines like Google Yahoo MSN and Bing.
    OT

  • C# control event handling with javascript

    How can I get javascript to execute for "onchange" / "OnSelectedIndexChanged" event instead of a CodeBehind method? I think "OnSelectedIndexChanged" event has to be handled by CodeBehind; but how can I replace that (or onchange) with
    a javascript event handler?
    I have the following in my xyz.ascx file:
    <asp:DropDownList ID="ddlTypeCar" CssClass="BatsRefAddressTypes" runat="server"
                      onchange="javascript: testAlert();"
                      OnSelectedIndexChanged="ddlTypeCar_SelectedIndexChanged"
                      AutoPostBack="True" />
    I could not get the javascript to execute, even though I removed OnSelectedIndexChanged="ddlTypeCar_SelectedIndexChanged" and/or set AutoPostBack="false".
    Additionally, I tried added the following in xyz.ascx.cs Page_Load() method.
    ddlTypeOfAddress.Attributes.Add("onchange", "javascript: testAlert();");
    which didn't help.
    Thanks for your help in advance.

    Hi,
    you can control client events instead of server events with javascript
    look this url for more information
    http://www.w3schools.com/js/js_events.asp
    Regards

Maybe you are looking for

  • Final Cut Pro 6 on Mac OS Snow Leopard installation problem HELP!!!

    After 2 - 3 hours of installing all 10 FCS 2.0 discs and Software Updates, I can't seem to launch Final Cut Pro 6.0.6. I get *"...software maybe damaged or not installed.."* So I removed all of them and only custom-installed Final Cut Pro 6.0.6. It w

  • Key figure notes in the PB

    Hi, My user has maintained a notes in the Data view and he is not able to see it in the data view but the notes he has maintained is clearly seen in /SAPAPO/SDP_NOTES. Kindly suggest...if it has something to do with authorization or data maintenance

  • How we can find out reconciliation details for AR.

    Hi, We are adding Manual JE as a receipt against for multiple AR invoices. For these entries we are doing reconciliation but my out standing report itu2019s showing as pending amount. In out standing report how we can identify this manual JE is recon

  • SAP PS Report Painter

    Hi All, I had created a form using T code: CJE4 & also I had create report using T code: CJE1. Now I want this report to be executed in Z transaction. I want to know how could I do the same. Regards, Gagan

  • Quality parameter -min and max values should be maintained w.r.to contract?

    Hi all, Min and max values in quantity contract should be maintained with respect to contract. till now we were maintaing min and max values with respect to inspection plans, but here since it differs for customer/vendor contracts - it need to be wit