Using Javascript to create concatenated string from checkbox fields to one text field

Hi. I have a PDF form that I am trying to have output to a spreadsheet that matches my database schema. Here is the dilemna:
* I have a set of checkboxes for available languages (LANGUAGE_ENGLISH, LANGUAGE_SPANISH, etc.) When they export to spreadsheet, the value is TRUE.
* I need to take values from checked boxes and create a single string in a text field called LANGUAGE_DISPLAY (so my UI will not need to do the concatenation). If LANGUAGE_ENGLISH is TRUE (checked), append "English, " to LANGUAGE_DISPLAY, else append "". Then, if LANGUAGE_SPANISH is TRUE (checked), append "Spanish, " to LANGUAGE_DISPLAY, else append "". And on and on
In the LANGUAGE_DISPLAY text field properties, I am inserting a Custom Calculation script to try to achieve this, but am not getting any results. I tried teh following even trying to pull the checkboxes default values and string them together:
box1 = this.getField("LANGUAGE_ENGLISH").value.toSrting();
box2 = this.getField("LANGUAGE_FARSI").value.toSrting();
box3 = this.getField("LANGUAGE_MANDARIN").value.toSrting();
event.value = box1 + ', ' + box2 + ', ' + box3;
I also played with this to get the desired strings output...but to no avail:
if ( LANGUAGE_ENGLISH.rawValue == true )
box1.rawValue = "English, ";
if ( LANGUAGE_FARSI.rawValue == true )
box1.rawValue = "Farsi, ";
if ( LANGUAGE_HEBREW.rawValue == true )
box1.rawValue = "Hebrew, ";
event.value = box1 + box2 + box3;
Then I tried to simplify to see one field output so used this script...still no results:
event.value = "";
var f = this.getField("LANGUAGE_ENGLISH");
if ( f.isBoxChecked() == true) {
event.value = "English";
Couple questions:
1) Am I on the right track with any of these scripts?
2) Is there something else I need to do to get the script to run before running the Create Spreadsheet with Data Files comman in Acrobat to get my csv file output? Maybe there needs to be some event to get the checkbox values read by that field in order to calculate/create the string.
Appreciate any help you can provide.

LiveCycle Designer has shipped with all Acrobat Professional versions since the "Professional" version was introduced with version 6.
You do not let us know want results you get in the field or the JavaScript console.
Using:
box1 = this.getField("LANGUAGE_ENGLISH").value.toString();
box2 = this.getField("LANGUAGE_FARSI").value.toString();
box3 = this.getField("LANGUAGE_MANDARIN").value.toString();
event.value = box1 + ', ' + box2 + ', ' + box3;
returns "Off, Off, Off", when no box is checked and returns "Yes" for the appropriate box being checked when the default value is used for the creation of the check box. So if one would make the 'Export Value' of the box from the default value of 'Yes" to the appropriate language, one would get a more desirable result. But for each unchecked box the value would appear as "Off". So one needs to change the 'Off' value to a null string. But one is still left with the separator when there is an unchecked option.
Using the following document level function:
// Concatenate 3 strings with separators where needed
function fillin(s1, s2, s3, sep) {
Purpose: concatenate up to 3 strings with an optional separator
inputs:
s1: required input string text or empty string
s2: required input string text or empty string
s3: required input string text or empty string
sep: optional separator sting
returns:
sResult concatenated string
// variable to determine how to concatenate the strings
var test = 0; // all strings null
var sResult; // re slut string to return
// force any number string to a character string for input variables
s1 = s1.toString();
s2 = s2.toString();
s3 = s3.toString();
if(sep.toString() == undefined) sep = ''; // if sep is undefined force to null
assign a binary value for each string present
so the computed value of the strings will indicate which strings are present
when converted to a binary value
if (s1 != "") test += 1; // string 1 present add binary value: 001
if (s2 != "") test += 2; // string 2 present add binary value: 010
if (s3 != "") test += 4; // string 3 present add binary value: 100
/* return appropriate string combination based on
calculated test value as a binary value
switch (test.toString(2)) {
case "0": // no non-empty strings passed - binary 0
sResult = "";
break;
case "1": // only string 1 present - binary 1
sResult = s1;
break;
case "10": // only string 2 present - binary 10
sResult = s2;
break;
case "11": // string 1 and 2 present - binary 10 + 1
sResult = s1 + sep + s2;
break;
case "100": // only string 3 present - binary 100
sResult = s3;
break;
case "101": // string 1 and 3 - binary 100 + 001
sResult = s1 + sep + s3;
break;
case "110": // string 2 and 3 - binary 100 + 010
sResult = s2 + sep + s3;
break;
case "111": // all 3 strings - binary 100 + 010 + 001
sResult = s1 + sep + s2 + sep + s3;
break;
default: // any missed combinations
sResult = "";
break;
return sResult;
And the following cleaned up custom calculation script:
box1 = this.getField("LANGUAGE_ENGLISH").value;
box2 = this.getField("LANGUAGE_FARSI").value;
box3 = this.getField("LANGUAGE_MANDARIN").value;
if (box1 == 'Off') box1 = '';
if (box2 == 'Off') box2 = '';
if (box3 == 'Off') box3 = '';
event.value = fillin(box1, box2, box3, ', ');
One will get the list of languages with the optional separator for 2 or more language selections.

Similar Messages

  • How to improve the speed of creating multiple strings from a char[]?

    Hi,
    I have a char[] and I want to create multiple Strings from the contents of this char[] at various offsets and of various lengths, without having to reallocate memory (my char[] is several tens of megabytes large). And the following function (from java/lang/String.java) would be perfect apart from the fact that it was designed so that only package-private classes may benefit from the speed improvements it offers:
        // Package private constructor which shares value array for speed.
        String(int offset, int count, char value[]) {
         this.value = value;
         this.offset = offset;
         this.count = count;
        }My first thought was to override the String class. But java.lang.String is final, so no good there. Plus it was a really bad idea to start with.
    My second thought was to make a java.lang.FastString which would then be package private, and could access the string's constructor, create a new string and then return it (thought I was real clever here) but no, apparently you cannot create a class within the package java.lang. Some sort of security issue.
    I am just wondering first if there is an easy way of forcing the compiler to obey me, or forcing it to allow me to access a package private constructer from outside the package. Either that, or some sort of security overrider, somehow.

    My laptop can create and garbage collect 10,000,000 Strings per second from char[] "hello world". That creates about 200 MB of strings per second (char = 2B). Test program below.
    A char[] "tens of megabytes large" shouldn't take too large a fraction of a second to convert to a bunch of Strings. Except, say, if the computer is memory-starved and swapping to disk. What kind of times do you get? Is it at all possible that there is something else slowing things down?
    using (literally) millions of charAt()'s would be
    suicide (code-wise) for me and my program."java -server" gives me 600,000,000 charAt()'s per second (actually more, but I put in some addition to prevent Hotspot from optimizing everything away). Test program below. A million calls would be 1.7 milliseconds. Using char[n] instead of charAt(n) is faster by a factor of less than 2. Are you sure millions of charAt()'s is a huge problem?
    public class t1
        public static void main(String args[])
         char hello[] = "hello world".toCharArray();
         for (int n = 0; n < 10; n++) {
             long start = System.currentTimeMillis();
             for (int m = 0; m < 1000 * 1000; m++) {
              String s1 = new String(hello);
              String s2 = new String(hello);
              String s3 = new String(hello);
              String s4 = new String(hello);
              String s5 = new String(hello);
             long end = System.currentTimeMillis();
             System.out.println("time " + (end - start) + " ms");
    public class t2
        static int global;
        public static void main(String args[])
         String hello = "hello world";
         for (int n = 0; n < 10; n++) {
             long start = System.currentTimeMillis();
             for (int m = 0; m < 10 * 1000 * 1000; m++) {
              global +=
                  hello.charAt(0) + hello.charAt(1) + hello.charAt(2) +
                  hello.charAt(3) + hello.charAt(4) + hello.charAt(5) +
                  hello.charAt(6) + hello.charAt(7) + hello.charAt(8) +
                  hello.charAt(9);
              global +=
                  hello.charAt(0) + hello.charAt(1) + hello.charAt(2) +
                  hello.charAt(3) + hello.charAt(4) + hello.charAt(5) +
                  hello.charAt(6) + hello.charAt(7) + hello.charAt(8) +
                  hello.charAt(9);
             long end = System.currentTimeMillis();
             System.out.println("time " + (end - start) + " ms");
    }

  • Concatenate strings from more rows into one row.

    Hi,
    what's the name of that analytical function (or connect by) that
    would return strings from more rows as one row concatenated. i.e.:
    (I know this is possible using regular pipelined functions.)
    ROW1:   STR1
    ROW2:   STR2
    ROW3:   STR3
    select tadah().... from ...
    result:
    ROW1: STR1 STR2 STR3Thanks.

    Hi,
    Here's a basic example of SYS_CONNECT_BY_PATH.
    The query below produces one row of output per department, containing a list of the employees in that department, in alphabetioc order.
    WITH     got_rnum     AS
         SELECT     ename
         ,     deptno
         ,     ROW_NUMBER () OVER ( PARTITION BY  deptno
                                         ORDER BY          ename
                              ) AS rnum
         FROM     scott.emp
    --     WHERE     ...          -- Any filtering goes here
    SELECT     deptno
    ,     LTRIM ( SYS_CONNECT_BY_PATH ( ename
                                  , ','     -- Delimiter, must never occur in ename
               )          AS ename_list
    FROM     got_rnum
    WHERE     CONNECT_BY_ISLEAF     = 1
    START WITH     rnum          = 1
    CONNECT BY     rnum          = PRIOR rnum + 1
         AND     deptno          = PRIOR deptno
    ;Output:
    .   DEPTNO ENAME_LIST
            10 CLARK,KING,MILLER
            20 ADAMS,FORD,JONES,SCOTT,SMITH
            30 ALLEN,BLAKE,JAMES,MARTIN,TURNER,WARDThe basic CONNECT BY query would produce one row per employee, for example:
    .   DEPTNO ENAME_LIST
            10 ,CLARK
            10 ,CLARK,KING
            10 ,CLARK,KING,MILLER
            20 ,ADAMS
            20 ,ADAMS,FORD
    ...The WHERE clause: <tt>WHERE CONNECT_BY_ISLEAF = 1</tt> means that we'll only see the last row for every department.
    SYS_CONNECT_BY_PATH (which is a row function, by the way, not an analytic fucntion) puts a delimiter (',' in the example above) before every item on the list, including the first one.
    The query above uses LTRIM to remove the delimiter at the very beginning.
    WM_COMCAT (or the equivalent user-defined STRAGG, which you can copy from AskTom) is much more convenient if order is not important.

  • When creating a pdf from word, adobe moves my text. What? Why?

    Hi,
    When I attempt to create a PDF from a Word file online, text slides all over the place and some gets cut off from my text boxes. Why is this?
    thanks
    cris

    Hi Rob,
    I apologize, but I'm still not quite understanding your workflow.
    You convert a Word doc to PDF and then are you editing the PDF to add a link to somewhere else?
    When you attempt this, windows does not respond.
    If this is the case, you may want to speak to your IT person. It sounds like a system issue. If I am way off, please provide more detail.
    Kind regards, Stacy

  • Broked button that use for turn on e off from Ipod Touch. One friend off mine gave it at february 2011. some can help me what can I do? there is tecnical assistance in Brazil? It didn't fall.

    broked button that use for turn on e off from Ipod Touch. One friend off mine gave it at february 2011. some can help me what can I do? there is tecnical assistance in Brazil? It didn't fall.

    broked button that use for turn on e off from Ipod Touch. One friend off mine gave it at february 2011. some can help me what can I do? there is tecnical assistance in Brazil? It didn't fall.

  • Multiple fields from a rowset into 1 text field

    Is there anyway to take multiple rows from a rowset. And append them together in one text field?
    example
    rowsetloc/county = 33
    rowsetloc/permit = 214
    then in my text box on my form have 33-214.
    I'm using BC4J to develop my applications.
    null

    John,
    You can do this at several BC4J "levels"; I would suggest modifying your view to contain this attribute.
    Modify the SELECT statement of your view to contain something like
    "SELECT
    TheTable.COUNTY,
    TheTable.PERMIT
    TheTable.COUNTY &#0124; &#0124; '-' &#0124; &#0124; TheTable.PERMIT AS SPECIALNUMBER
    FROM THETABLE TheTable"
    So, you are basically creating an attribute by concating two columns from the database.
    Then, you might be able to remove the other attributes, County and Permit. You must provide some logic to provide editability and validation of this new attribute, SpecialNumber. This could be a bit of work...
    Joe

  • Get the value from dropdown list (selectedIndex) and text field -- not working

    Hi All,
    I am trying to find and change by the values selected by user using dropdown and text field. Here is the code.
    ChangeRevDetails();
    function ChangeRevDetails(){
              var myDialog = app.dialogs.add({name:"Enter copyright information"});
    //    var monthlist = col1.dropdowns.add('myList', undefined, myList);
              var col1 = myDialog.dialogColumns.add();
              var col2 = myDialog.dialogColumns.add();
        col1.staticTexts.add({staticLabel:"Month:"});
              col1.staticTexts.add({staticLabel:"Year:"});
        col1.staticTexts.add({staticLabel:"Rev. no.:"});
        var myList = [ "January", "February",  "March", "April", "March", "April", "May", "June", "July", "August", "Sepetember", "October", "November", "December" ];
         var myMonth = col2.dropdowns.add({stringList:myList, selectedIndex:0, minWidth:100});//{minWidth:100});
         var myYear = col2.textEditboxes.add({editContents:"2013", minWidth:100});  
         var MyRev = col2.textEditboxes.add({minWidth:100});
        var RevMonth = (myList [myMonth.selectedIndex]);
        var RevYear = myYear.editContents;
        var RevNumber = MyRev.editContents;
        var RevToReplace1 = RevMonth +", "+ RevYear;
        var RevToReplace2 = RevMonth +", "+ RevYear + " Rev. " + RevNumber;
        var myResult = myDialog.show();
            if(myYear.editContents == "") //entry is ""
            alert("Please enter some text into the contents field.");
            ChangeRevDetails();
            else if(myResult == true) //user entered datas
                alert (RevMonth);
                alert (RevYear);
                alert (RevNumber);
                alert (RevToReplace1);
                alert (RevToReplace2);
                app.findGrepPreferences = NothingEnum.nothing;
                app.changeGrepPreferences = NothingEnum.nothing;
                // grep find/change
                app.findGrepPreferences = app.changeGrepPreferences = null;      
                app.findGrepPreferences.findWhat = "[\\l\\u]+?\\s?\\d{4},?\\s+[\\l\\u]+\\.*\\s+\\d+";
                app.findGrepPreferences.appliedParagraphStyle = app.activeDocument.paragraphStyleGroups.item("Back page"). paragraphStyles.item("Legal_7/9");
                app.changeGrepPreferences.changeTo = RevToReplace1;
                app.changeGrepPreferences.appliedParagraphStyle = app.activeDocument.paragraphStyleGroups.item("Back page"). paragraphStyles.item("Legal_7/9");
                app.activeDocument.changeGrep();
                app.findGrepPreferences = NothingEnum.nothing;
                app.changeGrepPreferences = NothingEnum.nothing;
        else //implies user clicked cancel
        myDialog.destroy();
    The problem is, it is not taking the value which the user selects from the dropdown and the text field. It takes the default value as "January" and the year is "2013" as both of these values are given as selectedIndex:0 and editContents:"2013". I have compared the coding with some other working scripts as well, but it is not working. I have added several alert boxes to check the value we get.
    Also, the find and change is also not working. Please help me on this. Thanks.
    Regards,
    Muthuraj. D

    Change the order for dialogresults:
    var myYear = col2.textEditboxes.add({editContents:"2013", minWidth:100});  
    var MyRev = col2.textEditboxes.add({minWidth:100});
    var myResult = myDialog.show();
    if(myYear.editContents == "") //entry is ""
    alert("Please enter some text into the contents field.");
    ChangeRevDetails();
    else if(myResult == true) //user entered datas
    var RevMonth = (myList [myMonth.selectedIndex]);
    var RevYear = myYear.editContents;
    var RevNumber = MyRev.editContents;
    var RevToReplace1 = RevMonth +", "+ RevYear;
    var RevToReplace2 = RevMonth +", "+ RevYear + " Rev. " + RevNumber;
    didn't have a look for the find change problem

  • Report error when using combo box and one text field is empty

    I'm building an interactive pdf in adobe pro 9. My problem is the following: I have one text field where you can enter a numeric code and that is used to populate another text field when I choose an option on one combo box.For example: suppose I write the code 123 in the text field "A" and that the combo box has two options ("data" and "-"). When I select "-", another text field "B" is empty, while when I select "data" i populate the text field "B" using the code entered "A" with the text "data_123". In order to do this I use the standard javascript code in the Format>Custom tab of the combo-box.
    My questions are:
    - how can I prevent the pdf to proceed selecting an option in the combo box when the field "A" is empty?
    - how can I update the field "B" every time that I change the text in "A"? I found that the text is "B" is updated only when I press the selection in the combo box.

    You can set the combo box to read-only in the Validate event of the A field:
    // Validate script for text field
    getField("combo1").readonly = !event.value;
    To update the value of B when A changes, you can expand the script above to something like:
    // Validate script for text field
    var f1 = getField("combo1");
    var f2 = getField("B");
    // If there is an entry in the A field...
    if (event.value) {
        f1.readonly = false;  // Make sure the combo box is activated
        f2.value = f1.value === "-" ? "" : "fa.value + event.value;  // Update the value of field B
    } else {
        f1.readonly = true;  // Deactivate the combo box
        f2.value = f2.defaultValue;  // Reset field B
    You might also want to reset the combo box somewhere in there, but it's not clear to me when you would want to do that.

  • How Do You Write Thermocouple Readings From Multiple Channels to One Text File?

    Hi Everyone,
    I am having difficulty writing a Labview program that allows me to combine readings taken from 8 thermocouples to one text file. I am using a NI cDAQ - 9174 with NI 9219 modules.
    Attached is a copy of my program thus far. I have figured out how to combine readings from 8 thermocouples to one waveform chart but the text file will infact be more vital.
    I am very new to Labview and only require it for this task so the simpler the solution the better. Apologies for the lack of technical language.
    Any help would be much appreciated.
    Amy

    Here's one simple possibility...
    Of course, this shows incomplete file handling, and you'll probably want to truncate your floating point values to a few decimal places. I have used this kind of operations for generating text and csv files for thermocouples, much like you are doing.
    Good luck!
    Dan

  • Using execute immediate creating a table from another

    hi friend i wanted to create a table from a select statement in a pl sql procedure. i am using execute immediate but getting problems with it pls can anyone help me.
    here is the query i am using
    EXECUTE IMMEDIATE 'CREATE TABLE table_name AS  (SELECT * FROM  a_view   WHERE column_name LIKE '%some_string%');
    i need to know if this can be done and if yes how. pls help me its bit urgent too. the schema name is same and the privileges are available to create tables too.

    Your syntax is wrong.
    If you would use a syntax higlighted editor, it would show.
    Yout try to execute a string where another string is embedded. Please use two times single quote or use the 'q' function:
    This one is correct:
    EXECUTE IMMEDIATE 'CREATE TABLE table_name AS (SELECT * FROM  a_view WHERE column_name LIKE ''%some_string%'')';
    or this one:
    EXECUTE IMMEDIATE q'|CREATE TABLE table_name AS (SELECT * FROM  a_view WHERE column_name LIKE '%some_string%')|';
    good luck

  • Using ME57 to create an RFQ from multiple lines on multiple PRs

    When using ME57 to create RFQs how can I select multiple line items from multiple purchase requisitions to turn into a single RFQ. If I select multiple lines and then use 'RFQ with Vendor', it only selects one line item.  After further research it appears that you can only create only line at a time (very time consuming). 
    If you use ME41 and create with reference to PR then you can not sort or filter columns to allow for easy consolidation.
    Another forum recommended the following when using ME57 which works but it again adds extra steps to the process.
         The whole process is as follows -
         1) When you are in the 'Assign and Process Purchase Requisition' screen, select related PR and then click on 'Without Vendor' icon to flag all PRs for RFQ processing.
         2) Select these PRs again and click further on 'Assignment Overview' icon (Shift and F5). The next screen will appear - Assign and Process requisitions - Overview of Assignments screen.
         3) Select the 'PReq' column and then click further on 'Process Assignment' icon (F2). The next screen will appear where you have to maintain the 'quotation deadline' information.
         4) Then click on 'Continue' icon (enter).
    [http://www.sapfans.com/forums/viewtopic.php?f=6&t=198768]
    So is there any way to either 1) enable sorting of data in ME41 or 2) use ME57 to create one RFQ from multiple line items of multiple purchase requisitions when selecting 'RFQ with Vendor'.

    What is the JPEG specs? What are the specs of the project you're working in?

  • Installing .csf files and using them to create a pdf from Indesign.

    I have a .csf file that was sent to me that I need to:
    1.     Install (not sure how to do that in CS4),
    2.     And be able to use in Indesign when I create a pdf from an Indesign file.
    I'm not sure how to do this.

    Like it or not, InDesign is a color managed application, and your files are all being managed.
    You'll always have less grief if the working spaces match the output, but that isn't always possible. If you want to to convert to the profiles specified in the CSF file, choose one of the "Convert to Profile" settings and select the correct profile as the destination. You'll have two options, preserve numbers, or don't preserve numbers.
    Preserving numbers will cause colors to shift, but will preserve 100% K blacks. Not preseving numbers will change the numbers to give you the closes match possible in appearance, but will royally screw up your 100% K type if going to press.

  • Using JavaScript to create reports listing security settings

    Hi...I'm trying to create an Acrobat 8 batch process using a JavaScript that creates a log/report that lists the security settings for each PDF in a directory. I want to be able to periodically run this script so that I can ensure that (a)each file uses the departmental permissions password and (b) that the set of permissions (copying not allowed etc.) are set according to our standard.
    I've looked at the JavaScript reference etc. but am seriously confused. There's a securityhandler object but how can I use that (or something else) to get a list of the doc's security permissions and to check that password x has been used?
    Many thanks.

    You can try using Auditpol.exe: http://technet.microsoft.com/en-us/library/cc731451%28v=ws.10%29.aspx
    This
    posting is provided "AS IS" with no warranties or guarantees , and confers no rights.   
    Microsoft
    Student Partner 2010 / 2011
    Microsoft
    Certified Professional
    Microsoft
    Certified Systems Administrator: Security
    Microsoft
    Certified Systems Engineer: Security
    Microsoft
    Certified Technology Specialist: Windows Server 2008 Active Directory, Configuration
    Microsoft
    Certified Technology Specialist: Windows Server 2008 Network Infrastructure, Configuration
    Microsoft
    Certified Technology Specialist: Windows Server 2008 Applications Infrastructure, Configuration
    Microsoft
    Certified Technology Specialist: Windows 7, Configuring
    Microsoft
    Certified Technology Specialist: Designing and Providing Volume Licensing Solutions to Large Organizations
    Microsoft Certified IT Professional: Enterprise Administrator
    Microsoft Certified IT Professional: Server Administrator
    Microsoft Certified Trainer
    Thanks but I guess, auditpol ca be used only to manipulate system audit policies. how do I specify a folder and user in auditpol ? I could not find or understand how folder can be included with auditpol command line options.
    Thanks !

  • Creating a String from an array of characters.

    Hi,
    i'm trying to make a string from an array of characters, this i've managed:
    char data[] = new char[x];
    String str = new String(data);My problem is this: Let's say the array of characters has space for 10 chars, but i only input 5, when i convert it to a string, the 5 characters show up fine, but the last remaining characters show up as little boxes ( [] [] [] [] [] ) .
    It there a way to remove these?
    Thanks in advance
    Mike

    jverd wrote:
    georgemc wrote:
    String str = new String(data).trim();
    Does the null character count as whitespace?Seems to. Actually, I'm getting different results depending on the compiler used.
    public static void main(String[] args) {
              char[] c = new char[10];
              for(int i = 0; i < 5; i++) {
                   c[i] = (char) ('a' + i);
              String first = new String(c);
              System.err.println("[" + first  + "]");
              System.err.println(first.length());
              String second = new String(c).trim();
              System.err.println("[" + second  + "]");
              System.err.println(second.length());
         }ECJ-compiled output:
    >
    [abcde
    10
    [abcde]
    5
    >
    javac-compiled output:
    >
    [abcde]
    10
    [abcde]
    5
    >
    Odd

  • Using javascript to delay flash banner from loading

    I have a website built in HTML with a small flash banner. My
    problem is that the flash loads before the rest of the page loads.
    Is there a way to delay the flash from loading using javascript
    until the rest of the page has loaded?
    Thanks for your help.

    It is a bit complicated but you can set a delayed function,
    where you will load the flash banner:
    var interval;
    interval = window.setInterval("loadBanner()", 1000);
    var i = 0;
    function loadBanner() {
    // code for banner load
    it is not a best methode but it works,
    Titti
    http://textures.z7server.com/

Maybe you are looking for