I'm attempting to display an HTML page that contains a
flash file while another html page gets built in the
background from a few sql query's. I've gotten the fork
to work, however, I want the page that is being created
to replace the flash file that is running. What do I
have to change in order to get this to work?

My Code:
if ( $pid = fork() ) { ########## # Sets up the Unix and Oracle variables for the system ########## $ENV{ORACLE_HOME} = '/home/oracldwh/app/oracle/product/7.3.2'; $ENV{LD_LIBRARY_PATH} = '/home/oracldwh/app/oracle/product/7.3.2/l +ib'; # Database connection variables my $database = "**********"; my $username = "**********"; my $password = "**********"; my $html; ########## # Create initial portion of page with title and heading ########## $html .= header( -Refresh=> '0'; 'manager_selection_fork.cgi'); $html .= $query->start_html(-'title'=>'Asset Insight Manager Resou +rces', -BGCOLOR=>'#00CCFF'); ########## # Created the form portion ########## $html .= "<center>"; $html .= $query->startform({-method=>'post', -action=>'http://www3 +.syr.lmco.com/cgi-bin/asset/employee_list.cgi', -target=>'bottom'}); ########## # Connects to the database and runs the specified query ########## my $dbh = DBI->connect($database, $username, $password, 'Oracle') or die "can't connect to $database: $DBI::errstr"; my $sth = $dbh->prepare( q{ SELECT DISTINCT e1.emp_badge, e1.emp_name_last, e1.emp_nam +e_first, e1.emp_job_ttl FROM emp e1, emp e2 WHERE e1.emp_ssn = e2.mgr_ssn AND e1.emp_badge is not NULL ORDER by e1.emp_name_last }) or die "Can't prepare statement: $DBI::errstr"; my $rc = $sth->execute() or die "Can't execute statement: $DBI::errstr"; my @the_values; my %labels; ########## # Concatnates each returned row and pushes them into an array ########## while (my ($emp_badge, $emp_name_last, $emp_name_first, $emp_job_ +ttl) = $sth->fetchrow()) { $labels{"$emp_badge"} = join(' -- ', $emp_name_last, $emp_ +name_first, $emp_job_ttl); push(@the_values,$emp_badge); } ########## # Creates the dropdown box with the apropriate names and associati +ons ########## $html .= $query->popup_menu(-name=>'mgr_badge',-'values'=>\@the_va +lues,-labels=>\%labels); $html .= $query->submit(-value=>'Submit Selection'); $html .= "</center>"; $html .= end_html; ########## # Prints out the entire HTML Page as it was created above ########## print $html; # check for issue we may have had durring this little excursion warn $DBI::errstr if $DBI::err; ########## # This Ends the statement handle and closes the connection to the +database ########## $sth->finish; $dbh->disconnect; } ########## # The Child portion of the Fork ########## elsif ( defined( $pid ) ) { my $html2; $html2 .= header; $html2 .= $query->start_html(-'title'=>'Loading', -BGCOLOR=>'#00CCFF'); $html2 .= "<CENTER>"; $html2 .= "<!-- URL's used in the movie-->"; $html2 .= "<!-- text used in the movie-->"; $html2 .= "<!--L o a d i n g . --><OBJECT classid=\"clsid:D27CDB6E +-AE6D-11cf-96B8-444553540000\""; $html2 .= " codebase=\"http://download.macromedia.com/pub/shockwav +e/cabs/flash/swflash.cab#version=5,0,0,0\""; $html2 .= "WIDTH=250 HEIGHT=50>"; $html2 .= "<PARAM NAME=movie VALUE=\"http://www3.syr.lmco.com/ass +et/Loading.swf\"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor + VALUE=#FFFFFF> <EMBED src=\"Loading.swf\" quality=high bgcolor=#FFFF +FF WIDTH=250 HEIGHT=50 TYPE=\"application/x-shockwave-flash\" PLUGIN +SPAGE=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Pro +d_Version=ShockwaveFlash\"></EMBED>"; $html2 .= "</OBJECT>"; $html2 .= "</CENTER>"; $html2 .= end_html; print $html2; print "<br>\n"; #$END = time(); exit(); } #$END = time(); else { die( "Could not Fork" ); }

In reply to Forking 2 html Pages by Anonymous Monk

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.