AP Check different page format

Hi Gurus ,
I am printing AP Check using Sapscript . I have to Print the first page in Legal format & Next page inLetter format . How can i control this.
Thanks in advance

To achieve this kind of scenario you have to modify your driver program, create two forms with your required formats.
Now, fix the lenght of main window ex, 10 line items if it is more then 10 items then it should goto next page, now in your driver program, read the size of internal table.. it line items less then or equal to 10 print in first page, if more then 10 items print first 10 items in first page and delete this 10 line items from internal table and pass the rest to second page.
Rough idea.
OPEN_FORM  "Open FORM 1
**USE DO 10 times
WRITE_FORM " PRINT 10 line items on FORM1
*Delete this 10 line items from internal table
**END DO
CLOSE_FORM  "Close FORM 1
IF internal table still have values
OPEN_FORM  "OPEN FORM 2
WRITE_FORM " PRINT all line items that are left
CLOSE_FORM
Regards,
SaiRam

Similar Messages

  • Different page formats in the same document

    Is it at all possible to create an InDesign-document with different page formats? Example: Page 1: 210x297 mm, page 2: 190x297 mm.

    only by using this:
    http://www.dtptools.com/product.asp?id=pcid
    robin
    www.adobescripts.com

  • DIFFERENT PAGE FORMATS

    Hi All.
    i have an issue in the form printing.
    In  my form I have to pages.
    I want the first page in Potroit format and second one in Landscape.
    for this requirement,how to deal in Scripts and in Smart forms.
    Can any body help me to solve this issue,.
    Thanks in advance,
    regards,
    eswar

    With onli one form u cannot achieve this.. but u need to have two same forms .. one with Landscape orientation.. and second with Portrait orientation...
    ( Otherwise u can go for the SMARTFORMS , with smartforms u can achieve this in a single form )
    There is a way to have first page in landscape and second page in portrait.
    Use
    START_FORM
    END_FORM
    twice one form in each having different page setting(like landscape....)
    See this code:
    REPORT ZTEST_LANDSCAPE.
    CALL FUNCTION 'OPEN_FORM'
    EXPORTING
    APPLICATION = 'TX'
    ARCHIVE_INDEX =
    ARCHIVE_PARAMS =
    DEVICE = 'PRINTER'
    DIALOG = 'X'
    FORM = 'ZTEST_02'
    LANGUAGE = SY-LANGU
    OPTIONS =
    MAIL_SENDER =
    MAIL_RECIPIENT =
    MAIL_APPL_OBJECT =
    RAW_DATA_INTERFACE = '*'
    SPONUMIV =
    IMPORTING
    LANGUAGE =
    NEW_ARCHIVE_PARAMS =
    RESULT =
    EXCEPTIONS
    CANCELED = 1
    DEVICE = 2
    FORM = 3
    OPTIONS = 4
    UNCLOSED = 5
    MAIL_OPTIONS = 6
    ARCHIVE_ERROR = 7
    INVALID_FAX_NUMBER = 8
    MORE_PARAMS_NEEDED_IN_BATCH = 9
    SPOOL_ERROR = 10
    CODEPAGE = 11
    OTHERS = 12
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL FUNCTION 'START_FORM'
    EXPORTING
    ARCHIVE_INDEX =
    FORM = 'ZTEST_02'
    LANGUAGE = ' '
    STARTPAGE = ' ' <b><u>(*** u can use this option to start printing from the second page )</u></b>
    PROGRAM = ' '
    MAIL_APPL_OBJECT =
    IMPORTING
    LANGUAGE =
    EXCEPTIONS
    FORM = 1
    FORMAT = 2
    UNENDED = 3
    UNOPENED = 4
    UNUSED = 5
    SPOOL_ERROR = 6
    CODEPAGE = 7
    OTHERS = 8
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
    ELEMENT = 'DATA1'
    FUNCTION = 'SET'
    TYPE = 'BODY'
    WINDOW = 'MAIN'
    IMPORTING
    PENDING_LINES =
    EXCEPTIONS
    ELEMENT = 1
    FUNCTION = 2
    TYPE = 3
    UNOPENED = 4
    UNSTARTED = 5
    WINDOW = 6
    BAD_PAGEFORMAT_FOR_PRINT = 7
    SPOOL_ERROR = 8
    CODEPAGE = 9
    OTHERS = 10
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
    ELEMENT = 'DATA2'
    FUNCTION = 'SET'
    TYPE = 'BODY'
    WINDOW = 'MAIN'
    IMPORTING
    PENDING_LINES =
    EXCEPTIONS
    ELEMENT = 1
    FUNCTION = 2
    TYPE = 3
    UNOPENED = 4
    UNSTARTED = 5
    WINDOW = 6
    BAD_PAGEFORMAT_FOR_PRINT = 7
    SPOOL_ERROR = 8
    CODEPAGE = 9
    OTHERS = 10
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL FUNCTION 'END_FORM'
    IMPORTING
    RESULT =
    EXCEPTIONS
    UNOPENED = 1
    BAD_PAGEFORMAT_FOR_PRINT = 2
    SPOOL_ERROR = 3
    CODEPAGE = 4
    OTHERS = 5
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL FUNCTION 'START_FORM'
    EXPORTING
    ARCHIVE_INDEX =
    FORM = 'ZTEST_03'
    LANGUAGE = ' '
    STARTPAGE = ' '
    PROGRAM = ' '
    MAIL_APPL_OBJECT =
    IMPORTING
    LANGUAGE =
    EXCEPTIONS
    FORM = 1
    FORMAT = 2
    UNENDED = 3
    UNOPENED = 4
    UNUSED = 5
    SPOOL_ERROR = 6
    CODEPAGE = 7
    OTHERS = 8
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
    ELEMENT = 'DATA2'
    FUNCTION = 'SET'
    TYPE = 'BODY'
    WINDOW = 'MAIN'
    IMPORTING
    PENDING_LINES =
    EXCEPTIONS
    ELEMENT = 1
    FUNCTION = 2
    TYPE = 3
    UNOPENED = 4
    UNSTARTED = 5
    WINDOW = 6
    BAD_PAGEFORMAT_FOR_PRINT = 7
    SPOOL_ERROR = 8
    CODEPAGE = 9
    OTHERS = 10
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL FUNCTION 'END_FORM'
    IMPORTING
    RESULT =
    EXCEPTIONS
    UNOPENED = 1
    BAD_PAGEFORMAT_FOR_PRINT = 2
    SPOOL_ERROR = 3
    CODEPAGE = 4
    OTHERS = 5
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL FUNCTION 'CLOSE_FORM'
    IMPORTING
    RESULT =
    RDI_RESULT =
    TABLES
    OTFDATA =
    EXCEPTIONS
    UNOPENED = 1
    BAD_PAGEFORMAT_FOR_PRINT = 2
    SEND_ERROR = 3
    SPOOL_ERROR = 4
    CODEPAGE = 5
    OTHERS = 6
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    <b>reward if it helps u..
    sai ramesh</b>

  • How to trigger different page formats dynamically in smartforms

    Hi ,
    I have a requirement in smartform,want to trigger different page formants based on country code  for ex if country code is ZA12  then pageformant should be DINA4 else page format should be LETTER.
    Rgrds
    Vasumathi

    Hi,
    According to me, you have to create 2 smartforms, one in DINA4 and other in LETTER format.
    In your driver program, you have to maintain condtion depending on country code.
    if country code = 'ZA12'.
    call fm <--- DINA4 format
    else.
    call fm  <--- LETTER format
    endif.
    Regards,
    Naveen

  • Different page formats in single Smartform

    Hello Experts,
    I have an requirement in my custom Smartforms. I want my first page as by default DINA4 page in where as from second onwards, I want DINA3 page format. Could it be possible? If yes, how I can achieve this? Thanks in advance.

    Hi Mayuresh,
    You can't give two page format in one smartform
    The page format are declared  in form attributes it will be same for all pages
    one thing you can do is change it to landscape or potrait.
    Regards
    Arun VS

  • ADOBE READER (9.4.1) prints several files from one Word doc with different pages formats

    I work with Word for Mac, version 11.6.1
    When I have one document with several pages setup (say different sizes, or landscape and vertical orientation) and I need to convert to PDF, I got several PDF files, one for each page section of my document.
    How can I get only one PDF for my whole document ?
    Thanks a lot.
    STURIONE
    Santiago - Chile
    Feb 05, 2011

    Thank you, MichaelKazlow, for your reply/suggestion.
    Actually, I'm not very familiar with this kind of technology, so I'll do my best trying to find out solution following your recommendation.
    Tks again.

  • Multiple page format for single smartforms

    We have a requirement to get the output in different page formates for a smartform.
    How to achieve this???

    suppose you r using a program to print the smartform.
    Just check this program.
    REPORT z_sf_demo1 .
    PARAMETERS p_bukrs LIKE ekko-bukrs.
    DATA: fm_name TYPE tdsfname.
    DATA: ssfctrlop LIKE ssfctrlop.
    Function to get the function name to run SMART FORM.
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    EXPORTING
    formname = 'ZJAYRA_DETAIL'
    VARIANT = ' '
    DIRECT_CALL = ' '
    IMPORTING
    fm_name = fm_name
    EXCEPTIONS
    NO_FORM = 1
    NO_FUNCTION_MODULE = 2
    OTHERS = 3
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    To pass parameters for CONTROL_PARAMETERS
    ssfctrlop-no_open = ' '.
    ssfctrlop-no_close = 'X'.
    CALL FUNCTION fm_name
    EXPORTING
    ARCHIVE_INDEX =
    ARCHIVE_INDEX_TAB =
    ARCHIVE_PARAMETERS =
    control_parameters = ssfctrlop
    MAIL_APPL_OBJ =
    MAIL_RECIPIENT =
    MAIL_SENDER =
    OUTPUT_OPTIONS =
    USER_SETTINGS = 'X'
    bukrs = p_bukrs
    IMPORTING
    DOCUMENT_OUTPUT_INFO =
    JOB_OUTPUT_INFO =
    JOB_OUTPUT_OPTIONS =
    TABLES
    EXCEPTIONS
    formatting_error = 1
    internal_error = 2
    send_error = 3
    user_canceled = 4
    OTHERS = 5
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    To pass parameters for CONTROL_PARAMETERS
    ssfctrlop-no_open = 'X'.
    ssfctrlop-no_close = ''.
    ssfctrlop-startpage = 'PAGE2'.
    Function to run SMART FORM from third page to last page.
    CALL FUNCTION fm_name
    EXPORTING
    ARCHIVE_INDEX =
    ARCHIVE_INDEX_TAB =
    ARCHIVE_PARAMETERS =
    control_parameters = ssfctrlop
    MAIL_APPL_OBJ =
    MAIL_RECIPIENT =
    MAIL_SENDER =
    OUTPUT_OPTIONS =
    USER_SETTINGS = 'X'
    bukrs = p_bukrs
    IMPORTING
    DOCUMENT_OUTPUT_INFO =
    JOB_OUTPUT_INFO =
    JOB_OUTPUT_OPTIONS =
    TABLES
    EXCEPTIONS
    formatting_error = 1
    internal_error = 2
    send_error = 3
    user_canceled = 4
    OTHERS = 5
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ssfctrlop-no_open = 'X'.
    ssfctrlop-no_close = ''.
    ssfctrlop-startpage = 'PAGE3'.
    Function to run SMART FORM from third page to last page.
    CALL FUNCTION fm_name
    EXPORTING
    ARCHIVE_INDEX =
    ARCHIVE_INDEX_TAB =
    ARCHIVE_PARAMETERS =
    control_parameters = ssfctrlop
    MAIL_APPL_OBJ =
    MAIL_RECIPIENT =
    MAIL_SENDER =
    OUTPUT_OPTIONS =
    USER_SETTINGS = 'X'
    bukrs = p_bukrs
    IMPORTING
    DOCUMENT_OUTPUT_INFO =
    JOB_OUTPUT_INFO =
    JOB_OUTPUT_OPTIONS =
    TABLES
    EXCEPTIONS
    formatting_error = 1
    internal_error = 2
    send_error = 3
    user_canceled = 4
    OTHERS = 5
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    I have also sent a mail to your gmail id regarding the details of my program.
    Hope your query will be solved.
    <b>Rewards pioint for helpful answers.</b>
    Regards,
    Abhay.

  • Cant print PO - wrong page format

    Hi all
    I have a smartforms to print PO.
    I encounter this problem which some PO cant be print while some other PO can be printed.
    Its quite confusing since only some cant be print.
    Below is the message:
    Form TXT_CONTACT has wrong page format.
    Message no. SSFCOMPOSER026
    Diagnosis
    Form TXT_CONTACT has a different page format than the forms output previously but has been added to the same spool request.
    System Response
    Form TXT_CONTACT ist not processed.
    Procedure
    While forms are formatted (FM SSFCOMP_OPEN to FM SSFCOMP_CLOSE), the page format must not be changed. All forms within one spool request must have the same page format.
    The first page format used, in this case paper format , is applicable to all subsequent forms.
    Please guide me.
    Thanks in advance

    Hi,
    Check the NEXT page's PAGE FORMAT what is used in the smartform and make it the same as that of the FIRST page.
    I believe the POs which are not being able to print do spill over into the next pages.
    Regards,
    Ram

  • How can we change page format from A6 to A4 in smart forms

    Hi,
    Currently smart form is printing output in A6 page.Now my customer wants in A4 page.How can we change the page format from A6 to A4.Now the output should print in A4 page instead of A6 page.
    I checked the page format in form attribtes it is DINA4.Do in need to change the page format here.
    Is there any settings for this.Plase advice.I appriciate your guidence in this regard.Thanks in advance

    Hi Vijay,
       As the form is formated to A4, now the one A4 sheet and take a print out as well take a print with A6 sheet check the difference.  If the data is not printed in right way then u need to do alignment.
    If it's printing in the same as it used to be, then check the settings in SPAD. 
    Br,
    Laxmi.Suryadevara

  • Whats mass printing ?multiple page formating?

    whats mass printing ?multiple page formating?

    hi..
    plz follow the mentioned web link for mass printing ..
    and multiple page formatting is ...
    sapscript does not support multiple page formatting where as smartform does.
    Multiple page formating is nothing havinfg different page formats in  a form.
    eg..
    sapscript zform has 3 pages..
    1 page has portrait
    2 page has landscape format and 3rd page has landascape.
    this is not possible with sapscript..it tends to error. however, you can do so in smartform. Also this is sometime possible in sapscript by creating different form for each page and using the same print program.
    regrds,
    shamim.

  • Page Format different than doc

    I have converted a pdf file to a word doc so I can insert into my document but the margins are different and the form is being cut off when I insert.  I cannot change the margins on my document do to the large content. How can I get it to fit?

    Hello Peter,
    All our projects reside on a shared network drive. We both
    have access to them. When I say "my PC" or "my partner's PC", I
    mean that the project is open on my or my partner's PC. But it is
    the same project, not a copy of the project.
    We tried your suggestion, and both projects generated letter
    size documents on my side, and A4 documents on her side.
    Since my original post, we have reinstalled RH as suggested
    on a different message board. This did not solve this problem. We
    have checked and installed update files from the Adobe site - no
    change. We've even had our techies poke around, but they couldn't
    come up with anything.
    Our only working solution so far is to generate the Word
    document and change the page format manually. Which doesn't sound
    too bad, except that 2 of our projects each require 17 different
    pdf files - so it makes for a lot of manual attention as opposed to
    a simple "Batch Generate".
    As I wrote in my first post, I'm not sure if this is a RH
    issue, so I really appreciate any help you can provide.
    Thanks
    Ben

  • Check Printing on two Different pages

    Hi all,
    Is it possible to print one page PLD on two Different pages. Actually my client  wants  to print one PLD on two different pages, he wants that one page print the acknowledgement letter and then vendor name, amount, date, amounts in words should be printed on the checks.
    With Regards,
    Pankaj Sharma.

    Hi Pankaj Sharma,
    Check Printing PLD is hard coded in the system.  I don't think you have any easy solutions for this.  If you tried already, you must know it already.
    Thanks,
    Gordon

  • !Format event, Global fields & different pages

    Hi, very new to Output Designer and having a couple of head scratching moments with something I've been asked to do.
    I have a requirement to show or not show a barcode dependant on the initial chartacter of an order number. However, the order number and barcode are on different pages. I changed the order number on page 1 to be a global field, but when I go into the !Format event for the barcode field on page 10 it doesn't show up in the globals fields list.
    As a way of testing I put the following code in the format event of another field on page 10, the barcode field page.
    @(If ("@(Substr ("@ORDER_NUMBER.", 1, 1))" == "R", "R", "NOT R"))
    This wouldn't work as it interperates "@ORDER_NUMBER." as a literal string value of @ORDER_NUMBER. and not a global field.
    So, I suppose my question is - Is it possible for a field on one page of a form know what the value of a field on another page is?
    All the best
    Chris

    I believe that if a field is defined as global
    b in the data file
    then it should be able to be referenced on any page. It shouldn't matter what page actually
    b prints
    the field. Effectively, all the global items in the data file are loaded into a "dictionary" and are available for reference anywhere within the form. Unfortunately, the field list provided for the !format event only shows the fields on that page, not all the fields in the form.
    If @ORDER_NUMBER. (as a literal) is what the instruction operates against then the field "ORDER_NUMBER" doesn't exist in the data file. At least that is what some recent testing tells me.

  • ALV printing error - Footer on 3 different pages

    Hi all,
    I created an report which outputs an ALV grid (full screen) with a header and a footer. The ALV grid is created with class CL_SALV_TABLE (incl. methods set_top_of_list for the header, resp. set_end_of_list for the footer). This all works correctly and the print preview looks fine too.
    Problem is a very strange print output:
    In most cases, printing works fine. But sometimes the output is wrongly formatted: is the footer to be printed on two different pages (i.e. the footer is partly printed on the current page, the rest on the next page), the footer will be printed on three pages! The first part on the current page (correct), only one line at the bottom of the second page (wrong) and the rest of the footer on the third page (wrong)! Could it be that this is a print setting problem? Should I add special footer settings?
    I already checked SDN forums and looked at SAP Notes for solutions but could not found any tip on how to solve this.
    Does anyone of you had the same issue before? Or does anyone has an idea how this problem could be solved?
    Thanks a lot!!

    Need suggestions please.

  • Target Named Anchor in a Spry Collapsible Panel from a different page

    Let me start by saying I have combed this forum (and others) looking for a resolution to this.  I am familiar with David Powers solution on Foundationphp.com and am using that code in project to open the collapsible panel from a separate page and it works beautifullly.  The problem I have is that I want the browser to move down to a specific named anchor inside that opened collapsible panel when clicked from a different page.
    Snippets of my current code here.
    Below is the code that I have on an image that when clicked goes to the correct page and opens Panel1.  Works Perfectly!
    <a href="bamboo-species.php?col1=open#CollapsiblePanel1"><img src="images/Content/Photos/HomeScroll/blackTmbor.jpg" width="227" height="175" /></a>
    Below is the link to the .js file and the script in the head of the target page
    <script type="text/javascript" src="SpryAssets/SpryURLUtils.js"></script>
    <script type="text/javascript">
    // Grabs the values of the URL parameters for the current URL.
    var params = Spry.Utils.getLocationParamsAsObject();
    </script>
    Below is the code that I have on the target page for Panel1
    <script type="text/javascript">
    var CollapsiblePanel1 = new Spry.Widget.CollapsiblePanel("CollapsiblePanel1", {contentIsOpen:params.col1 ? true : false},{duration: 1000});
    </script>
    If I have a named anchor say <a name="species1" id="species1"></a> down in the page, how do I target that named anchor from my link on the separate page.  I have tried adding the #species1 to the end of the link on the link page (see below) but with no luck. I believe those were the instructions on foundationphp.com site.
    <a href="bamboo-species.php?col1=open#CollapsiblePanel1#species1"><img  src="images/Content/Photos/HomeScroll/blackTmbor.jpg" width="227"  height="175" /></a>
    I hope (and suspect) that this is an easy fix, I just do not know what it is.  Any help or direction where to look is greatly appreciated.

    I once had the same issue can created a small function that allows me to "jump" to a element.
    function scrollTo( element ){
         var stylize = function( element){ return !+"\v1" ? element.currentStyle : document.defaultView.getComputedStyle( element , null ) },
              getPosition = function( element ){
                   // based on the SpryEffect's module:
                   var computedStyle, tryComputedStyle,
                        position = { x: 0, y: 0 };
                        if ( element.style.left  && /px/i.test(element.style.left) ){
                             position.x = parseInt(element.style.left, 10); // without padding
                        } else {
                             computedStyle = stylize( element );
                             var tryComputedStyle = computedStyle && computedStyle.left && /px/i.test( computedStyle.left );
                             if (tryComputedStyle)
                                  position.x = parseInt( computedStyle.left, 10 ); // without padding, includes css
                             if(!tryComputedStyle || position.x == 0) // otherwise we might run into problems on safari and opera (mac only)
                                  position.x = element.offsetLeft;   // includes padding
                        if ( element.style.top && /px/i.test(element.style.top) )
                             position.y = parseInt( element.style.top, 10); // without padding
                        else
                             if ( !computedStyle )
                                  computedStyle = stylize( element );
                        var tryComputedStyle = computedStyle && computedStyle.top && /px/i.test( computedStyle.top );
                             if ( tryComputedStyle )
                                  position.y = parseInt( computedStyle.top, 10 ); // without padding, includes css
                             if( !tryComputedStyle || position.y == 0 ) // otherwise we might run into problems on safari and opera (mac only)
                                  position.y = element.offsetTop;   // includes padding
                   return position;
              scroll( 0, getPosition( element ).y );
    So now we have a scrollTo function that accepts a pure HTML element as argument, all what is left to do is figure out if we have a hash, and if the anchor exits on the page.
    ( hopes this works, i wrote it without testing, but you get the general idea ):
    if( window.location.hash ){
         var hash = window.location.hash.substr(1), // remove the # from the hash
         element;
         // as anchors can also be used with id attributes, check that first,
         element = document.getElementById( hash );
         // maby we used name="" attribute
         if( !element && ( element = document.getElementsByName( hash )) ){
              element = element[0];
         // if we have a match:
         if( element ){
              // give the collapsible panel some time to init and update the DOM;
              setTimeout(function(){ scrollTo( element ) },0);
    \o/

Maybe you are looking for

  • Unable to write a log file from EJB

    Hi i have a Stateless EJB deployed on OC4J 10.1.3 and it is tryig to create a logfile with the location given in properties file.when it is trying to create the file it is getting Access denied to that particular folder I have changed the folder to a

  • Error in SXMB_MONI in SOAP Header -- Call Adapter

    Hi ALL, Got a problem with monitoring activity. In SXMB_MONI, iam getting errors with Call Adapter section in SOAP HEADER section of the message. The Error part shows the following error: <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> - <!-

  • IWeb opens but there is no project window

    I use iWeb extensively and have never had this issue before. iWeb opens and shows all the menu items but no project window. I used Time Machine to restore an older version of my iWeb Pages folder, didn't work. I used this help discussion (https://dis

  • I need a driver for Officejet 150 Mobile , I am using an iPad air

    I am using an iPad Air with operating iOS 7 This question was solved. View Solution.

  • html:checkbox disabling based on a condition

    does anyone know how to disable the <html:checkbox ?? it should be disabled based on some condition thanks