473,395 Members | 1,670 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

javascripts-form objects. problem to connect display1 and display2

aieaddin94
how to get the output from function display1 to function display2 where display1 output is display in new window and display2 output is display in text area

Expand|Select|Wrap|Line Numbers
  1.  function display1()
  2.        {
  3.  
  4.              var new_win = window.open();
  5.  
  6.              /******** Sub-section for step 2 - Text Field *********/
  7.              var name = document.form1.person_name.value;
  8.  
  9.              new_win.document.writeln("Name: <b>", name, "</b><br>");
  10.  
  11.              /********* Sub-section for step 3 - Radio *********/
  12.              btn_array = document.form1.own_computer;
  13.  
  14.              if (btn_array[0].checked)
  15.                new_win.document.writeln("Have a computer: <b> YES </b>", "<br>");
  16.              else
  17.                 if (btn_array[1].checked)
  18.                     new_win.document.writeln("Have a computer: <b> NO </b>", "<br>");
  19.  
  20.              /********* Sub-section for step 4 - List *********/
  21.              list = document.form1.computer_type;
  22.              index =list.selectedIndex;
  23.              comp_type=list.options[index].text;
  24.  
  25.              new_win.document.writeln("Computer Type: <b>", comp_type, "</b><br>");
  26.  
  27.              /********* Sub-section for step 5 - Check Box *********/
  28.              check_array = document.form1.language;
  29.              new_win.document.writeln("Computer Languages: <b>");
  30.  
  31.              for (var i=0; i<document.form1.language.length; i++)
  32.              {
  33.                if (document.form1.language[i].checked)
  34.                    new_win.document.writeln(check_array[i].value,", *");
  35.              }
  36.              new_win.document.writeln("</b>");
  37.            }
  38.  
  39.          function display2()
  40.          {
  41.             document.form1.text1.value = "any text" ;
  42.          }
Apr 15 '14 #1
0 1009

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Gijs Korremans | last post by:
Hi, I want to connect to a com object with win32.client. Through this com object a have to connect to an other device with object.Connect(struct IPADDRESS_STRUCT * ip) the struct...
11
by: Marcus | last post by:
Hello! I'm trying to write a VB.NET program that connects to a AS/400 Server. I've tried almost everything, but it will not connect. I've tried to set up a DSN using the Client Access...
106
by: xtra | last post by:
Hi Folk I have about 1000 procedures in my project. Many, many of them are along the lines of function myfuntion () as boolean on error goto er '- Dim Dbs as dao.database Dim Rst as...
13
by: Andy Baxter | last post by:
Can anyone recommend a good online guide to using objects in javascript? The book I bought (DHTML Utopia) suggests using objects to keep the code clean and stop namespace clashes between different...
2
by: Cornelius.Eckhoff | last post by:
Hello, I just want my ADP not to connect on startup. Normally when opening the xx.adp-file Access tries to connect automatically. Is there any option, trick, workaround? I found a source to...
5
by: | last post by:
I've got a basic "chat" infrastructure that can send objects across the wire, but I'm running into a few issues with trying to send multiple messages and things behaving differently in debug and...
1
by: pradeeppani | last post by:
#include<iostream> #include<list> using namespace std; class a { private: int x; public: void setx(int xx) {
2
by: Kevin | last post by:
Does anyone know a simple way to have a program start with the main form maximized on Display2?
2
by: Steve | last post by:
Is there a way to connect to SQL server and read all of the jobs listed in the job agent and get the status of each job? I want to create either a web page or a winForm, have a list of all SQL DB...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.