POP up TextArea ?

Hi ,
Is there any way to get POP up with text area window , like PopUp LOV .
I have tabular form with comment field which is set to display as text Area .Insted of setting online text area with in a row , I want to have POPUp text area, so that user can enter text there .
Is there any way doing this ?

[Please set your name in the user profile so we know how to address you. Thanks.]
If I understand your question, you have a tabular form that currently displays the comment field and allows updates. I'm guessing that, because of limited real estate, you don't want the comment field on the tabular form? If so, an alternative might be to show/hide that column using a small button on the form. This would have the advantage of keeping all the columns in the same transaction.
Carl Backstrom's sample Apex application shows how to do this with report columns, but I haven't tried it on a tabular form.
http://htmldb.oracle.com/pls/otn/f?p=11933:13
If you really want to do this in a pop-up, you're really just talking about a separate update form with the standard DML processes. Basic steps are to create a new update form, select the primary key and the comment column as updateable, no tabs or breadcrumb reagion, and change the page template to a minimalist style (like popup). Then you'd need to edit the tabular form to pass the primary key. The difficult thing is that the row to be edited would need to already exist when they open the popup. That's because the popup update form would need to have a row to actually update in a different transaction . So this couldn't work with a new row before it's saved.
I hope this helps.
Good luck,
Stew
My Apex blog:
http://stewstools.wordpress.com/

Similar Messages

  • APEX pop-up textarea on form

    I am trying to create a "link" on a tabular form to an Impromptu pop-up for a textarea. I was using Dan McGhan's guide on his blog Dan McGhan's Oracle Blog: Popup In Report. Admittedly the explanation is a few years old. So maybe it does not work any longer.
    It does display the pop-up correctly. But it does not update the database column. Nor does a value appear associated with the hidden field. I believe I have the code customized correctly. The ID of the column is F02. And the item for the text area is F10 in my case.
    I've set it up here. The credentials are DEMO/DEMO. Thanks.
    https://apex.oracle.com/pls/apex/f?p=24670:1:12769172543530:::::  

    I checked using firebug. If i type something and clicked ok button in pop-up window means It (the value) should populate into the hidden item(f10) in your case. but the hidden item is not getting populated. I am not able to login into your workspace as a developer. Can plz check, how you are populating the value from pop-up text field to hidden item?..
    If the value populated in hidden item then definitely it will store in database column.
    Also i checked in Dan McGhan's example for this using firebug. There the value is populated to hidden item. I think you missed something for populating the hidden item. Plz check.
    If you can share your workspace details as a developer.
    Thanks
    Lakshmi

  • How to pop up "save" and "open" window - Help with construct xml

    In my report there is a column link which is pointing to another HTML page that has xml data displayed in a textarea field. So when user clicks on the column link, he gets to directed to the page that have the xml data in text format.
    My question is, how can i make the xml data display as a file, so when the user clicks on the column link, a window with "save" and "open" will pop up so the user can save the xml data as a file?
    Has anyone done something similar like this? any help is appreciated!
    Regards,
    gina
    Message was edited by:
    gina

    Thank you Tine, I tried to use the 'Export XML' report template and tried to do the following query:
    SELECT XMLElement("oai_dc:dc",
    XMLAttributes('http://www.openarchives.org/OAI/2.0/oai_dc/' AS "xmlns:oai_dc",
                        'http://purl.org/dc/elements/1.1/' AS "xmlns:dc",
    'http://www.w3.org/2001/XMLSchema-instance' AS "xmlns:xsi",
    'http://www.loc.gov/mods/v3' AS "xmlns:mods"
    XMLForest(
    dctitle AS "dc:title",
    dccreator AS "dc:creator",
    dcsubject AS "dc:subject",
    dcdescription AS "dc:description",
    dccontributor AS "dc:contributor",
    dcdiscovery AS "dc:discovery",
    dctype AS "dc:type",
    dcformat AS "dc:format",
    LOWER('ksl:posters-' || dcidentifier) AS "dc:identifier",
    dcsource AS "dc:source",
    dclanguage AS "dc:language",
    dcrelation AS "dc:relation",
    dccoverage AS "dc:coverage",
    dcrights AS "dc:rights")) AS "RESULT"
    FROM table_name
    and here is what returned in the “save as" file:
    <?xml version="1.0" encoding="utf-8" ?>
    - <XMLREPORTREGION>
    - <ROW ROWNUM="1">
    <RESULT>[datatype]</RESULT>
    </ROW>
    </XMLREPORTREGION>
    How can i construct the query so that it returns the data in xml format like the following?:
    oai_dc:dc xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
    <dc:title>Rose</dc:title>
    <dc:creator>Smith Black</dc:creator>
    <dc:contributor>Smith Black</dc:contributor>
    <dc:type>Stencil</dc:type>
    <dc:format>image/tiff</dc:format>
    <dc:format>image/jp2</dc:format>
    <dc:description>13 3/4" X 9 1/2"</dc:description>
    <dc:relation>Some collection</dc:relation>
    <dc:date>1987</dc:date>
    <dc:subject type="LCSH">Art Project</dc:subject>
    <dc:subject type="LCSH">........</dc:subject>
    <dc:subject type="LCSH">.........</dc:subject>
    <dc:language>eng</dc:language>
    <dc:rights>......<dc:rights>
    <dc:identifier>.....</dc:identifier>
    </oai_dc:dc>
    I don't know much about xml, any help would be really appreciated.
    Thanks,
    gina
    Message was edited by:
    gina

  • Textarea does not work in android!!

    Hello. I need to place a multiline text area for the user to enter and remain in memory. I'm using a "textarea: within a" form "in html5. Everything works fine on iPad, when I test it in Android, the keyboard is not activated.
    I am new in Digital Publishing Suite and I'm doing my first project. I would greatly appreciate if you could help me. I have several days of searching and answer and I exhausted my options. I am working in INDesignCS6 and the tablet i am using to text has Android OS, 4,04

    kmolina, the issue might be the z index not being onfocus or there might be divs overlapping the text area which would prevent the keyboard to appear but still show the text area to be on focus.
    This is also a known issue for Android OS.
    There is a similar discussion at http://stackoverflow.com/questions/3460915/webview-textarea-doesnt-pop-up-the-keyboard where they provide some workarounds.
    This link also has info on text area in Android: http://developer.android.com/guide/topics/ui/controls/text.html
    If those tips do not solve the issue I recommend contacting your Gold support to be investigated by a technical support engineer.

  • How to get selected text values in a textarea by mouse click?

    Hi Everyone,
    What I am trying to do is to click on some texts in a textarea, then get the selected text value.
    If you guys have used an accounting software called Simply Accounting, you might understand better.
    I list all my customer names in a textarea. What I want is, when I click on one customer, another GUI pops up with this customer's information. My problem is that I don't know how to get the selected text value from a textarea.
    Could anyone give a hand here? Thank you in advance.

    Is there some reason you aren't using a JList or
    JTable to display
    the user names/information?Thank you for es5f2000's reply. You just gave me a better idea! There is not a particular reason I have to use TextArea to list my customers. As long as the component can make my idea alive, I definitely use it. Still, if there is any way to get a selected text value, it will help me a lot with my project. Thank you.

  • How can I access the content of a textarea component?

    I'm trying to use a javascript form editor in my jsf project.
    The form editor writes to an html <textarea> component.
    The jsp page looks like this:
    <div style="height: 336px; left: 0px; top: 0px; position: absolute; width: 672px">
    <script language="javascript" type="text/javascript">
    tinyMCE.init({
    mode : "textareas",
    theme : "advanced",
    </script>
    <textarea cols="50" name="content" rows="15">This is some content that will be editable with TinyMCE.</textarea>
    </div>
    The content of the <textarea> component is changed with the editor.
    What I need to do is capture that content after it has been edited.
    How can I do that??
    Thanks

    I have a similar problem. When I try to watch the rented movie a pop up says "Cannot Open: The content is not authorized"     What exactly is the problem. I'm not in the US at the current moment. I'm in France. But that shouldn't be a problem right?

  • Outlook pops out on form submit

    I am making a form on Dreamweaver CC and I want to integrate that form in a Muse website and when I click submit, a window from Outlook pops out to send an e-mail to the recieptient e-mail.
    I already read here but I don't know if I can integrate a PHP script with Adobe Muse files on my server. Would they enter in conflict or that's fine?
    This is the code of the form:
    <form action="mailto:[email protected]" method="get" enctype="text/plain" name="form1">
    <p>
      <label for="textfield"><strong>Name:</strong></label>
      <input type="text" name="textfield" id="textfield">
      <label for="email"><strong>Email:</strong></label>
    <input type="email" name="email" id="email">
    </p>
    <p>
      <label for="textfield2"><strong><br>
        PICK-UP<br>
        <br>
        Location:</strong></label>
      <input type="text" name="textfield2" id="textfield2">
      <label for="date"><strong>Date:</strong></label>
      <input type="date" name="date" id="date">
      <label for="time"><strong>Time:</strong></label>
      <input type="time" name="time" id="time">
    </p>
    <p>
      <label for="textfield3"><strong><br>
        DROP-OFF<br>
        <br>
        Location:</strong></label>
      <input type="text" name="textfield3" id="textfield3">
      <label for="date2"><strong>Date:</strong></label>
      <input type="date" name="date2" id="date2">
      <label for="time2"><strong>Time:</strong></label>
      <input type="time" name="time2" id="time2">
    </p>
    <p>
      <label for="textfield4"><strong><br>
        Type of Car:</strong></label>
      <input type="text" name="textfield4" id="textfield4">
    </p>
    <p>
      <label for="textarea"><strong><br>
        Notes/Extras:</strong> <em>(i.e.: GPS, Baby Seat, etc...)</em><br>
      </label>
      <textarea name="textarea" id="textarea" cols="45" rows="5"></textarea>
    </p>
    <p> </p>
    <p>
      <input name="submit" type="submit" id="submit" formaction="Submit Form" formmethod="GET" value="Send">
    </p>
    </form>
    Waiting an answer.
    Best wishes,
    Miguel

    Mailto: links on form submit are not reliable for several reasons.
    Most web mail users do not have Outlook or similar e-mail clients installed on their system. When they click your submit button, nothing will happen.
    Mailto: links do not hide your e-mail address from harvesters and spam bots. 
    Your form is not secure from spam bots and hackers.
    AFAIK, Muse does not support server-side scripting.  But that shouldn't preclude you from using a contact form with a separate form-to-email processing script.  You point your HTML form to the script using the action attribute.
    <form action="your_script.php"
    Which script depends on your server.  Ask your hosting provider if they have scripts you can use.  If they don't, find out which server-side languages your hosting plan supports -- php, asp.net, coldfusion, perl, etc...
    This will narrow your search form appropriate scripts you can use.
    Nancy O.

  • Date time picker script does not look right when calender pops up

    When I use this script in my header, my date time picker does not look right.  The pop up calender works but the layout is off,  here is the code I am adding to my header:
    <link href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.2/css/bootstrap-combined.min.css" rel="stylesheet">
        <link rel="style.css" type="text/css" media="screen"
         href="http://tarruda.github.com/bootstrap-datetimepicker/assets/css/bootstrap-datetimepicker.min .css">
    And here is the code I am adding to the body of the html page below: Is it the placement of the code in the header? I've tried the beginning and the end of the hearder but no difference.  Thanks for your time on this....
    <div id="datetimepicker" class="input-append date">
    <input type="text"></input>
    <span class="add-on">
    <i data-time-icon="icon-time" data-date-icon="icon-calendar"></i>
    </span>
    </div>
    <script type="text/javascript"
    src="http://cdnjs.cloudflare.com/ajax/libs/jquery/1.8.3/jquery.min.js">
    </script>
    <script type="text/javascript"
    src="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.2/js/bootstrap.min.js">
    </script>
    <script type="text/javascript"
    src="http://tarruda.github.com/bootstrap-datetimepicker/assets/js/bootstrap-datetimepicker.min. js">
    </script>
    <script type="text/javascript"
    src="http://tarruda.github.com/bootstrap-datetimepicker/assets/js/bootstrap-datetimepicker.pt-B R.js">
    </script>
    <script type="text/javascript">
    $('#datetimepicker').datetimepicker({
    format: 'MM/dd/yyyy hh:mm:ss',
    language: 'en'
    </script>

    Page is not up yet, can I attach the html to this forum?  I'l cut and paste the html below, thanks
    <!DOCTYPE html>
    <!-- Consider specifying the language of your content by adding the `lang` attribute to <html> -->
    <!--[if lt IE 7]> <html class="no-js ie6"> <![endif]-->
    <!--[if IE 7]>    <html class="no-js ie7"> <![endif]-->
    <!--[if IE 8]>    <html class="no-js ie8"> <![endif]-->
    <!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
    <head>
    <!-- this is the header code for the date/time picker-->
      <link href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.2/css/bootstrap-combined.min.css" rel="stylesheet">
        <link rel="style.css" type="text/css" media="screen"
         href="http://tarruda.github.com/bootstrap-datetimepicker/assets/css/bootstrap-datetimepicker.min .css">
          <!-- to here-->
        <meta charset="utf-8">
        <!-- Always force latest IE rendering engine & Chrome Frame -->
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <!-- Put your title here! -->
        <title>Hawaii Beach Weddings</title>
        <meta name="description" content="">
         <!-- Mobile viewport optimized: j.mp/bplateviewport -->
        <meta name="viewport" content="width=device-width">
        <link href="style.css" rel="stylesheet">
        <!-- Load Open Sans and Merriweather from Google Fonts
            For optimal performance, customize it to load the styles you need:
            http://goo.gl/QufgJ
        -->
        <link href="//fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700|Merriweathe r:400,700,900" rel="stylesheet">
        <!-- All JavaScript at the bottom, except for Modernizr
            Modernizr enables HTML5 elements & feature detects; It includes Respond, a polyfill for min/max-width CSS3 Media Queries
            For optimal performance, use a custom Modernizr build: www.modernizr.com/download/ -->
            <script src="js/modernizr-2.6.1.min.js"></script>
        <script src="js/modernizr-2.6.1.min.js"></script>
    </head>
    <body>
        <!-- Prompt IE 6 and 7 users to install Chrome Frame:        chromium.org/developers/how-tos/chrome-frame-getting-started -->
        <!--[if lt IE 8]>
            <p class="chromeframe alert alert-warning">Your browser is <em>ancient!</em> <a href="http://browsehappy.com/">Upgrade to a different browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">install Google Chrome Frame</a> to experience this site.</p>
        <![endif]-->
        <header id="master-header" class="clearfix" role="banner">
            <hgroup>
                <h1 id="site-title"><a href="index.html" title="Your Site Name">Hawaii Beach Weddings</a></h1>
                <h1 id="site-title2"><a href="index.html" title="Your Site Name">xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</a></h1>
                <h2 id="site-description">Where the Sun, Sand and Love come together...</h2>
            </hgroup>
        </header> <!-- #master-header -->
    <div id="main" class="row">
        <!-- Main navigation -->
        <nav class="main-navigation span12 clearfix" role="navigation">
            <h3 class="assistive-text">Main menu</h3>
            <ul>
                <li><a href="index.html">Home</a></li>
                <li class="current">
                    <a href="about.html">About</a>
                    <ul class="sub-menu">
                        <li><a href="http://www.google.com">Subpage 1</a></li>
                        <li><a href="#">Subpage 2</a></li>
                    </ul>
                </li>
                <li><a href="contact.html">FAQ's</a></li>
            </ul>
        </nav> <!-- #main-navigation -->
    <div id="content" role="main" class="span12">
        <article class="page hentry">
            <header class="entry-header">
                <h1 class="entry-title">Simple Beach Weddings</h1>
            </header> <!-- .entry-header -->
            <div class="entry-content">
                <p>We specialize in simplicity for your beach wedding.  Let us keep it simple by offering what you need to make your beach wedding easy </p>
                <!-- Typography
                ================================================== -->
                <section id="typography">
                    <h1>I am first a photographer who loves to<small></small>capture &quot;the moment.&quot;</h1>
                    <p>By organizing Hawaii Beach Weddings, I have allowed myself to do what I do best: capture your moment. I use industry professionals to make a sometimes stressful event easy. By keeping it to a few simple choices: A Minister (necessary), Flowers, Music, Video, Chairs (optional), I have allowed you to quickly design your wedding event and enjoy your stay in the islands. </p>
                        <div class="row">
                            <div class="span7">
                                <h2>Ministers:</h2>
                                <h3>Reverand Robert Hoyt</h3>
                                                <p> </p>
                            </div>
                    </div>
                      <h2> </h2>
                        <div class="row"></div>
                        <div class="row">
                  </div>
                    <h2> </h2>
                </section>
                <section id="tables">
                  <div class="row">
                  </div> <!-- .row -->
                </section> <!-- #tables -->
                <!-- Forms
                ================================================== -->
                <section id="forms">
                    <h1>Let's begin with your contact information.</h1>
                    <form class="row">
                        <fieldset class="span5">
                          <p>
                            <label>Name
                              <input type="text" required></label></p>
                              <br>
                              <p><label>Phone number with area code <input type="text" pattern="\d{5}(-\d{4})?" title="a US Zip code, with or without the +4 exension" placeholder=" 123-456-7891"></label></p>
                              <br>
                              <p>
                              <label>Email
                              <input type="email"></label></p>
                              <br>
                              <h1>Where would you like your wedding to be?</h1>
                 <p><label>Honolulu (South Oahu)<input type="radio" name="rad"></label></p>
                 <p><label>Waimanalu (East Oahu) <input type="radio" name="rad"></label></p>
                    <br>     
                    <h1>What date & time would you like to have your wedding?</h1>
                     <!--This is the date/time picker-->
                          <div id="datetimepicker" class="input-append date">
          <input type="text"></input>
          <span class="add-on">
            <i data-time-icon="icon-time" data-date-icon="icon-calendar"></i>
          </span>
        </div>
        <script type="text/javascript"
         src="http://cdnjs.cloudflare.com/ajax/libs/jquery/1.8.3/jquery.min.js">
        </script>
        <script type="text/javascript"
         src="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.2/js/bootstrap.min.js">
        </script>
        <script type="text/javascript"
         src="http://tarruda.github.com/bootstrap-datetimepicker/assets/js/bootstrap-datetimepicker.min. js">
        </script>
        <script type="text/javascript"
         src="http://tarruda.github.com/bootstrap-datetimepicker/assets/js/bootstrap-datetimepicker.pt-B R.js">
        </script>
        <script type="text/javascript">
          $('#datetimepicker').datetimepicker({
            format: 'MM/dd/yyyy hh:mm:ss',
            language: 'en'
        </script>
        <br>
                         <h1>What type of flowers would you like to have?</h1>
                         <p>
                                <label>Bouquet<br>
                                    <select>
                                        <option>None</option>
                                        <option>Red roses</option>
                                        <option>White roses</option>
                                        <option>Hibiscus</option>
                                    </select>
                                </label>
                            <p>
                                <label>Flowers<br>
                                    <select>
                                        <option>None</option>
                                        <option>Roses</option>
                                        <option>Orchids</option>
                                        <option>Hibiscus</option>
                                    </select>
                                </label>
                                  <h1>What type of Leis would you like to have?</h1>
                                <label>Leis<br>
                                    <select>
                                        <option>None</option>
                                        <option>Kukui nut (male)</option>
                                        <option>Orchids (inexpensive)</option>
                                        <option>Stephanotus (sweet smelling</option>
                                    </select>
                                </label>
    </fieldset>
    <fieldset class="span4">
                          <p>
                           <!--this is the chair number selector-->
                            <p>
                               <label>Music<br>
                                    <select>
                                        <option>None</option>
                                        <option>solo singer with ukulele</option>
                                        <option>solo singer with guitar</option>
                                        <option>solo guitar instrumental</option>
                                        <option>small ensemble</option>
                                    </select>
                                </label>
                              <br>
                              <label for="s">Number of Chairs</label><p>
                                <select id="s">
                                    <option>none</option>
                                    <option>1</option>
                                    <option>2</option>
                                    <option>3</option>
                                    <option>4</option>
                                    <option>5</option>
                                    <option>6</option>
                                    <option>7</option>
                                    <option>8</option>
                                </select>
                            </p>
                            <p>
                              <label for="t">Notes</label> <textarea id="t" cols="30" rows="5">Textarea text</textarea></p>
                        </fieldset>
                <!-- Miscellaneous
                ================================================== --><!-- #miscellaneous -->
            </div> <!-- .entry-content -->
        </article> <!-- .post.hentry -->
    </div> <!-- #content -->
    </div> <!-- #main -->
        <footer id="footer" role="contentinfo">
            <!-- You're free to remove the credit link to Jayj.dk in the footer, but please, please leave it there -->
        </footer> <!-- #footer -->
        <!-- Grab Google CDN's jQuery, with a protocol relative URL; fall back to local if offline -->
        <script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
        <script>window.jQuery || document.write('<script src="js/jquery-1.7.2.min.js"><\/script>')</script>
        <!-- Load custom scripts -->
        <script src="js/script.js"></script>
    </body>
    </html>

  • Dynamic linking within TextArea component

    how can i include an MC or button inline within the HTML text
    of a TextArea component -- and also have that object link to an AS
    function? i want to have icons within the text of my TextArea that
    open pop-up windows within the Flash application (MC linkage).
    is this possible?
    is asfunction used? if so how?

    Well if you are still interested in using a text component
    instead of a Button the way you would go about this is using
    textWidth. Here's how I've done it before using a text / label
    whatever you want that shows text.
    // => Set our text we got from database
    myText.text = "This is the text I got from the DB";
    // => Validate it so that way we make sure we get right
    numbers
    myText.validateNow();
    // => Find out how wide our text really is.
    var textWidth:Number = myText.textWidth
    // => Reset the width of our text component and add 20 for
    a little buffer
    myText.width = textWidth + 20;
    Now my suggestion is if your going to be dynamically creating
    these on the fly from a database call you throw it into a method /
    class and have that do all the work for you so all you have to do
    is pass the text to it and it resizes itself based on the example
    above.

  • Asfunction in textArea?

    I have a textArea component filled with a paragraph of copy.
    I'd like one word to link to another frame in my Flash file
    (gotoandStop function, I'm thinking). Do I place my "var..." code
    at the top of the paragraph, or as another action? The text is
    called into the textArea box via an action. I think I need to use
    an asfunction, but am unsure. It seems like it should be a pretty
    easy thing – hyperlink to another place in my Flash
    presentation by clicking on a word? Why does it seem so hard? You
    can tell I'm a designer, not a programmer, and all this
    actionscript stuff is confusing to me.

    any follow up to this? i am interested ...
    how can i include an MC or button inline within the HTML text
    of a TextArea component -- and also have that object link to an AS
    function? i want to have icons within the text of my TextArea that
    open pop-up windows within the Flash application (MC linkage).
    is this possible?
    and how is asfunction used?

  • How to fire event to a textarea?

    Hi all!
    I am developing a small chat application where the data typed at the client on a textarea should be reflected in the textarea at the server. I can send data through the network and append it at the client. But if I want to handle the special keystrokes like backspace and all, I need to manually identify the code for that particular key and then do that operation on the server textarea. But what I am trying is I will send the TEXTEVENT object through the network and using information in it, I will construct a new TEXTEVENT object by changing the source object alone. Then I want to fire that on the textarea. We have a method processTextEvent in TextComponent(base of textarea). But it is protected and so even if I try to extend the textarea and do it, I don't have access to that method.
    Can anyone help me out!
    Thanks in advance.
    Bye
    Vijay

    Here's some code that works in Window$, but fails badly in Solaris 9. In Solaris it doesn't display the characters and produces an "unexpected exception in code outside the JVM".
    Here's the client
    import java.awt.*;
    import java.awt.event.*;
    import java.net.*;
    import java.io.*;
    import java.util.LinkedList;
    public class TestEC extends Frame implements KeyListener
         TextField input;
         Socket sock=null;
         boolean connected = false;
         InputStream is = null;
         ObjectOutputStream oos = null;
         Thread recvThread = null;
         Thread sendThread = null;
         Queue sendQueue = null;
         TestEC()
              input = new TextField(30);
              addWindowListener(new WindowAdapter()
              {public void windowClosing(WindowEvent evt){System.exit(0);}});
              add(input);
              input.addKeyListener(this);
              pack();
         private boolean connect(String address, int port)
              try
                   sock = new Socket(address, port);          // try to connect to port 9999 on my Solaris system
                   is = sock.getInputStream();
                   oos = new ObjectOutputStream(sock.getOutputStream());
                   sendQueue = new Queue();
                   recvThread = new Thread(new Runnable(){public void run(){doRecv();}});
                   recvThread.start();
                   sendThread = new Thread(new Runnable(){public void run(){doSend();}});
                   sendThread.start();
                   connected = true;
              catch(IOException e)
                   System.out.println("failed to connect to: "+address+":"+port);
                   sock = null;
                   connected = false;
              return connected;
         public void keyPressed(KeyEvent e){sendKey(e);}
         public void keyReleased(KeyEvent e){sendKey(e);}
         public void keyTyped(KeyEvent e){sendKey(e);}
         private void sendKey(KeyEvent e)
              sendQueue.push(e);
         public static void main(String[] args)
              String address = "127.0.0.1";
              if(args.length > 0)address = args[0];
              TestEC tec = new TestEC();
              if (tec.connect(address,9999))tec.show();
              else System.exit(0);
         // read and discard until close seen, then shutdown
         private void doRecv()
              int last = 0;
              try{while(connected && -1 != last){last = is.read();}}
              catch(IOException e){e.printStackTrace();}
              connected = false;
              try
                   sock.close();
                   sendThread.interrupt();
              catch(Exception ce){ce.printStackTrace();}
         private void doSend()
              Object obj;
              while(connected)
                   obj = sendQueue.pop();
                   if(obj != null)
                        try{oos.writeObject(obj); oos.flush();}
                        catch(IOException e){e.printStackTrace();}
         // a simple queue class between two threads
         class Queue
              LinkedList q = new LinkedList();
              public synchronized void push(Object obj)
                   q.add(obj);
                   this.notify();     // tell pop to run with it
              public synchronized Object pop()
                   if(q.isEmpty())
                        try{this.wait();}
                        catch (InterruptedException e){return null;}
                   return q.remove(0);
    } And here's the server
    import java.awt.*;
    import java.awt.event.*;
    import java.net.*;
    import java.io.*;
    public class TestES extends Frame
         TextField output;
         Socket sock=null;
         boolean connected = false;
         ObjectInputStream ois = null;
         Thread recvThread = null;
         Thread listenThread = null;
         TestES()
              output = new TextField(30);
              addWindowListener(new WindowAdapter()
              {public void windowClosing(WindowEvent evt){System.exit(0);}});
              add(output);
              pack();
         private void start()
              listenThread = new Thread(new Runnable(){public void run(){doListen();}});
              listenThread.start();
         private void doListen()
              ServerSocket ssock = null;
              try
                   ssock = new ServerSocket(9999);          // listen on port 9999 on this host
                   sock = ssock.accept();
                   ois = new ObjectInputStream(sock.getInputStream());
                   recvThread = new Thread(new Runnable(){public void run(){doRecv();}});
                   recvThread.start();
                   connected = true;
              catch(IOException e)
                   System.out.println("listen failed");
                   sock = null;
                   connected = false;
         public static void main(String[] args)
              TestES tes = new TestES();
              tes.start();
              tes.show();
         // read and process events from socket
         private void doRecv()
              Object obj;
              while(connected)
                   try
                        obj = ois.readObject();
                        postEvent(obj);
                   catch(Exception e){e.printStackTrace(); connected = false;}
              try
                   sock.close();
              catch(Exception ce){ce.printStackTrace();}
         private void postEvent(Object obj)
              output.requestFocus();
              output.dispatchEvent((KeyEvent) obj);

  • Pop up sign up?

    This site has a subscribe button that I like. The only problems are that I know absolutely nothing about java script and nothing about getting forms to send emails.
    Is there any built-in or add-on functions of Dreamweaver that will allow me to make nice pop ups like this one?
    I'm also desperate to learn how to make forms send emails, but every time I try, my eyes cross. I'm not clear on the server-side stuff.
    EDIT: I found this page that seems to work for forms.
    I know this is a tall order, but any help would be appreciated.
    Thanks.

    This may help a bit (see code below) Copy and paste into new Dreamweaver file, save to your site folder.  Shows your form in the lightbox and I have added some javascript validation to the form so it won't get sent without the relevant informtion being provided. Just download the jquery.lightbox_me.js from the url I provided earlier and put it in your site folder. Study the code and then move it over to your page.
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
        <script src="http://code.jquery.com/jquery-1.4.2.min.js" type="text/javascript" charset="utf-8"></script>
        <script src="jquery.lightbox_me.js" type="text/javascript" charset="utf-8"></script>
        <title>Lightbox_me - Stupidly Simple Lightboxing - The jQuery lightbox plugin for people who know what they're doing.</title>
        <script type="text/javascript" charset="utf-8">
    $(function() {
    function launch() {
    $('#subscribe').lightbox_me({centered: true, onLoad: function() { $('#subscribe').find('input:first').focus()}});
    $('#subscribeClick').click(function(e) {
    $("#subscribe").lightbox_me({centered: true, onLoad: function() {
        $("#subscribe").find("input:first").focus();
        e.preventDefault();
    $('table tr:nth-child(even)').addClass('stripe');
    </script>
    <!-- VALIDATE THE FORM  -->
    <script type="text/javascript">
    <!--
    function checkRequiredFormFields() {
    var cf_name = document.forms.contactForm.cf_name.value;
    // inform customer to provide their name
    if (cf_name == null || cf_name == "")
        alert("Please provide your name");
        return false;
    var cf_email = document.forms.contactForm.cf_email.value;
    // inform customer to provide their email address
    if (cf_email == null || cf_email == "")
        alert("Please provide your email address");
        return false;
    var cf_message = document.forms.contactForm.cf_message.value;
    // inform customer to provide their message
    if (cf_message == null || cf_message == "")
        alert("Please provide your message");
        return false;
    } // end function
    -->
    </script>
    <style type="text/css">
    #subscribe {
            padding: 20px;
        display: none;
        background-color: #ffffff;
        border: 1px solid #666;
        border-radius: 10px;
    #subscribeClick {
        background-color:#336;
        text-decoration: none;
        color: #fff;
        display: inline-block;
    padding: 4px 8px;
    border-radius: 5px;
            </style>
    </head>
    <body>
    <div><a href="#" id="subscribeClick" >Subscribe</a>
    <div id="subscribe">
    <form action="../../contact-form/contact.php" name="contactForm" method="post" onsubmit="return checkRequiredFormFields()">
    Your name<br>
    <input type="text" name="cf_name"><br>
    Your e-mail<br>
    <input type="text" name="cf_email"><br>
    Message<br>
    <textarea name="cf_message"></textarea><br>
    <input type="submit" value="Send">
    <input type="reset" value="Clear">
    </form>
    </div>
    </div>
    </body>
    </html>

  • Hyperlinkable TextArea

    Can someone give me a clue on how to make the URL displayed in the TextArea hyperlinkable. The Program displays http://www.yahoo.com but I want to be able to click on it and have it open into a new browser. It currently runs fine without the hyperlink but has compile errors. Thanks :^)
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.border.*;
    import java.awt.event.*;
    import javax.swing.JEditorPane.*;
    import javax.swing.text.html.*;
    public class Hyperlinkdemo
         public static void main(String[] args)
              JEditorPane myEditorPane;
              myEditorPane.addHyperlinkListener(new MyHyperlinkListener());
              final String website = "http://www.yahoo.com";
              JLabel msgLabel = new JLabel("Hyperlinkable Test Program");
              JButton runButton = new JButton("Run");
              final TextArea output = new TextArea(10,30);
              JScrollPane scroller = new JScrollPane(output);
              JFrame frame = new JFrame("Hyperlinkdemo");
              JPanel buttonbox = new JPanel();
              JPanel jp = new JPanel();
              JPanel northPanel = new JPanel();
              frame.getContentPane().setLayout(new BorderLayout());
              jp.setLayout(new FlowLayout());
              jp.add(scroller);
              northPanel.add(msgLabel);
              northPanel.add(runButton);
              website.add(myEditorPane);
              frame.getContentPane().add(northPanel, "North");
              frame.getContentPane().add(jp, "South");
              runButton.addActionListener(new ActionListener(){
                   public void actionPerformed(ActionEvent e){
                        output.append(website + "\n");
              frame.pack();
              frame.show();
         class MyHyperlinkListener implements HyperlinkListener {
         public void hyperlinkUpdate(HyperlinkEvent evt) {
         HyperlinkEvent.EventType type = evt.getEventType();
         if (type.equals(HyperlinkEvent.EventType.ACTIVATED)) {
         myEditorPane.setPage(evt.getURL());
    }

    Well i'm sure there are a lot of others that can help you better than myself, but i think the key to your problem is in your JEditorPane call setEditable(false). The Java API itself has a good example under JEditorPane.
    Here's what i came up with after modifying your code
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import java.awt.event.*;
    import javax.swing.text.html.*;
    import java.io.*;
    public class Hyperlinkdemo
    JEditorPane myEditorPane;     
    final String website = "http://www.yahoo.com";
    public void init()
    myEditorPane = new JEditorPane("text/html","");
    myEditorPane.addHyperlinkListener(new MyHyperlinkListener());
    myEditorPane.setEditable(false);
    JLabel msgLabel = new JLabel("Hyperlinkable Test Program");
    JButton runButton = new JButton("Run");
    JScrollPane scroller = new JScrollPane();
    scroller.setViewportView(myEditorPane);
    scroller.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
    //scroller.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
    JFrame frame = new JFrame("Hyperlinkdemo");
    JPanel buttonbox = new JPanel();
    JPanel northPanel = new JPanel();
    northPanel.add(msgLabel);
    northPanel.add(runButton);
    frame.getContentPane().add(northPanel, "North");
    frame.getContentPane().add(scroller);
    runButton.addActionListener(new ActionListener(){
    public void actionPerformed(ActionEvent e){
    myEditorPane.setText("<a href=\"http://www.yahoo.com\">www.yahoo.com</a>");
    System.out.println(myEditorPane.getContentType());
    frame.addWindowListener(new MyWindowAdapter());
    frame.pack();
    frame.setSize(300,300);
    frame.show();
    class MyWindowAdapter extends WindowAdapter
         public void windowClosing(WindowEvent e)
              System.exit(0);     
    public static void main(String args[])
         Hyperlinkdemo demo = new Hyperlinkdemo();
         demo.init();     
    class MyHyperlinkListener implements HyperlinkListener
    public void hyperlinkUpdate(HyperlinkEvent e)
         HyperlinkEvent.EventType type = e.getEventType();
         if (type.equals(HyperlinkEvent.EventType.ACTIVATED))
              JEditorPane pane = (JEditorPane) e.getSource();
              JEditorPane another = new JEditorPane();
              JFrame newframe = new JFrame("New window");
              if (e instanceof HTMLFrameHyperlinkEvent)
              HTMLFrameHyperlinkEvent evt = (HTMLFrameHyperlinkEvent)e;
              HTMLDocument doc = (HTMLDocument)pane.getDocument();
              doc.processHTMLFrameHyperlinkEvent(evt);
              else
              try
                        another.setPage(e.getURL());
                        newframe.getContentPane().add(another);
                        newframe.pack();
                        newframe.setSize(100,100);
                        newframe.show();
              catch (Throwable t)
                   t.printStackTrace();
    It provides a hyperlink after the RUN button is clicked, and pops the clicked result in another frame. Hope this helps

  • How  to transmit data from textarea-HTML to an Applet on MAC OS

    Hi, i'm writing an applet and I would like to use in my applet the data coming from a textarea of the same html page and at the end of my applet, i want to update this textarea.
    I'm working on MAC OS (LiveConnect doesn't work).
    Java-Javascript :
    I've tried the system of invisible frame with javascript that i've found at this address: http://www.rgagnon.com/ce/java-js.html, but the data are transmitted via the url (by means of the get method) and i've too much data to move. I've tried to post the data to a cgi script and i've used the showDocument method but i can't get the data that i've posted.
    Javascript-Java :
    I've tried the solution given at the same address but it doesn't work at all because : 1) the method getDocumentBase() doesn't gives the parameters 2) it still uses the get method.
    I would appreciate any help.

    If i include the textarea in my applet, I'll have many web sites (which are already working with an embedded texarea) to update.
    and to be very accurate, the textarea is in another page and my applet is "alone" in a pop-up window.

  • Text Coordinates in TextArea

    I'm trying to write a custom control that extends a text
    area, and provides some IDE-style auto-complete functionality. To
    do this, I need to be able to position a pop-up menu just below the
    start of the word being edited.
    So, I need the x and y coordinates of a specific index in my
    TextArea. I sort of hoped that a TextRange object would give it to
    me, but it doesn't.
    Any suggestions?

    The textField property of text objects has a
    getCharBoundaries method. This returns a Rectangle object
    describing the coordinates of any nth character in the text.
    I used this to draw rectangles that cover particular words in
    a textArea. By getting the rectangle of the first and last
    charcters of the word, I could calculate the needed coordinates
    from that. The main statements were of this form:
    var myRect1:Rectangle =
    myTextArea.textField.getCharBoundaries(n);
    where n is the character index.
    I'm pretty new to Flex, and don't know yet if there is
    another way to achieve this. If there is, I'd love to hear.
    Regards

Maybe you are looking for

  • Transferring library from old PC to new MAC...problems

    Hi, this is my first post as I am new to mac. I am trying to transfer my itunes library from my PC to my new mac, and I followed the instructions posted here to use your ipod to transfer music from one computer to another. At the very last step it sa

  • I  can´t   see  Thumbnails  in  bridge

    First sorry about my english. I can´t see Thumbnails, by my camera Canon 1D Mark II N, extension file .CR2, any idea. Better if the answer is in spanish. Thanks PD. already updated camera Raw 3.7, and purge my cache, and more and more

  • How to send mail using bsp

    Dear friends, please send me code how to send bulk mails from bsp, sincerely yours

  • Viewer Windows Inaccuracy Problems

    I'm using LR4.2, and it is displaying images with inaccurate, muddled, cheap looking tones which do not appear when exported and viewed with a different program. Furthermore, exported images lose a good chunk of the contrast, especially the blacks, w

  • Skype won't install (WIndows)

    I have used Skype many times in the past on other computers. Today I downloaded the install and have been trying to install it on a different home PC and it will not install. Every time, the install module launches no problem, the install starts, the