sailmaine has asked for the wisdom of the Perl Monks concerning the following question:

I'm developing a Perl CGI/Javascript data entry app that also needs to get data from the server to the local browser forms. I've got the forms and uploading part working, but I'm stuck on the download part. I have three frames: A menu frame, a data entry frame, and a buffer frame. I can download the needed html form data to the buffer frame using the target attribute, and run my onLoad="handelCGI();" script, but any reference to the other frames (using parent) gives a "Permission Denied" javascript error. Can anyone suggest what is wrong and if there is a way. I very much want to limit my tools to Perl CGI and Javascript. Thank you for any help, Irv
  • Comment on Moving cgi data between variables in differnt frames.

Replies are listed 'Best First'.
Re: Moving cgi data between variables in differnt frames.
by nedals (Deacon) on Aug 08, 2005 at 22:07 UTC

    Try Web Developer Forum

    It's a fairly decent forum for beginning and intermediate website development.

Re: Moving cgi data between variables in differnt frames.
by izut (Chaplain) on Aug 08, 2005 at 23:59 UTC
    Probably you are using Microsoft Internet Explorer and you are loading the frames from different locations, check the page properties. You can diagnose this using Firefox or Opera, they probably will work fine.


    Igor S. Lopes - izut
    surrender to perl. your code, your rules.
Re: Moving cgi data between variables in differnt frames.
by Anonymous Monk on Aug 09, 2005 at 07:30 UTC
    If you use OpenThought it will write the javascript for you
      I took a look at OpenThought. It's impressive. I will definitely spend some time studying it.
Re: Moving cgi data between variables in differnt frames.
by ikegami (Patriarch) on Aug 08, 2005 at 18:56 UTC

    Your question is not appropriate here. This is a Perl forum, not a JavaScript or JScript forum. I do have a tip, though:

    Instead of a buffer frame, maybe you could use the XMLHttpRequest Active X object. It allows JavaScript to get info from a web server. No buffer frame = no permission problem.

    Links:
    SAJAX, an interface to XMLHttpRequest.
    Exchanging Data Over the Internet Using XML (Microsoft)
    Life Without Refresh (Microsoft)

      Thanks for your suggestions. I really want to stay away from plug-ins, and isn't Active-X Microsoft only? I will still follow up with the javajunkies.org group, but in the mean time my plan now is to use Perl CGI and generate the entire page. It's kind of like using Perl CGI as PHP. When the Perl script receives the post for getting data for the form, it retrieves that data from the server, then it reads the html docs page from the server, and then merges the two, setting the fields to default to the live data, and then serves back one complete web page with the frames and forms all set with all the required fields. This eliminates the need to cross name spaces within the browser. It is a compromise, but would be fine for my app. Does this sound reasonable? Irv

        ActiveX is IE/Win32 only, but recent versions of most JavaScript capable browsers implement XMLHttpRequest using other techniques these days. Jim Ley has a good introduction.

        It doesn't really give you a great deal in the way of benefits over just using a hidden iframe though. (And I wouldn't suggest either technique without a decent non-JS fallback solution.

        I will still follow up with the javajunkies.org group
        Javascript is not java, so don't bother javajunkies with javascript either

        Yes, XMLHttpRequest is Windows-only. It might even be IE-only too.

        and then serves back one complete web page with the frames and forms all set with all the required fields.

        You're a bit loose on the details -- for example, the script cannot serve both the frame and the framed pages in the same request -- but your idea is doable.

A reply falls below the community's threshold of quality. You may see it by logging in.