[thelist] Two Javascript problems

Henry Vaillant henrygvaillant at hotmail.com
Sun Sep 17 17:04:02 CDT 2000

Dear Mr. Warden,

Thank you very much for your help.  One question: could you tell me more
about the getMyVariableValue() method,  or at least the simplest way of
putting variable values in a separately opened web browser page?

Thanks again,

Henry G. Vaillant

>From: "Warden, Matt" <mwarden at odyssey-design.com>
>Reply-To: thelist at lists.evolt.org
>To: <thelist at lists.evolt.org>
>Subject: Re: [thelist] Two Javascript problems
>Date: Sat, 16 Sep 2000 18:25:18 -0400
> > To Whom it May Concern,
>I guess that includes me.
> >      I have written a Javascript/HTML program which takes input from the
> > user in a browser window, does some calculations,  and then returns the
> > results in an alert box.  I need to be able to have these same results
> > displayed in a separately opened browser window.  Does anyone know how
> > I can do this, i.e. via Javascript?
>There are any number of ways you can do this. You can use
>window.opener.getMyVariableValue() methods, or you can simply append the
>values to the querystring like this:
>and then parse out the values with Javascript on the newly-opened window.
>You could then write these values to the document, or alert them, or
>whatever else you can do with normal JS variables.
> >       Another thorny little problem:  the numerical results come out
> > expressed to lots of decimal places.  I need to know some way in Java-
> > script of rounding 3.141592654 (for example) into merely 3.14.
>Math.round()? I believe it rounds to the nearest whole number, so:
>(Math.round(3.141592654 * 100)/100)
>Will get you the number rounded to the nearest hundreth. For those who fear
>math like my uncle bob in a speedo, here's what's going on:
>3.141592654 * 100 evaluates to 314.1592654
>When Math.round() is called on 314.1592654 it will round it to the nearest
>whole number, in this case, 314. So, now we undo our multiplication by
>dividing by the same number (100) and we get:
>which is exactly what we want.
>For unsubscribe and other options, including
>the Tip Harvester and archive of TheList go to:
>http://lists.evolt.org Workers of the Web, evolt !

Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at 

More information about the thelist mailing list