How to Change Paper Type Using Java script

HI ,
We have a requirement , in which we have to change the paper type i.e. "A2" , "A3","A4" etc.  while printing using a JavaScript. I have written a code like this :
xfa.form.form1.pageSet.Page1.medium.stock = "A2"; But this is not working. please help me out.
Thanks,
Bhaskar.

That's the right object for choosing the page size at Design time. What event are you doing this on? Although you can change it in the form model, the form's page size is already determined from the template by the time you have a form to script against, so although you can change it via script after the fact in XFA, I don't believe it will have any impact. Even putting it on the layout ready event does not work.

Similar Messages

  • How to change paper types

    I don;t seem to be able to change paper types using Pages 09,in Word I think I am right in saying you can change from various paper types in the print section. When I try this in Pages I do not get this option, I need to be able to print onto various Photo papers etc. Can YOU help.

    I assume that you get the "bare" Print dialog :
    If I am right, click the small black triangle pointed by the yellow arrow to get the 'complete' Print dialog.
    Yvan KOENIG (VALLAURIS, France) mardi 12 juillet 2011 14:46:04
    iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.8
    Please : Search for questions similar to your own before submitting them to the community
    To be the AW6 successor, iWork MUST integrate a TRUE DB, not a list organizer !

  • How we close Views without using Java Script

    Hi All,
    can you please suggest me how i close view with out using java script.
    if possible please reply with code.
    Thanks
    Siva

    Hi Siva,
    You can do this either by hiding your window or by closing the window. Following is the sample code to do that
    IWDWindowInfo windowInfo = null;
    IWDWindow window =null;
    windowInfo = (IWDWindowInfo)  wdComponentAPI.getComponentInfo).findInWindows("<<WindowName>>");
    if(windowInfo!=null)
    window = wdComponentAPI.getWindowManager().createWindow(windowInfo,true);
    window.hide();
    Try with this code, might be useful for your scenario.
    Thanks,
    Sandeep

  • How to generate Serial numbers using JAVA SCRIPT

    how to generate serial numbers(incrementing by 1) using JAVA SCRIPT
    thanking you,
    pola pradeep

    i am afraid that whether ur looking for this. bcoz its a simple for loop
    <script language="JavaScript">
    //count = limit value for u
    for(i=0;i<count;++i){
         alert(i);
    </script>
    or if ur looking for something else, pls mention ur requrment precisely
    aleena

  • How to check browser type using java.

    Hi,
    can anybody help me to check browser type using java.
    Weather it is IE or Mozilla or Opera .
    any class in java for such operation?
    vjoy

    can anybody help me to check browser type using
    java.
    Weather it is IE or Mozilla or Opera .
    any class in java for such operation?From where do you want to perform the check? An applet, application or web application?
    Kaj

  • How to create a class using java script..

    Hi all,
    Iam new to java script and I tried out the following program but its not working..I basically created a class just like a java prog' but Iam not getting any output or error.Iam attaching the code below.
    If I created one function inside the script and create one object its working fine but what should I do when I have a lot of function??so I created a class and put all the function and created an object but its not working..
    Do let me know what changes should I do..Iam attaching the code which I had written. or give me an example of how to create a class with couple of functions using JAVASCRIPT
    Thanks
    Avis_su
    <html>
    <head><title>JSP Page</title></head>
    <body>
    <SCRIPT language = "JavaScript">
    <!--
    //Created classes
    class book
    var title: String;
    var author:String;
    function author()
    doucument.write("Author is " +this.author);
    function tile()
    doucument.write("Title is " +this.title);
    function printall()
    var counter = 0;
    function author();
    function title();
    var chapters = Array[String];
    for(chapter in this chapters)
    counter++;
    document.write("Chapter" counter" :"+this.chapters[chapter]+"<br>");
    var thisbook = new book()
    thisbook.author = "Sivagami";
    thisbook.title = "MS in CS giude";
    thisbook.chapters = new Array[10];
    thisbook[0] = "Prepare to Excell in all ";
    thisbook[1] = "Learn to be happy";
    thisbook[2] = "Learn to be healthy mentally emotionally physically";
    thisbook[3] = "Siva and Subbu along with kidssssss will be successful in future";
    thisbook.printall();
    //-->
    </script>
    </body>
    </html>

    Run this program to get your answer:
    public class AnswerToYourPost {
    public static void main(String args[]) {
    System.out.println("TRUE/FALSE: This question
    ion belongs on a Java forum.\n"
    + "ANSWER: " + ("Javascript" == "Java"));
    }Since when do we compare objects for equality using operator == ?

  • HP Deskjet 2645: how to change paper type while photo copying

    Currently use a HP Deskjet 2645. I used to be able to photo copy and change the paper type to either legal or 5x11. Now, when I try to photo copy a document, the only options are the three that's all A4. How can I fix the settings to be able to have the options I want back?

    hi docmy printer is always plug directly into a wall outleti did the resetbut the result still samebellow is the sample i tried     ori doc                                                                                                 photocopy doc 

  • How to disable a button using Java Script in Apex

    Hi All,
    I was trying to disable a button when the value of a select list item in the same page is equal to zero. Following are the steps which I did.
    1) Created a new button template as <table class="t9StandardButton" id="#BUTTON_ID#" cellspacing="0" cellpadding="0" border="0" summary="">
    2) Changed the existing button template to the newly created button template.
    3) Added onchange="javascript:fdisplay(this);" to form element value of select list
    4) Added the following java script in the page header
    <script type="text/javascript">
    function fdisplay(some) {
    if (some.value==0){
    html_GetElement ('#BUTTON_ID#').disabled = true;
    else
    html_GetElement ('#BUTTON_ID#').disabled = false;
    </script>
    But the script doesn't work. Is there anything I am missing here. Please advice.
    Thanks,
    Vikas

    Vikas:
    In the 'Button Attributes' field of the button enter 'id='thisButton'.
    Modify the button template to include the substitution string #BUTTON_ATTRIBUTES# . This should be put in the anchor tag in the template defintion.
    Modify your Javascript to reference the above id as
    html_GetElement ('thisButton').disabled = true;
    ....Varad

  • How to access sql server using java script

    Hi, Is it possible to connect to sql server in java script. I'm using microsoft jdbc driver for connectivity to sql server.
    Thanks

    Hi, Is it possible to connect to sql server in java
    script. I'm using microsoft jdbc driver for
    connectivity to sql server.If you want to ask about Javascript, you are in the wrong place. Go and find some JavaScript forum. Actually, you could connect to database from javascript using Ajax or the like mainly because you could have Java code behind the scenes, but then that too is not something I would want to discuss here. So, go find the correct place for the topic.

  • How to change font type in java mail script?

    Hi,
    I wrote a bean shell script to send mail on particular event. I want mail message body text font style to be modified.
    Please provide help on this.
    Thanks,
    Saloni

    Hi Saloni ,
    You can add the text in the following way by using font tags for message body in your custom mail.
    Message msg = new MimeMessage(session);
    MimeMultipart mp = new MimeMultipart();
    MimeBodyPart mbp1= new MimeBodyPart();
    String htmlText = "<b> This is formatted</b>"+
    "<font size =\"5\" face=\"arial\" >This paragraph is in Arial, size 5</font>";
    mbp1.setContent(htmlText,"text/html");
    mp.addBodyPart(mbp1);
    msg.setContent(mp);
    It worked for me. Let me know if you face any issue.
    Regards,
    Uday.

  • Change paper type (A4) via JavaScript

    Hi all,
    I want to change the paper type via Java Script to A4.
    The hierarchy:
    data  -->pageSet -->page1 (A4)
    Is this the right syntax, if I want ot switch the page1 to A4? ...and which "Event" should I use? --->initialize?
    data::initialize - (JavaScript, both) 
    xfa.data.pageSet.page1.medium.stock = "A4";

    Hi
    Are you trying to change the size on the fly for different values for instance.
    Or is this simply ensureing the page is formatted correctly when the document is opened?
    I could not get your code to work
    but this code appears to work OK
    xfa.form.form1.pageSet.pageArea.medium.stock = "A4";
    Hope this helps
    Graham Spaull
    DubDubDubDesigns.co.uk

  • Changing Windows Registry using Java

    hi...all,
    Any1 knows how to change windows registry using java. wheather is it possible ?? or there is any other alternative for same....

    Write a Java class which will create a temporary REG file... use regedit /s from Runtime.exec() and pass that file as argument.
    ***Annie***
    (Where the hell do these ideas come in my head!)

  • How to pass values to variables in WAD 7.0 using java script

    Hi.,
    My requirement is based on WAD 7.0.
    The sales value has to displayed in WAD using graph with various chart types.
    I have created variables for plant and material group in a query.
    I have created drop down box for plant with all plants in it, check box for material group and a Submit button in WAD in FORM tag of HTML coding.
    Once all the values are set in drop down box, checkbox and if the user clicks on submit button, the values has to captured by the variables for which I have created and the graph has to be aligned to the new values in variables.
    Kindly help me how to use java script to get the values from FORM and pass it to variables.
    Regards,
    Selva

    Hi Selva,
    You do not need to use Javascript for this. Instead you can achieve this by using API Commands in WAD 7.0.
    Please configure Action on the ButtonGroup webitem to use 'Commands'.
    ->Choose Command 'Set Variables Values / SET_VARIABLES_STATE' under Commands for Web Templates
    ->Set Display Variable Screen setting to OFF
    ->Choose Query Variable for Plant, Select Variable Type as 'Binding Type', Binding Type as 'Data Provider Selection', Data Provider as the one you have assigned to the Dropdown webitem, Characteristic as 0PLANT or as that assigned to the Dropdown webitem
    ->Repeat above steps for Query Variable Material Group
    Now when you make a selection from the Dropdown webitems, the Chart output will change accordingly. Let me know if this helps.
    --Priya

  • How to chek the content type thru java script !!

    Hii Guys ,one more prb,
    I need to develop a file uploading utility in struts to upload ZIP files(only ZIP), and i sucseeded to do it using the commons.fileupload which comes along with the WSAD5.1(examples), but the prb is i need to chek for the MIME type and need to reject if its not a zip file, if i do this in actionclass, its waiting till the uploading process of the file is finished and finally its displaying file is not the a ZIP, i need to do this validation as the request comes to the server side, i cant not do this in clint side cause my design should not allow me to use any java script..so please let me know is there any way to specify in the controller it self .
    if i use java script, how can i do the Content type validation ?
    thanx in advance

    so definetly u mean , we need to wait till the
    filegot uploaded to server, if we use server side
    validation?Well, for server side validation, yes you have to wait for the file to upload.
    I've always kinda disliked that, since it could be a big file and/or slow connection. But short of possibly using JS to check the filename (and I don't remember if you actually can, and it's not accurate in many case), there's nothing else you can do.

  • How & where to use Java script to create new button in object detail page

    Hi All,
    I want to create "New/Add button" in object detail page. If i am not wrong i need to use java script for that but could you please let me know how & where to use Java script to create new button in object detail page in CRMOD.
    Thanks in advance.
    Regards,
    Manish

    Any related object on the detail page should have an "Add" or "New" or both buttons by default - This is vanilla functionality and will do the required action.
    If you want to modify this behaviour and do something tricky you will potentially have to go for javascript. You should add the javascript on a custom web tab on that Object.
    Admin --> Application Customization --> Contact -->Contact Web Applet
    Now, add your javascript in the code area, after you select the type = HTML for this web applet, expose this web applet on the Contact detail layout and your javascript will be invoked whenever this page is loaded.
    Check this online document to see how javascript can be embedded in CRM on Demand http://helponmyproject.com/TTOCOD/
    Cheers!
    Royston

Maybe you are looking for

  • Olevia LCD TV

    I'm trying to get an Olevia LCD TV to connect via VGA cable to my Powerbook. The PB detects the display, but the TV isn't detecting the powerbook. Are they compatible? I don't see why the screen would reject a mac (it works fine on a Dell PC tower).

  • IMac 24" 2.93GHz turns off

    My AppleCare just ran out a little while ago and now my iMac is starting to shut off. Usually, in iMovie and iPhoto but today if I plug a USB Memory stick in I lose connection to my Bluetooth devices. Yesterday, everytime I tried to open a .pdf file

  • HT204394 how can i hide sheets in iCloud Numbers file?

    I have several files with multiple sheets.  Some of the sheets are old revisions to a specific analysis that I do not want to delete but do not need to see them.  In EXCEL you can hide sheets.  Is there a way to hide sheets in my Numbers files save i

  • Is there a way to just publish changes?

    I just published a behemoth travel-photo diary site, and it's becoming extremely cumbersome to re-publish the /entire/ site when I need to make just a few tweaks. Anyway to publish just the changes? I publish to a folder and upload to my own server.

  • I have OS 10.6.8 and I've recently downloaded Mountain Lion (10.8.3)... when I try to install, it says that I need version 10.8 to continue... What do I do?

    I have OS 10.6.8 and I've recently downloaded Mountain Lion (10.8.3)... when I try to install, it says that I need version 10.8 to continue... What do I do?