[Javascript] printing web page using javascript

Senior, Henry (TWIi London) HSenior at twii.net
Thu Jun 13 10:40:05 CDT 2002


there is a print function - print() which prints the page. This works in
IE6(not sure about previous versions)NS4,NS6 Opera 6


-----Original Message-----
From: javascript-request at LaTech.edu
[mailto:javascript-request at LaTech.edu]
Sent: 13 June 2002 16:23
To: javascript at LaTech.edu
Subject: Javascript digest, Vol 1 #666 - 7 msgs


Send Javascript mailing list submissions to
	javascript at LaTech.edu

To subscribe or unsubscribe via the World Wide Web, visit
	https://lists.LaTech.edu/mailman/listinfo/javascript
or, via email, send a message with subject or body 'help' to
	javascript-request at LaTech.edu

You can reach the person managing the list at
	javascript-admin at LaTech.edu

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Javascript digest..."


Today's Topics:

   1. RE: curious frame and event handle question (Josiah Gordon)
   2. Printing in JS (Allen Wayne)
   3. RE: Printing in JS (Selvaraj, Murugan (Indsys))
   4. Eval() question (Yann.DeChamplain at molson.com)
   5. Script transferring values - so close (Glenn Morris)
   6. Re: Script transferring values - so close (Rodney Myers)
   7. RE: Script transferring values - so close (Peter Brunone)

--__--__--

Message: 1
From: "Josiah Gordon" <jgordon at directfile.com>
To: <javascript at LaTech.edu>
Subject: RE: [Javascript] curious frame and event handle question
Date: Wed, 12 Jun 2002 14:16:47 -0700
Reply-To: javascript at LaTech.edu

This is a multi-part message in MIME format.

------=_NextPart_000_0035_01C2121B.C9BF0030
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

MessageMy guess is that the frameset page will get it unless you set
something else. That seems to be the default page (at least in IE). Go to a
frame page and hit Edit-View Source. You'll always get the frameset.


--JG
  -----Original Message-----
  From: javascript-admin at LaTech.edu [mailto:javascript-admin at LaTech.edu]On
Behalf Of Scott.Wiseman
  Sent: Wednesday, June 12, 2002 1:38 PM
  To: 'javascript at LaTech.edu'
  Subject: RE: [Javascript] curious frame and event handle question




   <SCRIPT TYPE="text/javascript">
  <!--
  function submitenter(myfield,e)
  {
  var keycode;
  if (window.event) keycode = window.event.keyCode;
  else if (e) keycode = e.which;
  else return true;

  if (keycode == 13)
     {
     myfield.form.submit();
     return false;
     }
  else
     return true;
  }
  //-->
  </SCRIPT>


  onKeyPress="return submitenter(this,event)"

------=_NextPart_000_0035_01C2121B.C9BF0030
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Message</TITLE>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2716.2200" name=3DGENERATOR></HEAD>
<BODY>
<DIV><SPAN class=3D106031521-12062002><FONT face=3DArial color=3D#0000ff =
size=3D2>My=20
guess is that the frameset page will get it unless you set something =
else. That=20
seems to be the default page (at least in IE). Go to a frame page and =
hit=20
Edit-View Source. You'll always get the frameset.</FONT></SPAN></DIV>
<DIV><SPAN class=3D106031521-12062002><FONT face=3DArial color=3D#0000ff =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D106031521-12062002><FONT face=3DArial color=3D#0000ff =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D106031521-12062002><FONT face=3DArial color=3D#0000ff =

size=3D2>--JG</FONT></SPAN></DIV>
<BLOCKQUOTE dir=3Dltr style=3D"MARGIN-RIGHT: 0px">
  <DIV class=3DOutlookMessageHeader dir=3Dltr align=3Dleft><FONT =
face=3DTahoma=20
  size=3D2>-----Original Message-----<BR><B>From:</B> =
javascript-admin at LaTech.edu=20
  [mailto:javascript-admin at LaTech.edu]<B>On Behalf Of=20
  </B>Scott.Wiseman<BR><B>Sent:</B> Wednesday, June 12, 2002 1:38=20
  PM<BR><B>To:</B> 'javascript at LaTech.edu'<BR><B>Subject:</B> RE: =
[Javascript]=20
  curious frame and event handle question<BR><BR></FONT></DIV>
  <DIV><FONT face=3DArial color=3D#0000ff size=3D2></FONT><FONT =
face=3DArial=20
  color=3D#0000ff size=3D2></FONT><BR><SPAN =
class=3D468373720-12062002><FONT=20
  face=3DArial color=3D#0000ff size=3D2>&nbsp;</FONT></SPAN><BR><FONT =
face=3DArial><FONT=20
  color=3D#0000ff><FONT size=3D2><SPAN=20
  class=3D468373720-12062002>&nbsp;</SPAN>&lt;SCRIPT=20
  TYPE=3D"text/javascript"&gt;<BR>&lt;!--<BR>function=20
  submitenter(myfield,e)<BR>{<BR>var keycode;<BR>if (window.event) =
keycode =3D=20
  window.event.keyCode;<BR>else if (e) keycode =3D e.which;<BR>else =
return=20
  true;</FONT></FONT></FONT></DIV>
  <DIV><FONT face=3DArial color=3D#0000ff size=3D2></FONT>&nbsp;</DIV>
  <DIV><FONT face=3DArial color=3D#0000ff size=3D2>if (keycode =3D=3D =
13)<BR>&nbsp;&nbsp;=20
  {<BR>&nbsp;&nbsp; myfield.form.submit();<BR>&nbsp;&nbsp; return=20
  false;<BR>&nbsp;&nbsp; }<BR>else<BR>&nbsp;&nbsp; return=20
  true;<BR>}<BR>//--&gt;<BR>&lt;/SCRIPT&gt;</FONT></DIV>
  <DIV><FONT face=3DArial color=3D#0000ff size=3D2></FONT>&nbsp;</DIV>
  <DIV><FONT face=3DArial color=3D#0000ff =
size=3D2><BR>onKeyPress=3D"return=20
  submitenter(this,event)"</FONT></DIV></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_0035_01C2121B.C9BF0030--


--__--__--

Message: 2
From: Allen Wayne <Wayne.Allen at rhul.ac.uk>
To: "'javascript at LaTech.edu'" <javascript at LaTech.edu>
Date: Thu, 13 Jun 2002 09:29:26 +0100
Subject: [Javascript] Printing in JS
Reply-To: javascript at LaTech.edu

This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C212B4.6D8967D0
Content-Type: text/plain;
	charset="iso-8859-1"

Any ideas how to print the current window, without the user having to use
the toolbar? i.e. I want to open the window and send it to the printer in
one operation, also is there anyway to print a web page without the title
bits that IE buts on the top and bottom
 
 
pointers and ideas welcome
 
 
Wayne

 


------_=_NextPart_001_01C212B4.6D8967D0
Content-Type: text/html;
	charset="iso-8859-1"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>Message</TITLE>

<META content="MSHTML 6.00.2716.2200" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=112362808-13062002><FONT face=Arial color=#0000ff
size=2>Any 
ideas how to print the current window, without the user having to use the 
toolbar? i.e. I want to open the window and send it to the printer in one 
operation, also is there anyway to print a web page without the title bits
that 
IE buts on the top and bottom</FONT></SPAN></DIV>
<DIV><SPAN class=112362808-13062002><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=112362808-13062002><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=112362808-13062002><FONT face=Arial color=#0000ff 
size=2>pointers and ideas welcome</FONT></SPAN></DIV>
<DIV><SPAN class=112362808-13062002><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=112362808-13062002><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=112362808-13062002><FONT face=Arial color=#0000ff 
size=2>Wayne</FONT></SPAN></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
  <DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Arial 
  color=#0000ff size=2></FONT>&nbsp;</DIV></BLOCKQUOTE></BODY></HTML>

------_=_NextPart_001_01C212B4.6D8967D0--

--__--__--

Message: 3
From: "Selvaraj, Murugan (Indsys)" <Murugan.Selvaraj at geind.ge.com>
To: javascript at LaTech.edu
Subject: RE: [Javascript] Printing in JS
Date: Thu, 13 Jun 2002 14:22:31 +0530
Reply-To: javascript at LaTech.edu

This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C212B7.A7441FD0
Content-Type: text/plain;
	charset="iso-8859-1"

Hi Wayne
 
Try window.print to print the current window.

-----Original Message-----
From: Allen Wayne [mailto:Wayne.Allen at rhul.ac.uk]
Sent: Thursday, June 13, 2002 1:59 PM
To: 'javascript at LaTech.edu'
Subject: [Javascript] Printing in JS


Any ideas how to print the current window, without the user having to use
the toolbar? i.e. I want to open the window and send it to the printer in
one operation, also is there anyway to print a web page without the title
bits that IE buts on the top and bottom
 
 
pointers and ideas welcome
 
 
Wayne

 



"THIS E-MAIL MESSAGE ALONG WITH ANY ATTACHMENTS IS INTENDED ONLY FOR THE
ADDRESSEE and may contain confidential and privileged information.
If the reader of this message is not the intended recipient,
you are notified that any dissemination, distribution or copy of this 
communication is strictly Prohibited. 
If you have received this message by error, please notify us 
immediately, return the original mail to the sender and delete the 
message from your system."


------_=_NextPart_001_01C212B7.A7441FD0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<TITLE>Message</TITLE>

<META content=3D"MSHTML 5.00.3315.2870" name=3DGENERATOR></HEAD>
<BODY>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN =
class=3D171045608-13062002>Hi=20
<SPAN class=3D112362808-13062002><FONT color=3D#0000ff face=3DArial=20
size=3D2>Wayne</FONT></SPAN></SPAN></FONT></DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN =
class=3D171045608-13062002><SPAN=20
class=3D112362808-13062002></SPAN></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN =
class=3D171045608-13062002><SPAN=20
class=3D112362808-13062002>Try window.print to print the current=20
window.</SPAN></SPAN></FONT></DIV>
<BLOCKQUOTE dir=3Dltr style=3D"MARGIN-RIGHT: 0px">
  <DIV align=3Dleft class=3DOutlookMessageHeader dir=3Dltr><FONT =
face=3DTahoma=20
  size=3D2>-----Original Message-----<BR><B>From:</B> Allen Wayne=20
  [mailto:Wayne.Allen at rhul.ac.uk]<BR><B>Sent:</B> Thursday, June 13, =
2002 1:59=20
  PM<BR><B>To:</B> 'javascript at LaTech.edu'<BR><B>Subject:</B> =
[Javascript]=20
  Printing in JS<BR><BR></DIV></FONT>
  <DIV><SPAN class=3D112362808-13062002><FONT color=3D#0000ff =
face=3DArial size=3D2>Any=20
  ideas how to print the current window, without the user having to use =
the=20
  toolbar? i.e. I want to open the window and send it to the printer in =
one=20
  operation, also is there anyway to print a web page without the title =
bits=20
  that IE buts on the top and bottom</FONT></SPAN></DIV>
  <DIV><SPAN class=3D112362808-13062002><FONT color=3D#0000ff =
face=3DArial=20
  size=3D2></FONT></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=3D112362808-13062002><FONT color=3D#0000ff =
face=3DArial=20
  size=3D2></FONT></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=3D112362808-13062002><FONT color=3D#0000ff =
face=3DArial=20
  size=3D2>pointers and ideas welcome</FONT></SPAN></DIV>
  <DIV><SPAN class=3D112362808-13062002><FONT color=3D#0000ff =
face=3DArial=20
  size=3D2></FONT></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=3D112362808-13062002><FONT color=3D#0000ff =
face=3DArial=20
  size=3D2></FONT></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=3D112362808-13062002><FONT color=3D#0000ff =
face=3DArial=20
  size=3D2>Wayne</FONT></SPAN></DIV>
  <BLOCKQUOTE dir=3Dltr style=3D"MARGIN-RIGHT: 0px">
    <DIV align=3Dleft class=3DOutlookMessageHeader dir=3Dltr><FONT =
color=3D#0000ff=20
    face=3DArial =
size=3D2></FONT>&nbsp;</DIV></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>
<BR>
<BR>

<P><FONT SIZE=3D2 FACE=3D"Arial">"THIS E-MAIL MESSAGE ALONG WITH ANY =
ATTACHMENTS IS INTENDED ONLY FOR THE ADDRESSEE and may contain =
confidential and privileged information.</FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">If the reader of this message is not =
the intended recipient,</FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">you are notified that any =
dissemination, distribution or copy of this </FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">communication is strictly Prohibited. =
</FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">If you have received this message by =
error, please notify us </FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">immediately, return the original mail =
to the sender and delete the </FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">message from your system."</FONT></P>
<BR>

------_=_NextPart_001_01C212B7.A7441FD0--

--__--__--

Message: 4
From: Yann.DeChamplain at molson.com
To: javascript at LaTech.edu
Date: Thu, 13 Jun 2002 09:07:42 -0400
Subject: [Javascript] Eval() question
Reply-To: javascript at LaTech.edu

This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C212DB.4D9B5B00
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable


I'm trying now to create variable in a for loop and I got an error:
I tested some ways and I got something like "impossible to assign a =
value to
a funtion".
These functions work on the style of a <table> (TR).  After I change =
the
display style option I can't correctly reevaluate the new value in the =
style
property of the TR id so I wanna create a status variable for each row =
in
the table to set a status.


	var curNum;
	var maxcurNum;
	curNum =3D 2;
	maxcurNum =3D 12=20
		=09
	for(var count =3D curNum; count <=3D maxcurNum; count++){
-----------------------> eval("status" + count) =3D "none";


	}
	function addr(){
		while(curNum <=3D maxcurNum){
			rid =3D "r" + curNum;
			sid =3D "status" + curNum;
			if(eval(sid) =3D "none"){
				eval(daid).style.display =3D "Block";=20
				eval(sid) =3D "Block";
				//alert('i found a "none" value at id:' +
daid);
			return true;
			break;
			}
			curNum++;
			alert(curNum++);
		}
		curNum =3D 2; //back to initial value after exit from while
loop.
	}


Bye!

Yann de Champlain
  Consultant Web Senior
  Molson Canada
=20
T=E9l         (514) 521-1786 Ext: 5041
Fax        (514) 598-6923
Internet   Yann.deChamplain at Molson.com =
<mailto:Yann.deChamplain at Molson.com>=20
=20


------_=_NextPart_001_01C212DB.4D9B5B00
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2653.12">
<TITLE>Eval() question</TITLE>
</HEAD>
<BODY>
<BR>

<P><FONT SIZE=3D2 FACE=3D"Arial">I'm trying now to create variable in a =
for loop and I got an error:</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">I tested some ways and I got =
something like &quot;impossible to assign a value to a =
funtion&quot;.</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">These functions work on the style of =
a &lt;table&gt; (TR).&nbsp; After I change the display style option I =
can't correctly reevaluate the new value in the style property of the =
TR id so I wanna create a status variable for each row in the table to =
set a status.</FONT></P>
<BR>

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Arial">var curNum;</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Arial">var maxcurNum;</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Arial">curNum =3D 2;</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Arial">maxcurNum =3D 12 </FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Arial">for(var count =3D curNum; count &lt;=3D maxcurNum; =
count++){</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">-----------------------&gt; =
eval(&quot;status&quot; + count) =3D &quot;none&quot;;</FONT>
</P>
<BR>

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Arial">}</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Arial">function addr(){</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Arial">while(curNum &lt;=3D maxcurNum){</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Arial">rid =3D &quot;r&quot; + curNum;</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Arial">sid =3D &quot;status&quot; + curNum;</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Arial">if(eval(sid) =3D &quot;none&quot;){</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Arial">eval(daid).style.display =3D &quot;Block&quot;; </FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Arial">eval(sid) =3D &quot;Block&quot;;</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Arial">//alert('i found a &quot;none&quot; value at id:' + =
daid);</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Arial">return true;</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Arial">break;</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Arial">}</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Arial">curNum++;</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Arial">alert(curNum++);</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Arial">}</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Arial">curNum =3D 2; //back to initial value after exit from =
while loop.</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Arial">}</FONT>
</P>
<BR>

<P><FONT FACE=3D"Arial">Bye!</FONT>
</P>

<P><B><FONT FACE=3D"Arial">Yann de Champlain</FONT></B>
<BR><FONT SIZE=3D2 FACE=3D"Arial">=A0=A0Consultant Web Senior</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">=A0=A0Molson Canada</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">=A0</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">T=E9l=A0=A0=A0=A0=A0=A0=A0=A0 (514) =
521-1786 Ext: 5041</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">Fax=A0=A0=A0=A0=A0=A0=A0 (514) =
598-6923</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">Internet=A0=A0<U> </U></FONT><A =
HREF=3D"mailto:Yann.deChamplain at Molson.com"><U><FONT COLOR=3D"#0000FF" =
SIZE=3D2 =
FACE=3D"Arial">Yann.deChamplain at Molson.com</FONT></U><U></U></A><U></U>
<BR><FONT FACE=3D"Arial">=A0</FONT>
</P>

</BODY>
</HTML>
------_=_NextPart_001_01C212DB.4D9B5B00--

--__--__--

Message: 5
To: javascript at LaTech.edu
From: "Glenn Morris" <gmorris at sct.com>
Date: Thu, 13 Jun 2002 09:47:58 -0400
Subject: [Javascript] Script transferring values - so close
Reply-To: javascript at LaTech.edu

I have this script which works almost the way I want it. What I want
it to do is take the values(fname, lname) and pass them to a new form
in the same browser window. The problem with this script is that it
creates a default form showing the values. What I want it for it to
place the values in a form (NewForm.html) that I have created and sits
in the same directory. I'm sure I'm just a little tweak away from
getting it to work but I can't seem to figure out how. Thanks for any
help.
1. Person presses Click
2. My html form called NewForm.html shows up with fname, lname in
editable field.
3. All done in same browser.
This is all I want it to do.

<HTML>
<head>
<title> I juz don't get /Newform??</title>
<script language="JavaScript">
function unloadMess(){
var fna=mno.fname.value;
var lna=mno.lname.value;
if(document.all && document.getElementById){

form1.Newform.value=fna+' '+lna;
}
}
</SCRIPT>

</head>
<body>
<P><FORM name="mno" id="mno" METHOD=post ACTION="/NewForm.html" ><BR>
<INPUT TYPE="hidden" NAME="fname" VALUE="Ned">
<INPUT TYPE="hidden" NAME="lname" VALUE="Flanders">
<INPUT TYPE="hidden" NAME="fax" VALUE="">
<INPUT TYPE="submit" VALUE="Click here to email">
<BR>
<Center><INPUT TYPE=submit VALUE="Process">
<input type="button" onclick="unloadMess();window.focus()" value
="Click">
</center>
</FORM>
<form name="form1"><textarea name="Newform"></textarea></form>
</body>
</HTML>



--__--__--

Message: 6
Date: Thu, 13 Jun 2002 15:24:11 +0100
From: Rodney Myers <rodney at aflyingstart.net>
To: javascript at LaTech.edu
Subject: Re: [Javascript] Script transferring values - so close
Reply-To: javascript at LaTech.edu

Why not use METHOD="GET" and then parse the values out of the query string
?

Rodney

Glenn Morris wrote:

> I have this script which works almost the way I want it. What I want
> it to do is take the values(fname, lname) and pass them to a new form
> in the same browser window. The problem with this script is that it
> creates a default form showing the values. What I want it for it to
> place the values in a form (NewForm.html) that I have created and sits
> in the same directory. I'm sure I'm just a little tweak away from
> getting it to work but I can't seem to figure out how. Thanks for any
> help.
> 1. Person presses Click
> 2. My html form called NewForm.html shows up with fname, lname in
> editable field.
> 3. All done in same browser.
> This is all I want it to do.
>
> <HTML>
> <head>
> <title> I juz don't get /Newform??</title>
> <script language="JavaScript">
> function unloadMess(){
> var fna=mno.fname.value;
> var lna=mno.lname.value;
> if(document.all && document.getElementById){
>
> form1.Newform.value=fna+' '+lna;
> }
> }
> </SCRIPT>
>
> </head>
> <body>
> <P><FORM name="mno" id="mno" METHOD=post ACTION="/NewForm.html" ><BR>
> <INPUT TYPE="hidden" NAME="fname" VALUE="Ned">
> <INPUT TYPE="hidden" NAME="lname" VALUE="Flanders">
> <INPUT TYPE="hidden" NAME="fax" VALUE="">
> <INPUT TYPE="submit" VALUE="Click here to email">
> <BR>
> <Center><INPUT TYPE=submit VALUE="Process">
> <input type="button" onclick="unloadMess();window.focus()" value
> ="Click">
> </center>
> </FORM>
> <form name="form1"><textarea name="Newform"></textarea></form>
> </body>
> </HTML>
>
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript



--__--__--

Message: 7
From: "Peter Brunone" <peter at brunone.com>
To: <javascript at LaTech.edu>
Subject: RE: [Javascript] Script transferring values - so close
Date: Thu, 13 Jun 2002 10:29:29 -0500
Organization: Your Name Here
Reply-To: javascript at LaTech.edu

Glenn,

	In the script below, you are specifying a form called "form1" that
does not
exist.  If you were to change "form1" to "mno", you would of course get the
data in the textarea called "Newform"... but apparently that's not quite
what you want.
	Have you considered a server-side solution?  Parsing the querystring
(as
Rodney suggested) would definitely work, but if you have the option to use
CGI, ASP, PHP, etc. I would definitely recommend doing so.  Your server
admin will know what tools you can use; it's probably worth the call.

Regards,

Peter

|-----Original Message-----
|From: javascript-admin at LaTech.edu [mailto:javascript-admin at LaTech.edu]On
|Behalf Of Glenn Morris
|Sent: Thursday, June 13, 2002 8:48 AM
|To: javascript at LaTech.edu
|Subject: [Javascript] Script transferring values - so close
|
|
|I have this script which works almost the way I want it. What I want
|it to do is take the values(fname, lname) and pass them to a new form
|in the same browser window. The problem with this script is that it
|creates a default form showing the values. What I want it for it to
|place the values in a form (NewForm.html) that I have created and sits
|in the same directory. I'm sure I'm just a little tweak away from
|getting it to work but I can't seem to figure out how. Thanks for any
|help.
|1. Person presses Click
|2. My html form called NewForm.html shows up with fname, lname in
|editable field.
|3. All done in same browser.
|This is all I want it to do.
|
|<HTML>
|<head>
|<title> I juz don't get /Newform??</title>
|<script language="JavaScript">
|function unloadMess(){
|var fna=mno.fname.value;
|var lna=mno.lname.value;
|if(document.all && document.getElementById){
|
|form1.Newform.value=fna+' '+lna;
|}
|}
|</SCRIPT>
|
|</head>
|<body>
|<P><FORM name="mno" id="mno" METHOD=post ACTION="/NewForm.html" ><BR>
|<INPUT TYPE="hidden" NAME="fname" VALUE="Ned">
|<INPUT TYPE="hidden" NAME="lname" VALUE="Flanders">
|<INPUT TYPE="hidden" NAME="fax" VALUE="">
|<INPUT TYPE="submit" VALUE="Click here to email">
|<BR>
|<Center><INPUT TYPE=submit VALUE="Process">
|<input type="button" onclick="unloadMess();window.focus()" value
|="Click">
|</center>
|</FORM>
|<form name="form1"><textarea name="Newform"></textarea></form>
|</body>
|</HTML>
|
|
|_______________________________________________
|Javascript mailing list
|Javascript at LaTech.edu
|https://lists.LaTech.edu/mailman/listinfo/javascript
|



--__--__--

_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
https://lists.LaTech.edu/mailman/listinfo/javascript


End of Javascript Digest


DISCLAIMER - The preceding e-mail message (including any attachments)
contains information that may be confidential, may be protected by the
attorney-client or other applicable privileges, or may constitute non-public
information.  It is intended to be conveyed only to the designated
recipient(s) named above.  If you are not an intended recipient of this
message, or have otherwise received it in error, please notify the sender by
replying to this message and then delete all copies of it from your computer
system.  Any use, dissemination, distribution, or reproduction of this
message by unintended recipients is not authorized and may be unlawful. The
contents of this communication do not necessarily represent the views of
this company.



More information about the Javascript mailing list