Hi Sam,

I am not sure I know what you want to do...

I tried to recreate your problem:

test.html

<form name="myform1" method="get" action="">
  <input type="hidden" name="myvar1" value="testing"> 
    <script> 
                window.open("test2.html", "test");
    </script>
</form>


test2.html

<BODY onLoad="document.forms[0].submit();">
<form name="myform1" method="get" action="test3.html"> 
  <INPUT TYPE="hidden" NAME="do_preview" VALUE="1"> 
    <script> 
      document.write('<INPUT TYPE="hidden" NAME="itworks" 
VALUE="'+opener.myform1.myvar1.value+'">');
    </script>
</FORM> 
</BODY>


test3.html

<script language="Javascript">
        function parseQueryString (str) 
        {
                str = str ? str : location.search;
                var query = str.charAt(0) == '?' ? str.substring(1) : str;
                var args = new Object();
                if (query) 
                {
                var fields = query.split('&');
                        for (var f = 0; f < fields.length; f++) 
                        {
                        var field = fields[f].split('=');
                        args[unescape(field[0].replace(/\+/g, ' '))] = 
unescape(field[1].replace(/\+/g, ' '));
                }
                }
                 return args;
        }

        var args = parseQueryString ();
        for (var arg in args) 
        {
          document.write(arg + ': ' + args[arg] + '<BR>');
        }
</script>


And the output is:

do_preview: 1
itworks: testing


As should be expected...

Pls try to specify your problem.

toby

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to