Disallow non digit input in a text field?

Is there a class method in Java SDK to do this easily like in Visual Basic or has it to be coded completely manually?
If the user presses a non digit character then that character should not be printed into the text field.

K this is easy!
I have a class:
import java.awt.event.*;
public class AlphaNumConsumer extends KeyAdapter
//this class is used to consume any alpha letters     
     public void keyTyped(KeyEvent ent)
          char ch = ent.getKeyChar();
          if('0' < ch && ch > '9')
               ent.consume();
and all you do when you declare the textfield anywhere else you do the following:
JTextField field = new JTextField();
AlphaNumConsumer kCon = new AlphaNumConsumer();
field.addKeyListener(kCon);
this will consume and Alpha numeric characters!
Gluck!!

Similar Messages

  • Checking/Validating user input in a text field

    How can I validate a user's input in a text field and require them to input it in the following format:
    AAA 9999-999
    (where A can be letters and 9 can be numbers)
    Is there any documentation on how to validate user inputs in this manner?
    Thanks!
    BoilerUP

    Hi,
    Create a validation PL/SQL process, select Function returning Error and use something similar to the example below.
    I tested it but may be I missed something. I used field name P1_TEST.
    DECLARE
    v_number NUMBER;
    v_error VARCHAR2(1000);
    BEGIN
    --check if you have numbers in positions 5-8 and 10-12
    v_number:=SUBSTR(:P1_TEST,5,4);
    v_number:=SUBSTR(:P1_TEST,10);
    --check string length
    IF LENGTH(:P1_TEST)!=12 THEN
    RETURN 'String length must be 12 characters';
    END IF;
    --check if position 4 is empty
    IF INSTR(SUBSTR(:P1_TEST,4,1),' ')=0 THEN
    RETURN 'There should be a space between letters and numbers';
    END IF;
    --check if position 9 has "-"
    IF INSTR(SUBSTR(:P1_TEST,9,1),'-')=0 THEN
    RETURN 'There should be a dash between numbers';
    END IF;
    --check if positions 1-3 has letters
    FOR i IN 1 .. 3 LOOP
    SELECT ascii(substr(:P1_TEST, i, 1)) INTO v_number
    FROM Dual;
    IF v_number>=48 AND v_number<=59 THEN
    RETURN 'Only letters are allowed in positions 1,2,3';
    END IF;
    END LOOP;
    RETURN NULL;
    EXCEPTION
    WHEN OTHERS THEN
    v_error:=SQLERRM;
    IF INSTR(v_error, 'ORA-06502')>0 THEN
    RETURN '...must be integers only';
    ELSE
    RETURN v_error;
    END IF;
    END;
    I hope it will give you an idea on this type of validation.
    Val

  • Need some help regarding validation of input in a text field

    Hello everyone,
    i am new to all this website designing stuff and is working on my first website (treausre hunt types) and expecting some guidance over here.   :-)
    I have successfully managed to validate the login page using server behaviour.
    Let me explain what i need guidance with.
    After login , the user is redirected to a page where a question is asked and he has to type the answer in the given text field and click on the submit button. Now i want to validate the given answer with the correct one and if it is answered correctly then the user is redirected to the next page.
    the question is what and how am i supposed to do this?  i am using adobe dreamweaver cc and wampserver as localhost.

    This becomes complicated to do it the way you want BUT YOU CAN do it - you just need to be a bit more efficient and get a template together.
    Copy the 4 documents below and paste into seperate DW files to see how this works then look at the code and see if a pattern becomes noticeable to you. What we are doing is adding 1 to each level and checking the user has accumulated a score to that level - if not they are bumped down to the level which they have reached or in the case of not reaching any level to question 1.
    question_1.php:
    <?php
    // Start the session
    session_start();
    ?>
    <?php
    if (isset($_POST['submit'])) {
    $answer = trim($_POST['answer']);
    if(($answer == "Green" || $answer == "green")) {
    $_SESSION['question'] = 2;
    $correct = "<p>Correct Answer</p><p>You will automatically be taken to the next level</p>";
    header( "refresh: 5; url=question_2.php" );
    else {
    $wrong = "<p>Wrong, please try again,</p>";
    ?>
    <!doctype html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>Quiz</title>
    <style>
    p {
    font-size: 20px;
    color:#930;
    margin: 0;
    padding: 10px 0 8px 0;
    </style>
    </head>
    <body>
    <h3>Question 1.</h3>
    <h2>What color is grass?</h2>
    <form id="quiz" action="question_1.php" method="post">
    <label for="answer">Answer<br>
    <input type="text" name="answer" id="answer"></input>
    <input type="submit" name="submit" value="Sumbit">
    </label>
    </form>
    <?php
    if(isset($wrong)) {
        echo $wrong;
    elseif(isset($correct)) {
    echo $correct;
    ?>
    </body>
    </html>
    question_2.php
    <?php
    // Start the session
    session_start();
    ?>
    <?php
    // This sends the user to question 1 if SESSION question has not been set
    if(!isset($_SESSION['question'])) {
    header('Location: question_1.php');
    // This sends the user back if SESSION question is LESS than 2
    if($_SESSION['question'] < 2) {
    header('Location: question_1.php');
    if (isset($_POST['submit'])) {
    $answer = trim($_POST['answer']);
    if(($answer == "Blue" || $answer == "blue")) {
        $_SESSION['question'] = $_SESSION['question']+1;
    $correct = "<p>Correct Answer</p><p>You will automatically be taken to the next level</p>";
    header( "refresh: 5; url=question_3.php" );
    else {
    $wrong = "<p>Wrong, please try again,</p>";
    ?>
    <!doctype html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>Quiz</title>
    <style>
    p {
    font-size: 20px;
    color:#930;
    margin: 0;
    padding: 10px 0 8px 0;
    </style>
    </head>
    <body>
    <h3>Question 2.</h3>
    <h2>What color is the sky?</h2>
    <form id="quiz" action="question_2.php" method="post">
    <label for="answer">Answer<br>
    <input type="text" name="answer" id="answer"></input>
    <input type="submit" name="submit" value="Sumbit">
    </label>
    </form>
    <?php
    if(isset($wrong)) {
        echo $wrong;
    elseif(isset($correct)) {
    echo $correct;
    ?>
    </body>
    </html>
    question_3.php
    <?php
    // Start the session
    session_start();
    ?>
    <?php
    // This sends the user to question 1 if SESSION question has not been set
    if(!isset($_SESSION['question'])) {
    header('Location: question_1.php');
    // This sends the user back if SESSION question is LESS than 3
    if($_SESSION['question'] < 3) {
    header('Location: question_2.php');
    if (isset($_POST['submit'])) {
    $answer = trim($_POST['answer']);
    if(($answer == "Yellow" || $answer == "yellow")) {
        $_SESSION['question'] = $_SESSION['question']+1;
    $correct = "<p>Correct Answer</p><p>You will automatically be taken to the next level</p>";
    header( "refresh: 5; url=question_4.php" );
    else {
    $wrong = "<p>Wrong, please try again,</p>";
    ?>
    <!doctype html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>Quiz</title>
    <style>
    p {
    font-size: 20px;
    color:#930;
    margin: 0;
    padding: 10px 0 8px 0;
    </style>
    </head>
    <body>
    <h3>Question 3.</h3>
    <h2>What color is the sun?</h2>
    <form id="quiz" action="question_3.php" method="post">
    <label for="answer">Answer<br>
    <input type="text" name="answer" id="answer"></input>
    <input type="submit" name="submit" value="Sumbit">
    </label>
    </form>
    <?php
    if(isset($wrong)) {
        echo $wrong;
    elseif(isset($correct)) {
    echo $correct;
    ?>
    </body>
    </html>
    question_4.php
    <?php
    // Start the session
    session_start();
    ?>
    <?php
    // This sends the user to question 1 if SESSION question has not been set
    if(!isset($_SESSION['question'])) {
    header('Location: question_1.php');
    // This sends the user back if SESSION question is LESS than 4
    if($_SESSION['question'] < 4) {
    header('Location: question_3.php');
    if (isset($_POST['submit'])) {
    $answer = trim($_POST['answer']);
    if(($answer == 4 || $answer == 4)) {
    $_SESSION['question'] = $_SESSION['question']+1;
    $correct = "<p>Correct Answer</p><p>You will automatically be taken to the next level</p>";
    header( "refresh: 5; url=question_5.php" );
    else {
    $wrong = "<p>Wrong, please try again,</p>";
    ?>
    <!doctype html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>Quiz</title>
    <style>
    p {
    font-size: 20px;
    color:#930;
    margin: 0;
    padding: 10px 0 8px 0;
    </style>
    </head>
    <body>
    <h3>Question 4.</h3>
    <h2>What  is 2 + 2?</h2>
    <form id="quiz" action="question_4.php" method="post">
    <label for="answer">Answer<br>
    <input type="text" name="answer" id="answer"></input>
    <input type="submit" name="submit" value="Sumbit">
    </label>
    </form>
    <?php
    if(isset($wrong)) {
        echo $wrong;
    elseif(isset($correct)) {
    echo $correct;
    ?>
    </body>
    </html>

  • Cannot input data into Text Field on from Adobe Acrobat  Reader

    I created a form in Acrobat 5 that has check boxes and text fields. Using reader I can open the doc and use check boxes and input text into fields. Once this doc is loaded to our web server and a user opens or downloads the file they can check the boxes but cannot enter any text into the text fields. Am I missing something?
    Thanks in advance

    And so.. what is invalid?
    I've uploaded the pdf files as example:
    My generated pdf
    http://compuhelp.free.fr/adobe/before.pdf
    The modified version by Adobe Acrobat Reader:
    http://compuhelp.free.fr/adobe/after.pdf
    (I can generate a more complexe pdf file with fonts, images,... it will be displayed correctly, but Adobe always want to modifiy it).
    So perhaps I missed somthing into the pdf file format specification ?

  • Tomahawk input calendar readonly text field.

    Hello,
    I am using tomahwk inputCalendar component and I would like the text field to be readonly. Any hints on how to achive that?

    +1 for John's reply.
    If you want to give a value in EL, have an attribute defined in a backing bean with a default value as "This is second test.". Generate accessors for it and use that an expression for the input text (something like "#{<your_bean>.<your_attribute>}")
    -Arun

  • Input ready query text field

    As per previous posts, I have enabled the document property for a char that references the keyfigure and added a field to store the comments.Also added Single Document web item along with the analysis web item.
    But I couldnt find HTML code to make it work .
    Can anyone please provide me the HTML code that is used for this requirement.
    Thanks in advance!

    As per previous posts, I have enabled the document property for a char that references the keyfigure and added a field to store the comments.Also added Single Document web item along with the analysis web item.
    But I couldnt find HTML code to make it work .
    Can anyone please provide me the HTML code that is used for this requirement.
    Thanks in advance!

  • Error checking input text fields.

    Hi
    Just wondering where I find a list of what can be error checked in input text fields?
    I'm looking for things like...
    - checking that letters and not numbers are entered
    - checking that an entered number is in a certain range
    etc...
    Thanks guys
    Shaun

    To restrict input for a text field, use the following AS3 codes:
    myInput.restrict = "A-Z, a-z, ., ,'"; //myInput is the instance name of your text area
    To check the range of the numbers, use the following code:
    myInput.restrict = "0-9";
    myInput.maxChars = 3;
    myBtn.addEventListener(MouseEvent.CLICK, chk);
    function chk(e:MouseEvent):void
        var myString:String = myInput.text;
        var i:Number = Number(myString); //Converting the string to a number variable
        var max:Number = 100; //Maximum range
        var min:Number = 30; //Minimum range
        if (i < max && i > min) //Condition to indicate the range
            trace("Within range");
        else
            trace("Out of range");
    Hope this helps.

  • Unable to clear text Field in Multi Screen JFrame GUI Application

    i am working with a Swing GUI project where I want to accept user input in a
    text field
    I have used singleton pattern which will create only one instance of object
    due to this when i move from one scree to another the input of textfield
    doesnt updated I have used setText method to clear the JTextField but it wont
    works
    Program one -- 1st screen
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.SwingUtilities;
    import java.awt.event.*;
    import javax.swing.JTextField;
    public class Frame1 extends JFrame
    public static Frame1 frame1;
    public JButton button;
    public JTextField input;
    public static Frame1 getInstance()
    if(frame1==null)
    frame1 = new Frame1();
    return frame1;
    public JButton getJButton(String mytext)
    JButton button = new JButton();
    button.setText(mytext);
    button.setBounds(450,450,150,50);
    return button;
    public void myGUI()
    JPanel panel = new JPanel();
    panel.setLayout(null);
    button = getJButton("1st Frame");
    addActionListener(button);
    input = new JTextField(10);
    input.setBounds(200,300,100,30);
    panel.add(input);
    panel.add(button);
    add(panel);
    setUndecorated(true);
    setSize(1024, 768);
    setVisible(true);
    setDefaultCloseOperation(EXIT_ON_CLOSE);
    public void addActionListener(Object obj)
    try{
    JButton button1 = (JButton)obj;
    button.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent ae)
    String text = "";
    input.insert("", 0);
    Frame2.getInstance().myGUI();
    Frame2.getInstance().repaint();
    dispose();
    catch(Exception e1)
    System.out.println("Exception==> "+e1.toString());
    public static void main(String[] args)
    Frame1.getInstance().myGUI();
    Frame1.getInstance().repaint();
    program 2 - 2nd screen
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.SwingUtilities;
    import java.awt.event.*;
    import javax.swing.JTextField;
    public class Frame2 extends JFrame
    static Frame2 frame2;
    public JButton BackButton;
    public JTextField input;
    public static Frame2 getInstance()
    if(frame2==null)
    frame2 = new Frame2();
    return frame2;
    public JButton getJButton(String mytext)
    JButton button = new JButton();
    button.setText(mytext);
    button.setBounds(450,450,150,50);
    return button;
    public void addActionListener(Object obj)
    try{
    JButton BackButton1 = (JButton)obj;
    BackButton.addActionListener(new ActionListener()
    public void actionPerformed(ActionEvent ae)
    input.setText("");
    Frame1.getInstance().myGUI();
    Frame1.getInstance().repaint();
    dispose();
    catch(Exception e2)
    System.out.println("Exception==> "+e2.toString());
    public void myGUI()
    JPanel panel2 = new JPanel();
    panel2.setLayout(null);
    BackButton = getJButton("2nd Screen");
    addActionListener(BackButton);
    input = new JTextField(10);
    input.setBounds(200,300,100,30);
    panel2.add(input);
    panel2.add(BackButton);
    add(panel2);
    setUndecorated(true);
    setSize(1024, 768);
    setVisible(true);
    setDefaultCloseOperation(EXIT_ON_CLOSE);
    In this application the status of TextField input remain same means it shows
    the earlier input in the textfield wnen I come to earlier or next screen.
    what is the solution to clear the TextField input while moving from 1st
    scrren to 2nd screen.

    multiple screens = multiple posts
    well done indeed - just another farking cross-poster
    [http://www.coderanch.com/t/492998/Swing-AWT-SWT-JFace/java/unable-clear-text-box-Multi#2218566]

  • Displaying the value of text field A in text field B

    I have a PDF form with 2 layers. Layer 1 has information, a textfield, and a button. Layer 2 is a certificate design. The user inputs their name in to a textfield called NameEntry.
    When they hit the button, layer 1 disappears -- the instructions and NameEntry box become hidden. Layer 2 is the certificate design and I need a new textfield (which is called NameDisplay) to be populated from inputted information in text field NameEntry.
    The simple answer, I know, is to name both text fields the same. This does not work for me as I need the input textfield to be styled differently (background and border) due to decisions out of my control vs the NameDisplay which will have no background and no border.
    Any ideas? Thanks!

    Use this custom calculation script:
    event.value = this.getField("NameEntry").valueAsString;

  • JTextArea How do I add text on a new line from Text field

    I want to put each new input from the text field at the start of a new line and keep the previous entries at the start of their
    own line.
    I'm doing this but need help with the new line.
    jTextArea1.setLineWrap(true);
    jTextArea1.setWrapStyleWord(true);
    jTextArea1.setEditable(false);
    public void textProcess()
    System.out.println(sourceref1.getSourceText());
    jTextArea1.setText(jTextArea1.getText()+" "+source.getSourceText());
    The above just keeps adding on the new text until I reach the word wrap limit.
    Thanks

    Maybe you should use the escape character. Anyway, you can consider use append(text:String) instead of getText() everytime.
    Eg:
    jTextArea1.append("\n"+source.getSourceText());

  • Text Field Problems

    Subject: Creating a form for user input.
    The text field allows the user to type in more information than the visible portion of the text field. I see where I can limit the number of characters however this is not a good option. Depending on the character or if it is capitalized the total length of the string will change where some text will be hidden or leave too much space before the end. How can the text field stop the user from adding more text when reaching the end?
    Another question:
    My form asks a question where the answer starts on the same line and then continues below. The text field below is much wider (width of the page) where I can't find the option of an odd shape text field to accommodate this. So far I will place a text field on the short line and add another text field on the line below. I can't find where the two text fields can be joined and the text cascade from one to the other.
    My impressioin:
    So far I am not very impressed with the from option as the text fields cannot be sized through the properties.
    You cannot change the text box that the form adds to a check box without deleting the text field and creating a check box. Additionally if you copy and paste a check box multiple times it creates a new check box that is connected to the original. You have to rename each check box otherwise if the user selects a check box all check boxes that was copied and paste will receive a check.
    Similarly if you copy a text field and paste into the form without renaming the field anything you type into the first text field will automatically be shown in all text fields that were paste into the form.
    The text box height does not resize when selecting a font size. You have to go out of edit and type into the text field to see if the  complete font will be shown or there is too much extra space.
    There has to be a better form making software available. Can anyone provide information towards other software that may be more suitable and eliminate the issues pointed out above?
    Thanks for your help

    To prevent the user from entering text beyond the size of the field - set the font's size to anything other than 'Auto', and uncheck the 'Scroll long text' and 'Multiline' checkboxes in the 'Options' tab. If you need multiline text, the text will always scroll. Setting the size to 'Auto' will reduce the text to fit the box (it will fit to one line if multiline is off, or to the entire box if multiline is on)
    Most of your complaints I don't agree with. Why should the field resize when you change the font size? That's up to you to decide the size/position/properties of the field. You do have the ability to select multiple fields and set them to the same height/width/both.
    And copy pasting a field shares the same value, that's a good thing. That allows you to show the same information in multiple areas easily. You need to change the field's name if you want to have a different value (shouldn't the field's name be different if the value it represents is different?).
    There is an alternative to Acrobat PDF forms, you can use Adobe Livecycle to create dynamic PDF forms. It is much more advanced (you can create dynamic fields which change size, can be added as line items, and much more). It's also a much larger learning curve.
    If you think using Acrobats form features a problem, try creating a form in Microsoft Word.

  • Display Text Field data in SmartView

    We have a planning form that accepts input of a text field for a "project name". When I query via SmartView (ad-hoc) it shows a numeric value instead of the field (project name). We have tried creating FR reports to show this information but our reports keep shutting down the services because of performance issues. Does anyone know in which Oracle repository tables does this information get stored (i.e., the Numeric Id value that matches the String value)?

    Hi,
    We have faced exactly the same FR problem number of times in different projects. You haven't mentioned your version number. If it's 9.3 series, there is no solution to your Financial Reporting problem unfortunately. For 11.1.1.1+ though there is one solution. Assuming that you are using Planning details connection, click on top left corner of the grid, on the right hand side, where the properties of grid is listed, you must see a little box about suppression (or hiding) missing planning blocks. Enable this and try again. this will keep only already populated fields in your report, which I'm sure is fine.
    As for your smartview problem, as Rinku suggested essbase connection doesn't bring the text files as these are separately stored in repository. However, you have limited ad-hoc capabilities in System 11 Planning. Look for the key word "smart slice" in the admin guide.
    Cheers,
    Alp

  • HTML/Javascript etc being ran via text fields

    Hello everyone,
    I was just wondering what the implications of a user inputting javascript and other tags are on fields. Is this something to be worried about?
    I realise that it's perfectly possible to insert hyperlinks and what not into a database table this way, so that when they are reported back through Apex, they will appear as the link. But could it be possible to run javascript and other code just from a text field on a screen which also contains a submit button?
    I just want to know how far I need to be careful with such things.
    Thanks in advance for your help!
    Robin
    Edit: Also, what implications do pages with submit functions have on validations created in Apex? If javascript was input into a text field to run on submit, would the validation pick it up, as they seem to run after the page has been submitted?
    Message was edited by:
    User_resU

    Thanks for your help, guys!
    Basically, I've already got a function set up using regular expressions to filter out anything bar spaces inside any <> brackets, so it will return an error.
    I wish I could use a generic escape special characters builtin, but users will sometimes wish to use these characters, so I have to get a bit more detailed.
    What I'm worried about are apex validations...they appear to work after a submit...surely if a page is submitted, then any XSS will run and the effects be carried out?
    Are apex validations for pages and items to be relied upon in these cases? For the most part, when it comes to inserting into a table, I have a js script on a button that fires before the page is submitted in order to prevent anything in <> being inserted into a table. Validations don't have this effect though, and only seem to run on a submit. Isn't running on a submit too late?
    Thanks for your help.
    Robin
    Edit: Just to let you know that I've done my own testing on it, and think that validations do prevent the code running on submit, but just want to be sure, as I know they'll be people who know more than me on the subject.
    I input this
    &lt;script&gt;onsubmit="alert('Hello world');"&lt;/script&gt;
    into a text field and clicked submit with and without a validation attached to the text item, but both didn't interpret the javascript; is this because there's some kind of builtin in Apex that prevents this happening, or is it that other examples of code would be interpreted?

  • How to insert a date picker input text field in a JSF Jsp page

    Hi,
    I have to develop an application using generic facets, unfortunately I am not supposed to use ADF Faces components given by Oracle.
    Now my requirement is, on JSP page an input text field which holds a DATE value is required, it should also have a Date Picker Calendar adjacent to it.
    Could you pls shed some light on this issue and help me out.
    Thanks
    ~Siva(ji)

    <HTML>
    <script language="JavaScript" type="text/javascript">
    <!--
    var pUpWidthc = 300; //Change the pUpWidthc to your requirements.
    var scrAvailc = 400;     //Change to your available screen width. You see in
    //this eBooks' middle frame, the frame width is
                                                                //equal to 410 . So whether your using frames or
                                                                //or a full 800 pixel screen, you must calculate
                                                                //your available screen width.
    var PopUpC = document.getElementById("pUpc");
    document.write('<div id="pUpc" style="visibility:hidden;z-index:4;width:'+pUpWidthc+';position:absolute;"></div>');
    function cstmPup(objC,c){
    popUpC = document.getElementById("pUpc");
    popUpC.innerHTML = c.innerHTML
    popUpC.style.left = getPos(objC,"Left");
    var scrNeedc = getPos(objC,"Left") + pUpWidthc;
    if (scrNeedc > scrAvailc){
    //The number 10 below is an extra offset x value applied when the
    //definitional popup box positions beyond your screen width. You
    //can change this number to fine tune your "beyond screenwidth" positioning.
    var scrOffsetC = getPos(objC,"Left") + pUpWidthc - (scrAvailc);
    popUpC.style.left = getPos(objC,"Left") - (scrOffsetC - 0);
    popUpC.style.top = getPos(objC,"Top") + objC.offsetHeight;
    popUpC.style.visibility = 'visible';
    fill();
    function fill()
         var noOfRows=7,noOfCols=7,i=0,j=0,day=1,x;
    var d1=FirstDayOfWeek(7,2008);
    //40     
         for(i=1;i<noOfRows;i++)
              x=document.getElementById('myTable').insertRow(i);
              for(j=0;j<noOfCols;j++)
                   var y=x.insertCell(j);
                   if( ( i==1 && j<d1))
                   y.innerHTML="";
                   else if(day<=DaysInMonth(7,2008)){
                   y.innerHTML=day;
                   day++;
    //document.write(FirstDayOfWeek(7,2008));
    function FirstDayOfWeek(m,y)
    var i;
    var dow = 6;
    //document.write("Hello");
    for (i=1583; i<y; i++)
    dow += (LeapYear(i)) ? 2 : 1;
    for (i=1; i<m; i++)
    dow += DaysInMonth(i,y);
    return dow % 7;
    function DaysInMonth(m,y)
    // m is the month number (1,2,3,...12), y is the year number (four digits)
    switch (m)
    case 1:
    case 3:
    case 5:
    case 7:
    case 8:
    case 10:
    case 12: return 31;
    case 2: if (LeapYear(y))
    return 29;
    else
    return 28;
    default: return 30;
    function LeapYear(y)
    return (y % 4==0) && ((y % 100!=0) || (y % 400==0));
    function getPos(objC,sPos){
    var iPos = 0;
    while (objC != null) {
    iPos += objC["offset" + sPos];
    objC = objC.offsetParent;}
    return iPos;
    function hPopUpc(){
    popUpC = document.getElementById("pUpc");
    popUpC.style.visibility = 'hidden';
    //-->
    </script>
    <BODY
    <button id="c1" onclick="cstmPup(c1,pUpCstm)">Custom PopUp</button>
    <'div' id="pUpCstm" style="display:none;">
    <'div' id="myid" align="left" style=" width:100%; height:100%; background:#cccccb; border:1px solid black; border-top:1px solid white; border-left:1px solid white; padding:10px; font:normal 10pt tahoma; padding-left:18px "> <b>Rich Message Boxes</b>
    <hr size="1" style="border:1px solid black;">
         <div style="width:220px; font-family:tahoma; font-size:80%; line-height:1.5em"><br>
              <table border ="1" id="myTable">
                   <TR>
                        <TD> SUN </TD>
                        <TD> MON </TD>
                        <TD> TUE </TD>
                        <TD> WED </TD>
                        <TD> THU </TD>
                        <TD> FRI </TD>
                        <TD> SAT </TD>
                   </TR>
              </table>
         <br><br>
         </div>
         <br>
         <div>
    <button tabindex="-1" onclick="hPopUpc()" style="border:1px solid black; border-left:1px solid white; border-top:1px solid white; background:#cccccc ">Close Message</button>
    </div>
    <?BODY
    </HTML>
    Message was edited by:
    mchepuri
    Message was edited by:
    mchepuri
    Message was edited by:
    mchepuri

  • Text input box to show in another text field

    Hello,
    I have a text input box (Text1) showing during a certain label on the stage.  On another label there is another text field (Text2) that is not input-able.  This second text field (Text2) should show whatever the user has inputted in the first text input field (Text1).
    Both of these elements are not symbols and right now they are both text elements.
    Does anyone know how to do this?
    Thanks,
    ~iana~

    I believe the inputField is set accordingly.  And including your reply, here's what I've got on my stage:
    sym.$("Name").attr('contentEditable', true);
    var inputValue = sym.$("Name").value;
    // other text
    sym.$("Signature").html(inputValue);
    Thus far, this does not work. "Name" field is Text1 (inputField) and the "Signature" is Text2 (text box)
    I'm new to all this so I've prob got something wrong...do you know what I should adjust?

Maybe you are looking for

  • Acrobat sdk 9 wizard problem!

    Developing acrobat plug_in with the acrobat wizard ,slecting using mfc,. I creat a dialog in resource  ,when I call the domodal function ,the program crash,why? the program select using mfc in shalled dll,so I use the AFX_MANAGE_STATE marco ,but caus

  • ERROR 500 when testing webservice

    Hy, I work in 10.3.3 weblogic envirement with AIX OS. I've deployed a web service which calls a datasource. I've done the first test at the deployment tests to see the wsdl but i get the error 500. Moreover, i saw these errors in the logfile Could yo

  • PSE 10 freeze problem

    When PSE 10 icon is double clicked and the Organizer/Editor screen appears and Organizer is clicked the small blue screen that shows loading going on freezes at Initializing Model. Thus, the albums do not appear for from 6 to 24 minutes and then func

  • Im signed in with apple id but my sister id pops up when i try gto purchase app

    my apple id is signed in an i can buy music but when i try to buy an app it asks for my sisters id.. how can i get her off to use mine

  • Example provider- XML Portlet

    I'm trying to do something like the XML portlet that is an example in portal, but I can't find any doc on this. Can anyone help me? I've tried with the XML Component from Portal Apps, but it has a bug and we can't continue by that way (we're waiting