in reply to Why is this param undefined? and Why isn't exit stopping the script from running?

Why is this param undefined?

When you create the frameset, neither of the frames within has the original query string included in their URLs.

Why isn't exit stopping the script from running?

It is, but you seem to be missing a key concept about the web and frames: each frames is a seperate instance, so you're actually calling your script three times, and it's the latter two (where you've unintentionally stripped the params) that exit is stopping.

    --k.


  • Comment on Re: Why is this param undefined? and Why isn't exit stopping the script from running?

Replies are listed 'Best First'.
Re: Re: Why is this param undefined? and Why isn't exit stopping the script from running?
by jerrygarciuh (Curate) on Mar 28, 2002 at 20:03 UTC
    Thanks for the reply. I realize that
    <frame src="$script_name/top" scrolling="NO" name="topFrame"> <frame src="$script_name/main" name="mainFrame">
    instantiates 2 copies of the script, but I thought the if (!$content) {exit;} would kill process #1 before it had child processes. This is not the case?? Why?
    TIA
    jg
    _____________________________________________________
    Think a race on a horse on a ball with a fish! TG

      Ah, but the frames are second and third in the chain.

      The first link is the frameset builder, where !$content evaluates as false because $content is set if you're using the URL you mention in your original post.

      Propagating the query string so that it's set in the children frames is an easy fix, though ...

      sub print_frameset { $script_name = $q->script_name; $query_string = $q->query_string; print <<EOF; <html><head><title>$TITLE</title></head> <frameset rows="147,*" frameborder="NO" border="0" framespacing="0" co +ls="*"> <frame src="$script_name/top?$query_string" scrolling="NO" name="topFr +ame"> <frame src="$script_name/main?$query_string" name="mainFrame"> </frameset> EOF ; exit 0; }

          --k.


        Thanks so much for your time!!!! That solved it and it might have cost me hours before I realized what was up.
        Thank you,
        jg
        _____________________________________________________
        Think a race on a horse on a ball with a fish! TG