Ok. "and Gad it takes me time to work out the bugs in this stuff. "what do you mean ME kemosabe" "

Us for a lesser portion. My problems have been massive.

You say: "I still think you do want to do things onload to get your alert box"

I still don't understand what you are implying.

There is nothing to call to be put in the iframe on the parent page onload event. The database queries have not been run at that point so no results.

Obvious thanks to you guys.

Your comment "ok for starters add this above "function onMessage"

There is no message event because I can't figure out how to send a message back to the form from perl.

So I don't understand what you are trying to demonstrate. The calls through cgi to update the tables and return data sets work fine.

They are all disabled so the calls will only return message with out actual execution of the database queries.

As I started out, my fundamental problem is sending a wm to the form triggering a call to get the result message and show it in the iframe as demonstrated by clicking the test button.

I hate things like polling but I can see no other way than starting a polling loop checking the value of a global variable set in the script when the original function call to do the database stuff finishes.

When the variable (flag) is set the polling picks it up and calls the function to load the results into the iframe.

I have looked at various "watch" examples that don't work and others that use a listener but all seem invoving sending a message to the window.

Also looked at module for embedding javascript into perl but gave up.

Simple polling loop started when original cgi command sent to script seems the way to go.

I don't understand this statement: Aparently not, it just replaced the main page it seems.

Are you saying that when you tested it live it just replaced the page with a new page and not put the result in the iframe


In reply to Re^6: send windowmessage from cgi back to form that called the cgi by tultalk
in thread send windowmessage from cgi back to form that called the cgi by tultalk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.