Return focus from html panel?

Hey everyone,
can you please tell me if there's a way to return focus from the html panel back to Photoshop? I've tried app.activate() but no luck
Many thanks!

Hi,
let's take this
sample.
On the main file: html_panel_sample.html go and change the
first panel to support java script code adding the preventScript
option on false: var mine = new Spry.Widget.HTMLPanel("me",
{preventScripts:false});
On the file that is loaded, frag-0.html make a link to load a
new panel like this:
<a href="#"
onclick="mine.loadContent('frag-1.html');return false;">load
frag-1.html file</a>
Please let us know if you have other questions,
Diana

Similar Messages

  • Regain keyboard focus from extension panel!

    Illustrator. Mac OS. If ANYBODY know any sort of HACK or workaround for this, please share. A workaround NEEDS to be made public so other poor souls like myself don't have to bang their heads quite as hard. Once I have this figured out I will write a lengthy post describing the trials and tribulations of a fresh extension developer to entertain you all. Lets talk about the wonderful speed of Actionscript, or the simple act of installing FB 4.7 and trying to get EB2 to work. Good times from the first minute on... but first, the last hurdle (well, before moving on to C++ plugin developement).
    Thanks in advance.

    Bleh,
    Found loseFocus() in CSExtension class. Frees up a couple keys, but not key combinations like undo.
    Settled on programming the common key commands into the pallet. Of course listeners work for every key combination except ones which use the COMMAND key.
    Thought about closing the panel when user hits command key and then setting a listener to reopen it when key is released. But as soon it is reopened, focus is lost again.
    Now what? Make an invisible extension that controls the panel? Don't know if that would fix and sounds like alot of work.
    What a damn PAIN IN THE BUTT!!! THIS BETTER BE FIXED IN CC VERSION OF ILLUSTRATOR!!!

  • #Include or run script from HTML panel button?

    I'v been trying to make a panel with the HTML widget and I keep running into issues. The buttons I made wont run the scripts. Is there a way to include js for PS inside the html to run when the button is pressed? <script></script> doesn't seem to work for things inside of PS. Or is there a way to run a script in PS from a button?
    I guess I have multiple questions really. Do you always have to use _AdobeInvokeScript inside the button? I have seen some examples without it and I'm not sure what works and what doesn't.

    Thank you Paul!
    %20 is just how space characters are encoded and doesn't matter
    Ye, I know this,.. it`s was my just suggestion...
    So. The solution in this string:
    var scriptFile = File(File($.fileName).parent.parent.absoluteURI + "/Change Render Locations.jsx")
    Everything else is identical, in my script and in your. Of course except alerts. I remove them, and now i have just my button which works fine....
    And may be you can suggest, why does not work "my" method of running the script?
    Thanks again!

  • Problem with return link from html page back to css page

    Here is the site..almost ready for publication
    http://www.matriley.com/glensite/index.html
    1) Go to properties for sale
    2)Choose a suberb
    3)click on a property with a video
    4) watch the crazy video if you like
    5) Click go back to properties
    ^) Yes the page is there but the property page is now
    inactive...why?
    8)The whole thing works fine on Firefox but we do have this
    Glitch on IE
    PLEAASSE Can someone help
    Regards Matthew [email protected]
    Everything works well but for the problem return link to the
    properties page after you have gone to the video.The property page
    becomes inactive

    Your page is a monster -
    Empty Cache
    10.6K 1 HTML/Text
    1.5K 1 Stylesheet File
    985.4K 25 Images
    997.7K Total size
    27 HTTP requests
    25 images with aggregate weight of ~1MB is much too large,
    you know?
    Anyhow, I cannot reproduce your problem in IE7. Are you
    referring to IE6,
    instead?
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "fredbillmatt" <[email protected]> wrote in
    message
    news:fv0m9k$a7a$[email protected]..
    > Here is the site..almost ready for publication
    >
    http://www.matriley.com/glensite/index.html
    >
    > 1) Go to properties for sale
    > 2)Choose a suberb
    > 3)click on a property with a video
    > 4) watch the crazy video if you like
    > 5) Click go back to properties
    > ^) Yes the page is there but the property page is now
    inactive...why?
    > 8)The whole thing works fine on Firefox but we do have
    this Glitch on IE
    > PLEAASSE Can someone help
    > Regards Matthew [email protected]
    > Everything works well but for the problem return link to
    the properties
    > page
    > after you have gone to the video.The property page
    becomes inactive
    >

  • Pass an argument from external jsx to html panel?

    Hi everyone,
    Can you please tell me if it's possible somehow to listen to event from the external jsx in html panel? What I'm trying to do is to pass an argument from JSX to HTML Panel and to update
    the panel with it.
    Many thanks,
    Sergey

    Hi Sergey!
    What I was suggesting privately to you (I report this here for the others' sake) is to use soon-to-be-released CEP5 technology: http://blogs.adobe.com/cssdk/2014/04/introducing-cep-5.html
    Chiefly, the part that says:
    Call from ExtendScript into HTML DOM: Most of the currently supported Adobe apps (including but not only Photoshop CC and Illustrator CC) will include a new ExternalObject which provides an API that allows developers to dispatch events from ExtendScript to the JavaScript/HTML5
    But we have to wait for the next update of CC apps to support it!
    Regards
    Davide Barranca
    www.davidebarranca.com
    www.cs-extensions.com

  • HTML Panel into HTML Panel

    Hello,
    I know this topic has been seen a lot, but I still can't find
    the answer for me...
    Well, it's easy, I use html panels to load content into my
    website (I have a SPRYMenu wich loads content into the
    &quot;main&quot; div)
    But, when I load content including another HTML Panel, it
    doesn't work...
    I've set the evalscripts to true, but it doesn't work...
    here is a small portion of code coming from the exaples, wich
    looks like what i want to do, even if in this code, it loads a
    slidingPanel, not a HTLMPanel, but I think if I can make it work,
    I'll be able to do what I want then !
    here is the main file
    &lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0
    Transitional//EN&quot; &quot;
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
    &lt;html xmlns=&quot;
    http://www.w3.org/1999/xhtml&quot;&gt;
    &lt;head&gt;
    &lt;style type=&quot;text/css&quot;&gt;
    hr, .clearAll {
    clear: both;
    .SlidingPanels {
    width: 300px;
    height: 300px;
    .SlidingPanelsContent {
    width: 300px;
    height: 300px;
    .p1 {
    background-color: #CCCC66;
    .p2 {
    background-color: #FFFFCC;
    .p3 {
    background-color: #6699FF;
    .p4 {
    background-color: #99CCCC;
    .p5 {
    background-color: #FF99CC;
    .p6 {
    background-color: #339933;
    .p7 {
    background-color: #9933FF;
    .p8 {
    background-color: #669966;
    .p9 {
    background-color: #00FFCC;
    #example2.SlidingPanels {
    float: left;
    #example2 .SlidingPanelsContentGroup {
    float: left;
    width: 10000px;
    #example2 .SlidingPanelsContent {
    float: left;
    &lt;/style&gt;
    &lt;script src=&quot;inc/SpryHTMLPanel.js&quot;
    language=&quot;javascript&quot;
    type=&quot;text/javascript&quot;&gt;
    Spry.Widget.HTMLPanel.evalScripts =
    true;&lt;/script&gt;
    &lt;link href=&quot;inc/SpryHTMLPanel.css&quot;
    rel=&quot;stylesheet&quot;
    type=&quot;text/css&quot; /&gt;
    &lt;meta http-equiv=&quot;Content-Type&quot;
    content=&quot;text/html; charset=iso-8859-1&quot; /&gt;
    &lt;title&gt;Document sans nom&lt;/title&gt;
    &lt;/head&gt;
    &lt;body&gt;
    &lt;div id=&quot;panelSpry&quot;
    style=&quot;&quot;&gt;text de base&lt;/div&gt;
    &lt;div&gt;&lt;a
    href=&quot;essai1.html&quot;
    onclick=&quot;panelWidget.loadContent(this.href);return
    false;&quot;&gt;changement&lt;/a&gt;&lt;/div&gt;
    &lt;script&gt;
    var panelWidget = new
    Spry.Widget.HTMLPanel(&quot;panelSpry&quot;, { evalScripts:
    true });
    &lt;/script&gt;
    &lt;/body&gt;
    &lt;/html&gt;
    and here is the loaded file (essai1.html) :
    &lt;link
    href=&quot;inc/SprySlidingPanels.css&quot;
    rel=&quot;stylesheet&quot;
    type=&quot;text/css&quot; /&gt;
    &lt;script type=&quot;text/javascript&quot;
    src=&quot;inc/SprySlidingPanels.js&quot;&gt;&lt;/script&gt;
    &lt;p&gt;
    Navigate by index:
    &lt;a href=&quot;#&quot;
    onclick=&quot;sp2.showPanel(0); return
    false;&quot;&gt;1&lt;/a&gt; |
    &lt;a href=&quot;#&quot;
    onclick=&quot;sp2.showPanel(1); return
    false;&quot;&gt;2&lt;/a&gt; |
    &lt;a href=&quot;#&quot;
    onclick=&quot;sp2.showPanel(2); return
    false;&quot;&gt;3&lt;/a&gt; |
    &lt;a href=&quot;#&quot;
    onclick=&quot;sp2.showPanel(3); return
    false;&quot;&gt;4&lt;/a&gt; |
    &lt;a href=&quot;#&quot;
    onclick=&quot;sp2.showPanel(4); return
    false;&quot;&gt;5&lt;/a&gt; |
    &lt;a href=&quot;#&quot;
    onclick=&quot;sp2.showPanel(5); return
    false;&quot;&gt;6&lt;/a&gt; |
    &lt;a href=&quot;#&quot;
    onclick=&quot;sp2.showPanel(6); return
    false;&quot;&gt;7&lt;/a&gt; |
    &lt;a href=&quot;#&quot;
    onclick=&quot;sp2.showPanel(7); return
    false;&quot;&gt;8&lt;/a&gt; |
    &lt;a href=&quot;#&quot;
    onclick=&quot;sp2.showPanel(8); return
    false;&quot;&gt;9&lt;/a&gt;
    &lt;/p&gt;
    &lt;p&gt;
    Navigate by id:
    &lt;a href=&quot;#&quot;
    onclick=&quot;sp2.showPanel('ex2_p1'); return
    false;&quot;&gt;p1&lt;/a&gt; |
    &lt;a href=&quot;#&quot;
    onclick=&quot;sp2.showPanel('ex2_p2'); return
    false;&quot;&gt;p2&lt;/a&gt; |
    &lt;a href=&quot;#&quot;
    onclick=&quot;sp2.showPanel('ex2_p3'); return
    false;&quot;&gt;p3&lt;/a&gt; |
    &lt;a href=&quot;#&quot;
    onclick=&quot;sp2.showPanel('ex2_p4'); return
    false;&quot;&gt;p4&lt;/a&gt; |
    &lt;a href=&quot;#&quot;
    onclick=&quot;sp2.showPanel('ex2_p5'); return
    false;&quot;&gt;p5&lt;/a&gt; |
    &lt;a href=&quot;#&quot;
    onclick=&quot;sp2.showPanel('ex2_p6'); return
    false;&quot;&gt;p6&lt;/a&gt; |
    &lt;a href=&quot;#&quot;
    onclick=&quot;sp2.showPanel('ex2_p7'); return
    false;&quot;&gt;p7&lt;/a&gt; |
    &lt;a href=&quot;#&quot;
    onclick=&quot;sp2.showPanel('ex2_p8'); return
    false;&quot;&gt;p8&lt;/a&gt; |
    &lt;a href=&quot;#&quot;
    onclick=&quot;sp2.showPanel('ex2_p9'); return
    false;&quot;&gt;p9&lt;/a&gt;
    &lt;/p&gt;
    &lt;p&gt;
    Other navigation methods:
    &lt;a href=&quot;#&quot;
    onclick=&quot;sp2.showFirstPanel(); return
    false;&quot;&gt;First&lt;/a&gt; |
    &lt;a href=&quot;#&quot;
    onclick=&quot;sp2.showPreviousPanel(); return
    false;&quot;&gt;Previous&lt;/a&gt; |
    &lt;a href=&quot;#&quot;
    onclick=&quot;sp2.showNextPanel(); return
    false;&quot;&gt;Next&lt;/a&gt; |
    &lt;a href=&quot;#&quot;
    onclick=&quot;sp2.showLastPanel(); return
    false;&quot;&gt;Last&lt;/a&gt;
    &lt;/p&gt;
    &lt;p&gt;&amp;nbsp;&lt;/p&gt;
    &lt;div id=&quot;example2&quot;
    class=&quot;SlidingPanels&quot;
    tabindex=&quot;0&quot;&gt;
    &lt;div
    class=&quot;SlidingPanelsContentGroup&quot;&gt;
    &lt;div id=&quot;ex2_p1&quot;
    class=&quot;SlidingPanelsContent p1&quot;&gt;Panel
    1&lt;/div&gt;
    &lt;div id=&quot;ex2_p2&quot;
    class=&quot;SlidingPanelsContent p2&quot;&gt;Panel
    2&lt;/div&gt;
    &lt;div id=&quot;ex2_p3&quot;
    class=&quot;SlidingPanelsContent p3&quot;&gt;Panel
    3&lt;/div&gt;
    &lt;div id=&quot;ex2_p4&quot;
    class=&quot;SlidingPanelsContent p4&quot;&gt;Panel
    4&lt;/div&gt;
    &lt;div id=&quot;ex2_p5&quot;
    class=&quot;SlidingPanelsContent p5&quot;&gt;Panel
    5&lt;/div&gt;
    &lt;div id=&quot;ex2_p6&quot;
    class=&quot;SlidingPanelsContent p6&quot;&gt;Panel
    6&lt;/div&gt;
    &lt;div id=&quot;ex2_p7&quot;
    class=&quot;SlidingPanelsContent p7&quot;&gt;Panel
    7&lt;/div&gt;
    &lt;div id=&quot;ex2_p8&quot;
    class=&quot;SlidingPanelsContent p8&quot;&gt;Panel
    8&lt;/div&gt;
    &lt;div id=&quot;ex2_p9&quot;
    class=&quot;SlidingPanelsContent p9&quot;&gt;Panel
    9&lt;/div&gt;
    &lt;/div&gt;
    &lt;/div&gt;
    &lt;script
    type=&quot;text/javascript&quot;&gt;
    var sp2 = new Spry.Widget.SlidingPanels('example2');
    &lt;/script&gt;
    I hope somebody can help....
    Thanks !

    Thank you for your quick reply.
    I still have a problem here.
    Would you please see my 3 files for my problems.
    Thank you very much for your time.
    1. index.php
    <!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">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Test for Spry HTML Panel</title>
    <script src="../spry/SpryHTMLPanel.js" language="javascript" type="text/javascript"></script>
    <link href="../spry/SpryHTMLPanel.css" rel="stylesheet" type="text/css">
    </head>
    <body>
    <input type="button" value="Click Here to Load Document Level 2" onclick="body_content_area.loadContent('doc_level_2.php');" />
        <div id="body_content_area" style="clear:both; width:100%;">
            <!-- Put Content Here -->
            <div class="HTMLPanelLoadingContent">Loading ...</div>
        </div>
    <script type="text/javascript" language="javascript1.2">
    <!--
    var body_content_area = new Spry.Widget.HTMLPanel("body_content_area");
    //-->
    </script>
    </body>
    </html>
    2. doc_level_2.php
    <!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">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Untitled Document</title>
    <script src="../spry/SpryHTMLPanel.js" language="javascript" type="text/javascript"></script>
    <link href="../spry/SpryHTMLPanel.css" rel="stylesheet" type="text/css">
    </head>
    <body>
    <H1>Here is a content of document level 2</h1>
    <br /><br />
    <input type="button" value="Click Here to Load Document Level 3" onclick="body_content_area_2.loadContent('doc_level_3.php');" />
        <div id="body_content_area_2" style="float:left; width:100%;">
            <!-- Put Content Here -->
            <div class="HTMLPanelLoadingContent">Loading ...</div>
        </div>
    <script type="text/javascript" language="javascript1.2">
    <!--
    var body_content_area_2 = new Spry.Widget.HTMLPanel("body_content_area_2");
    //-->
    </script>
    </body>
    </html>
    3. doc_level_3.php
    <!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">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Untitled Document</title>
    </head>
    <body>
    <div style="float:left;">
    <h2>Here is the content of document level 3</h2>
    </div>
    </body>
    </html>

  • Setting Java Runtime Parameters from HTML

    I am launching a java program from HTML, using java plugin 142_08, and I need to set -xms and -xmx in the java plugin from the HTML that is launching the program. Is this possible to do? It is used by many various people, so it won't be easy to go into everyones computer and manually set these params.
    Any ideas?

    There will soon be a solution available for this problem. There is an early access program for the "6uN" consumer-focused release of Java at http://jdk6.dev.java.net/6uNea.html . Build 08, which should be out in a few days, will contain as an option a new implementation of the Java Plug-In which supports what you want. You will need to go into the Java Control Panel, Advanced Tab, Java Plug-in node, and enable it, then exit, to turn on the new plug-in. At that point you will be able to write in your applet tag
    <param name="java_arguments" value="-Xmx128m"></param> for example. It has the same notion of "secure" command-line arguments as Java Web Start; using "non-secure" command line arguments requires a signed applet, but unsigned applets can utilize secure command line arguments and system properties. More documentation will be available on the new Java Plug-In soon.

  • Photoshop HTML Panels Tips - tutorial series

    Hello,
    I've been putting together a series of tips on HTML Panels creation - both from personal experiments and collecting information around. Each tip focuses on a particular topic, it's quite short and provides the code for a demo panel.
    You can find the whole series here, so far I've covered:
    Tip #1 - Debugging
    Tip #2 - Including multiple JSX
    Tip #3 - Get data from JSX and send it to HTML
    Tip #4 - Passing Objects from HTML to JSX
    Tip #5 - Passing Objects from JSX to HTML
    Tip #6 - Integrating Topcoat CSS library
    Tip #7 - Photoshop Events, Take 1
    Tip #8 - Photoshop Events, Take 2
    Tip #9 - Panel Persistence (to be published asap)
    Tips are about Photoshop panels, but general principles apply to other apps too.
    I'll share more as soon as... I have new finding to share!
    Best,
    Davide Barranca
    www.davidebarranca.com

    Update (December 5, 2014)
    Two new tips, #15 and #16 have been added, enjoy :-)
    Recently added/updated Tips in bold - You can find the whole series here, so far the topic list is:
    Tip #16 - AngularJS Binding bug patch
    Tip #15 - Asynchronous vs. Synchronous
    Tip #14 - Flyout Menu
    Tip #13 - Automate ZXP Packaging with Gulp.js
    Tip #12 - CEP Application Events
    Tip #11 - CEP Events (ExternalObject)
    Tip #10 - Packaging / ZXP Installers
    Tip #9 - Panel Persistence
    Tip #8 - Photoshop Events, Take 2
    Tip #7 - Photoshop Events, Take 1
    Tip #6 - Integrating Topcoat CSS library
    Tip #5 - Passing Objects from JSX to HTML
    Tip #4 - Passing Objects from HTML to JSX
    Tip #3 - Get data from JSX and send it to HTML
    Tip #2 - Including multiple JSX
    Tip #1 - Debugging

  • How to keep notification window from stealing focus from main AIR window

    Hi,
    We have an AIR (JavaScript based) chat application that uses the technique posted at the following link to display a notiifcation window each time the user receives a new message.  The notification window gradually fades away after 5 seconds.
    http://cookbooks.adobe.com/post_Creating_a_transparent_notification_window-8226.html
    The technique uses HTMLLoader.createRootWindow to create and display the notification window.
    The issue we are having is that the notification window steals/removes focus from the main AIR window, which is annoying if you are in the middle of typing a message that you want to send to other users.  Once the notification fades away, focus is returned to the main AIR window.
    I searched the AIR documentation to see if there is a way to keep the notification window from stealing focus, but came up empty.  I'm hoping I'm overlooking something.  Can anyone help out?
    Thanks,
    Denis

    Ahmed if i did recognize ur question then...
    Pls Follow this...
    1 - Create New Menu Item Called Window it's properties > Menu Item Type = Magic
    2- Menu Item Type = Magic.
    3- Change Magic Item = Window
    4- Command Type = Null.
    5.Visible In Menu = Yes.
    6.Under Physical 's node >Visible = No.
    Hope this helps...
    Regards,
    Amatu Allah

  • How to capture the event on changing focus from a JTextField?

    Hi All,
    I have got a problem...
    I want to do something (say some sort of validations/calculations) when I change the focus by pressing tab from a JTextField. But I am not able to do that.
    I tried with DocumentListener (jtf01.getDocument().addDocumentListener(this);). But in that case, it's calling the event everytime I ke-in something in the text field. But that's not what I want. I want to call that event only once, after the value is changed (user can paste a value, or even can key-in).
    Is there any way for this? Is there any method (like onChange() in javascript) that can do this.
    Please Help me...
    Regards,
    Ujjal

    Hi Michael,
    I am attaching my code. Actual code is very large containing 'n' number of components and ActionListeners. I am attaching only the relevant part.
    //more codes
    public class PaintSplitDisplay extends JApplet implements ActionListener
         JFrame jf01;
         JPanel jp01;
         JTextField jtf01, jtf02;
         //more codes
         public void start()
              //more codes
             jtf01 = new JTextField();
              jtf01.setPreferredSize(longField);
              jtf01.setFont(new Font("Courier new",0,12));
              jtf01.setInputVerifier(new InputVerifier(){public boolean verify(JComponent input)
                   //more codes
                   System.out.print("updating");
                   jtf02.setText("updated value");
                   System.out.print("updated");
                   return true;
              //more codes
              jtf02 = new JTextField();
              jtf02.setPreferredSize(mediumField);
              jtf02.setEditable(false);
              jp01.add(jtf02, gbc);
              //more codes
              jf01.add(jp01);
              jf01.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              jf01.setVisible(true);
              //more codes
         public static void main(String args[])
              PaintSplitDisplay psp = new PaintSplitDisplay();
              psp.start();
         public void actionPerformed(ActionEvent ae)
              //more codes
    }As you can see I want to update the second JTextField based on some calculations. That should happen when I change the focus from my frist JTextField. I have called jtf02.setText() method inside InputVerifier. But it's giving error...
    Please suggest...
    Ujjal

  • How to get the values from html:select? tag..?

    i tried with this, but its not working...
    <html:select styleClass="text" name="querydefs" property="shortcut"
                 onchange="retrieveOptions()" styleId="firstBox" indexed="true">
    <html:options collection="advanced.choices" property="shortcut" labelProperty="label" />
    </html:select>
                        <td align="left" class="rowcolor1">
                        <script language="javascript" type="text/javascript">
                              function retrieveOptions(){
                             var sel = document.querydefs.options;
                             var selectedOption = sel[sel.selectedIndex].value;
                             document.write(selectedOption);
                           </script>

    <td align="left" class="rowcolor1">
                        <script language="javascript" type="text/javascript">
                              function retrieveOptions(){
                             var sel = document.querydefs.options;
                             var selectedOption = sel[sel.selectedIndex].value;
                             document.write(selectedOption);
                           </script>This java script is not working at all..its not printing anything in document.write();
    This is code..
    <td class="rowcolor1" width="20%">
    <html:select styleClass="text" name="querydefs" property="shortcut"
                             onchange="retrieveSecondOptions()" styleId="firstBox"
                             indexed="true">
                             <html:options collection="advanced.choices" property="shortcut"
                                  labelProperty="label"  />
                        </html:select>i tried with this also. but no use..i'm not the getting the seleced option...
    function retrieveOptions(){
    firstBox = document.getElementById('firstBox');
                             if(firstBox.selectedIndex==0){
          return;
        selectedOption = firstBox.options[firstBox.selectedIndex].value;
    }actually , how to get the values from <html:select> ...?
    my idea is to know which value is selected from the combo box(<html:select> ) if that value is equal some string i have enable a hyperlink to open a popup window

  • Read values from html response

    Hi,
    I am trying to make a call to an API using UTL_HTTP POST method over SSL and read the response html page and extract the values from the reponse.
    I am able to call and get a response back in html format. I have stored the html response in a clob variable.
    Now i want to parse this html and extract values from the form input items and send them out through OUT parameters.
    For example, from below reponse i want to extract the value '1111d7nhcwse30wq' from 'I4GO_UNIQUEID'
    Can anyone help me with the code to parse this html response and extract the values.
    Any help is greatly appreciated.
    Thanks
    Sharath
    sample Code:
    PROCEDURE get_token (
    p_requesterreference IN VARCHAR2,
    p_cardnumber IN VARCHAR2,
    p_cardtype IN VARCHAR2,
    p_cardholdername IN VARCHAR2,
    p_expirationmonth IN VARCHAR2,
    p_expirationyear IN VARCHAR2,
    p_streetaddress IN VARCHAR2,
    p_postalcode IN VARCHAR2,
    p_cvv2code IN VARCHAR2,
    po_uniqueid OUT VARCHAR2,
    po_errorindicator OUT VARCHAR2,
    po_primaryerrorcode OUT VARCHAR2,
    po_response OUT VARCHAR2,
    po_status_code OUT VARCHAR2,
    po_reason_phrase OUT VARCHAR2
    IS
    v_url VARCHAR2 (200);
    v_url_params VARCHAR2 (32767);
    v_resp_str VARCHAR2 (32767);
    l_http_req UTL_HTTP.req;
    l_http_resp UTL_HTTP.resp;
    v_requesterreference VARCHAR2 (12) := p_requesterreference;
    v_i4go_cardnumber VARCHAR2 (32) := p_cardnumber;
    v_i4go_streetaddress VARCHAR2 (30) := p_streetaddress;
    v_i4go_postalcode VARCHAR2 (9) := p_postalcode;
    v_i4go_expirationmonth VARCHAR2 (2) := p_expirationmonth; -- MM format
    v_i4go_expirationyear VARCHAR2 (2) := p_expirationyear; -- yy format
    v_i4go_cvv2code VARCHAR2 (3) := p_cvv2code;
    v_name VARCHAR2 (256);
    v_value VARCHAR2 (1024);
    l_clob CLOB;
    pv_amp CONSTANT CHAR (1) := CHR (38);
    CURSOR setup_cur
    IS
    SELECT interface_id, interface_name, interface_url, account_id, site_id
    FROM rsv.shift4_setup
    WHERE interface_name = 'I4GO';
    v_setup_rec setup_cur%ROWTYPE;
    BEGIN
    OPEN setup_cur;
    FETCH setup_cur
    INTO v_setup_rec;
    CLOSE setup_cur;
    v_url := 'https://certify.i4go.com//index.cfm?fuseaction=account.PostCardEntry';
    v_url_params :=
    pv_amp
    || 'i4GO_AccountID='
    || v_setup_rec.account_id
    || pv_amp
    || 'i4Go_SiteID='
    || v_setup_rec.site_id
    || pv_amp
    || 'i4Go_CardNumber='
    || v_i4go_cardnumber
    || pv_amp
    || 'i4Go_ExpirationMonth='
    || v_i4go_expirationmonth
    || pv_amp
    || 'i4Go_ExpirationYear='
    || v_i4go_expirationyear
    || pv_amp
    || 'i4Go_CVV2Code='
    || v_i4go_cvv2code
    || pv_amp
    || 'i4Go_PostalCode='
    || v_i4go_postalcode;
    -- begin request using POST method
    UTL_HTTP.set_response_error_check (FALSE);
    UTL_HTTP.set_transfer_timeout (180);
    UTL_HTTP.set_wallet ('file:/etc/ORACLE/WALLETS/oracle', 'welcome1');
    l_http_req := UTL_HTTP.begin_request (v_url, 'POST');
    UTL_HTTP.set_header (l_http_req, 'User-Agent', 'Mozilla/4.0');
    UTL_HTTP.set_header (l_http_req, 'Content-Type', 'application/x-www-form-urlencoded');
    UTL_HTTP.set_header (l_http_req, 'content-length', LENGTH (v_url_params));
    UTL_HTTP.write_text (l_http_req, v_url_params);
    -- get response
    l_http_resp := UTL_HTTP.get_response (l_http_req);
    po_status_code := l_http_resp.status_code;
    po_reason_phrase := l_http_resp.reason_phrase;
    -- read response into a clob
    DBMS_LOB.createtemporary (l_clob, FALSE);
    BEGIN
    LOOP
    UTL_HTTP.read_text (l_http_resp, v_resp_str, 32767);
    DBMS_LOB.writeappend (l_clob, LENGTH (v_resp_str), v_resp_str);
    END LOOP;
    EXCEPTION
    WHEN UTL_HTTP.end_of_body
    THEN
    -- end response
    UTL_HTTP.end_response (l_http_resp);
    END;
    -- Fre resources
    DBMS_LOB.freetemporary (l_clob);
    EXCEPTION
    WHEN OTHERS
    THEN
    DBMS_LOB.freetemporary (l_clob);
    DBMS_OUTPUT.put_line (UTL_HTTP.get_detailed_sqlerrm);
    RAISE;
    END;
    sample response:
    <!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">
    <head>
         <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
         <title>Return With Payment Token</title>
         <script src="js/jquery-1.6.4.min.js" type="text/javascript"></script>
         <script type="text/javascript"><!--
              picSpinner= new Image(40,40);
              picSpinner.src="images/loading040.gif";
              bodyOnLoad = function() {
                   $("#noScriptDiv").hide();
                   $("#scriptDiv").show();
                   $("#i4GoMainForm").submit();
         //--></script>
    </head>
    <body onload="bodyOnLoad();">
         <form name="i4GoMainForm" id="i4GoMainForm" action="http://google.com" method="POST" onsubmit="$('#i4Go_submit').attr('disabled','disabled');">
                   <input name="I4GO_RESPONSE" type="hidden" value="SUCCESS" />
                   <input name="I4GO_RESPONSECODE" type="hidden" value="1" />
                   <input name="I4GO_CARDTYPE" type="hidden" value="VS" />
                   <input name="I4GO_UNIQUEID" type="hidden" value="1111d7nhcwse30wq" />
                   <input name="I4GO_EXPIRATIONMONTH" type="hidden" value="12" />
                   <input name="I4GO_EXPIRATIONYEAR" type="hidden" value="2012" />
                   <input name="I4GO_CARDHOLDERNAME" type="hidden" value="" />
                   <input name="I4GO_STREETADDRESS" type="hidden" value="" />
                   <input name="I4GO_POSTALCODE" type="hidden" value="65000" />
              <div id="scriptDiv" style="font-family:Arial, Helvetica, sans-serif;font-size:18px;visibility:hidden;">
                   <img src="images/loading040.gif" alt="Spinner..." />  Loading...
              </div>
              <div id="noScriptDiv" style="font-family:Arial, Helvetica, sans-serif;">
                   <noscript>
                                       <h1>Statement of Tokenization</h1>
                                       <p>The payment information you have submitted has been securely stored in the Shift4 PCI-DSS certified data center and a token representing this information will be sent to the merchant for processing. Below is the information that will be returning to the originating merchant:</p>
                                       <ul>
                                            <li>Response: <strong>SUCCESS</strong></li>
                                            <li>Response Code: <strong>1</strong></li>
                                            <li>Card Type: <strong>VS</strong></li>
                                            <li>Token: <strong>1111d7nhcwse30wq</strong></li>
                                       </ul>
                   </noscript>
    <input type="submit" name="i4Go_submit" id="i4Go_submit" value="Continue" />
              </div>
         </form>
    </body>
    </html>
    Edited by: sgudipat on Apr 24, 2012 1:20 PM

    Here is working example for your HTML using xpath to extract values from html
    You can store your html response in clob variable and then extract the value with xpath
    declare
       l_clob clob;
       l_value varchar2(100);
       l_xml xmltype;
      begin
         l_clob :='<!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">
      <head>
      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
      <title>Return With Payment Token</title>
      <script src="js/jquery-1.6.4.min.js" type="text/javascript"></script>
      <script type="text/javascript"><!--
       picSpinner= new Image(40,40);
       picSpinner.src="images/loading040.gif";
       bodyOnLoad = function() {
       $("#noScriptDiv").hide();
       $("#scriptDiv").show();
       $("#i4GoMainForm").submit();
      //--></script>
       </head>
       <body onload="bodyOnLoad();">
       <form name="i4GoMainForm" id="i4GoMainForm" action="http://google.com" method="POST" onsubmit="$(''#i4Go_submit'').attr(''disabled'',''disabled'');">
       <input name="I4GO_RESPONSE" type="hidden" value="SUCCESS" />
       <input name="I4GO_RESPONSECODE" type="hidden" value="1" />
       <input name="I4GO_CARDTYPE" type="hidden" value="VS" />
       <input name="I4GO_UNIQUEID" type="hidden" value="1111d7nhcwse30wq" />
       <input name="I4GO_EXPIRATIONMONTH" type="hidden" value="12" />
       <input name="I4GO_EXPIRATIONYEAR" type="hidden" value="2012" />
       <input name="I4GO_CARDHOLDERNAME" type="hidden" value="" />
       <input name="I4GO_STREETADDRESS" type="hidden" value="" />
       <input name="I4GO_POSTALCODE" type="hidden" value="65000" />
      <img src="images/loading040.gif" alt="Spinner..." />  Loading...
       <noscript>
       Statement of Tokenization
       The payment information you have submitted has been securely stored in the Shift4 PCI-DSS certified data center and a token representing this information will be sent to the merchant for processing. Below is the information that will be returning to the originating merchant:
           Response: SUCCESS
           Response Code: 1
           Card Type: VS
           Token: 1111d7nhcwse30wq
       </noscript>
       <input type="submit" name="i4Go_submit" id="i4Go_submit" value="Continue" />
       </form>
       </body>
       </html>';
         execute immediate 'alter session set events =''31156 trace name context forever, level 2''';
         l_xml := xmltype(l_clob);
         execute immediate 'alter session set events =''31156 trace name context off''';
         select extractvalue( l_xml
                            , '/html/body/form/input[@name="I4GO_CARDTYPE"]/@value'
                            , 'xmlns="http://www.w3.org/1999/xhtml"' )
         into l_value
         from dual;
         dbms_output.put_line(l_value);
       end;
    Problem when parsing html with xpath and xmltype
    Edited by: peterv6i.blogspot.com on Apr 26, 2012 9:38 AM

  • Running LV application from remote panel which measures FP through different LAN

    My LabVIEW application is running in a PC and it takes measurements from the FieldPoint modules which are connected via the FP-1601 network module.
    I want to view and execute the application from another PC using remote panel option. The master PC has two LAN connections, one seperate connection for the FieldPoint module and the second one to connect with other PCs.
    But the application returns error while initializing the FP modules when executed from remote panel.
    Will the application be able to communicate and take measurements from the FieldPoint module in this case? Please explain.
    Thanks for the help and awaiting earlier response.
    Thank you,
    Rajeswari

    In principle this I believe this is a TCP/IP routing issue.
    If your fieldpoint unit is connected to one card lets say
    Card 01 Host 10.0.0.1 255.255.255.0 ---- Fieldpoint 10.0.0.2 255.255.255.0
    Card 02 Host 168.95.0.1 255.255.0.0 ---- Lan 168.95.x.x 255.255.0.0
    The routing in the host takes care of which card is used for which network segment.
    My guess is that you have not seperated the network segments as shown above.
    Is this correct ?

  • Images not loading in Spry HTML Panel

    Hallo everyone
    I am using links to load html fragments in a Spry HTML Panel, just like in the example page
    http://labs.adobe.com/technologies/spry/widgets/htmlpanel/SpryHTMLPanel.html
    The whole structure is inside a Spry Tabbed Panel.
    All works ok if the target html pages are in the same directory as the mother page.
    Images are standard in the "images" folder
    The problem starts when I try to organise all the html fragments in a separate directory.
    Updating links in all the html  files is of course done correctly, images included.
    Then the problem starts.
    The html fragments load but with no images.
    When I open the html fragments directly by the browser all is ok.
    Any ideas would be appreciated
    Thanks!

    Can you upload your pages to a server and give us a link?
    If your images are in your site folder (no matter which directory), but they are not showing up in your fragments, it is likely that the paths are wrong. The images (it seems to me) should exist on the fragment and be linked from there.
    I won't have a chance to fiddle around with this right now, but if your images are linked to the fragment locations and that does NOT work, try linking them as if they were on the page that is showing the fragments. I'm not familiar (yet) with this widget.
    Beth

  • Problem to extract text from HTML document

    I have to extract some text from HTML file to my database. (about 1000 files)
    The HTML files are get from ACM Digital Library. http://portal.acm.org/dl.cfm
    The HTML page is about the information of a paper. I only want to get the text of "Title" "Abstract" "Classification" "Keywords"
    The Problem is that I can't find any patten to parser the html files"
    EX: I need to get the Classification = "Theory of Computation","ANALYSIS OF ALGORITHMS AND PROBLEM COMPLEXITY","Numerical Algorithms and Problem","Mathematics of Computing","NUMERICAL ANALYSIS"......etc .
    The section code about "Classification" is below.
    Please give any idea to do this, or how to find patten to extract text from this.
    <div class="indterms"><a href="#CIT"><img name="top" src=
    "img/arrowu.gif" hspace="10" border="0" /></a><span class=
    "heading"><a name="IndexTerms">INDEX TERMS</a></span>
    <p class="Categories"><span class="heading"><a name=
    "GenTerms">Primary Classification:</a></span><br />
    � <b>F.</b> <a href=
    "results.cfm?query=CCS%3AF%2E%2A&coll=ACM&dl=ACM&CFID=22820732&CFTOKEN=38147335"
    target="_self">Theory of Computation</a><br />
    � <img src="img/tree.gif" border="0" height="20" width=
    "20" /> <b>F.2</b> <a href=
    "results.cfm?query=CCS%3A%22F%2E2%22&coll=ACM&dl=ACM&CFID=22820732&CFTOKEN=38147335"
    target="_self">ANALYSIS OF ALGORITHMS AND PROBLEM
    COMPLEXITY</a><br />
    � � � <img src="img/tree.gif" border="0" height=
    "20" width="20" /> <b>F.2.1</b> <a href=
    "results.cfm?query=CCS%3A%22F%2E2%2E1%22&coll=ACM&dl=ACM&CFID=22820732&CFTOKEN=38147335"
    target="_self">Numerical Algorithms and Problems</a><br />
    </p>
    <p class="Categories"><span class="heading"><a name=
    "GenTerms">Additional�Classification:</a></span><br />
    � <b>G.</b> <a href=
    "results.cfm?query=CCS%3AG%2E%2A&coll=ACM&dl=ACM&CFID=22820732&CFTOKEN=38147335"
    target="_self">Mathematics of Computing</a><br />
    � <img src="img/tree.gif" border="0" height="20" width=
    "20" /> <b>G.1</b> <a href=
    "results.cfm?query=CCS%3A%22G%2E1%22&coll=ACM&dl=ACM&CFID=22820732&CFTOKEN=38147335"
    target="_self">NUMERICAL ANALYSIS</a><br />
    � � � <img src="img/tree.gif" border="0" height=
    "20" width="20" /> <b>G.1.6</b> <a href=
    "results.cfm?query=CCS%3A%22G%2E1%2E6%22&coll=ACM&dl=ACM&CFID=22820732&CFTOKEN=38147335"
    target="_self">Optimization</a><br />
    � � � � � <img src="img/tree.gif" border=
    "0" height="20" width="20" /> <b>Subjects:</b> <a href=
    "results.cfm?query=CCS%3A%22Linear%20programming%22&coll=ACM&dl=ACM&CFID=22820732&CFTOKEN=38147335"
    target="_self">Linear programming</a><br />
    </p>
    <br />
    <p class="GenTerms"><span class="heading"><a name=
    "GenTerms">General Terms:</a></span><br />
    <a href=
    "results.cfm?query=genterm%3A%22Algorithms%22&coll=ACM&dl=ACM&CFID=22820732&CFTOKEN=38147335"
    target="_self">Algorithms</a>, <a href=
    "results.cfm?query=genterm%3A%22Theory%22&coll=ACM&dl=ACM&CFID=22820732&CFTOKEN=38147335"
    target="_self">Theory</a></p>
    <br />
    <p class="keywords"><span class="heading"><a name=
    "Keywords">Keywords:</a></span><br />
    <a href=
    "results.cfm?query=keyword%3A%22Simplex%20method%22&coll=ACM&dl=ACM&CFID=22820732&CFTOKEN=38147335"
    target="_self">Simplex method</a>, <a href=
    "results.cfm?query=keyword%3A%22complexity%22&coll=ACM&dl=ACM&CFID=22820732&CFTOKEN=38147335"
    target="_self">complexity</a>, <a href=
    "results.cfm?query=keyword%3A%22perturbation%22&coll=ACM&dl=ACM&CFID=22820732&CFTOKEN=38147335"
    target="_self">perturbation</a>, <a href=
    "results.cfm?query=keyword%3A%22smoothed%20analysis%22&coll=ACM&dl=ACM&CFID=22820732&CFTOKEN=38147335"
    target="_self">smoothed analysis</a></p>
    </div>

    One approach is to download Htmlparser from sourceforge
    http://htmlparser.sourceforge.net/ and write the rules to match title, abstract etc.
    Another approach is to write your own parser that extract only title, abstract etc.
    1. tokenize the html file. --> convert html into tokens (tag and value)
    2. write a simple parser to extract certain information
    find out about the pattern of text you want to extract. For instance "<class "abstract">.
    then writing a rule for extracting abstract such as
    if (tag is abstract ) then extract abstract text
    apply the same concept for other tags
    Attached is the sample parser that was used to extract title and abstract from acm html files. Please modify to include keyword and other fields.
    good luck
    import java.io.BufferedReader;
    import java.io.FileReader;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.InputStreamReader;
    import java.util.ArrayList;
    import java.util.List;
    public class ACMHTMLParser
         private String m_filename;
         private URLLexicalAnalyzer lexical;
         List urls = new ArrayList();
         public ACMHTMLParser(String filename)
              super();
              m_filename = filename;
          * parses only title and abstract
         public void parse() throws Exception
              lexical = new URLLexicalAnalyzer(m_filename);
              String word = lexical.getNextWord();
              boolean isabstract = false;
              while (null != word)
                   if (isTag(word))
                        if (isTitle(word))
                             System.out.println("TITLE: " + lexical.getNextWord());
                        else if (isAbstract(word) && !isabstract)
                             parseAbstract();
                             isabstract = true;
                   word = lexical.getNextWord();
              lexical.close();
         public static void main(String[] args) throws Exception
              ACMHTMLParser parser = new ACMHTMLParser("./acm_html.html");
              parser.parse();
         public static boolean isTag(String word)
              return ( word.startsWith("<") && word.endsWith(">"));
         public static boolean isTitle(String word)
              return ( "<title>".equals(word));
         //please modify according to the html source
         public static boolean isAbstract(String word)
              return ( "<p class=\"abstract\">".equals(word));
         private void parseAbstract() throws Exception
              while (true)
                   String abs = lexical.getNextWord();
                   if (!isTag(abs))
                        System.out.println(abs);
                        break;
         class URLLexicalAnalyzer
           private BufferedReader m_reader;
           private boolean isTag;
           public URLLexicalAnalyzer(String filename)
              try
                m_reader = new BufferedReader(new FileReader(filename));
              catch (IOException io)
                System.out.println("ERROR, file not found " + filename);
                System.exit(1);
           public URLLexicalAnalyzer(InputStream in)
              m_reader = new BufferedReader(new InputStreamReader(in));
           public void close()
              try {
                if (null != m_reader) m_reader.close();
              catch (IOException ignored) {}
           public String getNextWord() throws IOException
              int c = m_reader.read();   
              if (-1 == c) return null; 
              if (Character.isWhitespace((char)c))
                return getNextWord();
              if ('<' == c || isTag)
                return scanTag(c);
              else
                   return scanValue(c);
           private String scanTag(final int c)
              throws IOException
              StringBuffer result = new StringBuffer();
              if ('<' != c) result.append('<');
              result.append((char)c);
              int ch = -1;
              while (true)
                ch = m_reader.read();
                if (-1 == ch) throw new IllegalArgumentException("un-terminate tag");
                if ('>' == ch)
                     isTag = false;
                     break;
                result.append((char)ch);
              result.append((char)ch);
              return result.toString();
           private String scanValue(final int c) throws IOException
                StringBuffer result = new StringBuffer();
                result.append((char)c);
                int ch = -1;
                while (true)
                   ch = m_reader.read();
                   if (-1 == ch) throw new IllegalArgumentException("un-terminate value");
                   if ('<' == ch)
                        isTag = true;
                        break;
                   result.append((char)ch);
                return result.toString();
    }

Maybe you are looking for

  • DB Link between Oracle 10g and Oracle 9i

    Hi all, Please help me to set the dblink between oracle9i and oracle10g. Thanks in advance Regards K. Mahipal Reddy

  • Using Java in APEX apps: loading with loadjava

    I'm trying to load my .class and .jar files into the DB (11.1) with loadjava. Resolver issues abound. I've looked at the demo's provided with the DB and the Makefile shows a -oracleresolver parameter that I can't seem to find a definition for anywher

  • Update fails

    I have a secondary laptop, which have until recently been working fine with Flash player. However, since a few weeks ago, I was not able to play the games I used to be playing, because the Flashplayer apperently was outdated. When attempting to updat

  • Elements 8 (MAC) sends error message when I quit

    Every time I purposely quit the Elements 8 application, I get an error message that it has "unexpectedly quit." It does not affect the performance of Elements 8. But it is a nuisance. Suggestions? I am running MAC 10.6.4 Thanks

  • Grids and Guides

    I have a document im working on and  for some reason my smart guilds are not working, I go to see if its checked and it is, but its grayed out and wont let me turn them off or on, how do i fix this?