Form objects and elements array, PHP Web Programming

Assignment Help:

<HTML>

<HEAD>

<TITLE>FORMS</TITLE>

<!-- This code allows to access the Form objects Elements Array //-->

<SCRIPT Language="JavaScript">

function Ver(form1)

{

v=form1.elements.length;

if (form1.elements[3].name=="Button1")

{

alert('First form name : '+document.forms[0].name);

alert('No. of Form elements of  ' +document.forms[0].name + ' = '+v);

}

else if (form1.elements[4].name=="Button2")

{

alert('Second form name : '+document.forms[1].name);

alert('No. of Form elements of  ' +document.forms[1].name + ' = '+v);

}

for(i=0;i<v;i++)

alert(form1.elements[i].name+  ' is at position '+i);

}

</SCRIPT>

</HEAD>

<BODY>

<FORM Name="Survey Form 1">

FIRST FORM: <i><b>Survey Form 1 </b></i><BR><BR>

First Name : <Input Type=Text Name="Text1" Value=""><BR><BR>

<Input Type="radio" Name="Radio1" Value=""> Fresher

<Input Type="radio" Name="Radio1" Value=""> Experienced<BR><BR>

<Input Type="Button" Name="Button1" Value="Click1" onClick="Ver(form)">

</FORM>

<FORM Name="Survey Form 2">

SECOND FORM: <i><b> Survey Form 2 </b></i><BR><BR> Name : <Input Type="Text" Name="Text2" Value=""> <BR><BR>

Password : <Input Type="Password" Name="Pass2" Value="">

<BR><BR>

<BR><BR>

<Input Type="CheckBox" Name="Check1" Value="" > Employed

<Input Type="CheckBox" Name="Check2" Value="" > Studying

<Input Type="Button" Name="Button2" Value="Click2"

onClick="Ver(form)">

</FORM>

</BODY>

</HTML>


Related Discussions:- Form objects and elements array

I need custom t-shirt website, I need Custom T-shirt Website Project Des...

I need Custom T-shirt Website Project Description: Seeking a full-time developer to help custom t-shirt company with multiple projects in the upcoming year. Skills require

Create a connection string to connect to database, Question: (a) What ...

Question: (a) What will be the output of the following extract codes? Describe fully how the program operates. $states_of_the_USA = array (1 => "Alabama", "Alaska", "Arizo

Need help to modify phpmelody template, Modify phpmelody template We hav...

Modify phpmelody template We have a video hosting site that uses the phpmelody backend as well as we would like someone with experience in that software to alter the template to

Create an html document and java applets, For this project, you are requir...

For this project, you are required to design and create an HTML document (also referred to as a "Web page"), in which certain basic HTML elements are incorporated. Your HTML docume

Checkbox, These are used while one or more out of the group of options is t...

These are used while one or more out of the group of options is to be selected. Building Check boxes is extremely similar to radio buttons. Below given code illustrates the use of

Add layout cell, Next insert a layout cell for the Learn More regarding gra...

Next insert a layout cell for the Learn More regarding graphic. 1. In the Objects panel, click on the Draw Layout Cell icon. 2. In the Document window, draw new cell within t

Location object, This is part of a Window object & it is accessed by the wi...

This is part of a Window object & it is accessed by the window. location property. It has the complete URL of any given Window object, or, if none is denoted, of current Window obj

We want help in wordpress plugin development, We want help in WordPress Plu...

We want help in WordPress Plugin Development - Route Delivery Schedule We want a plugin that has the ability to display Delivery Schedules based on a location filter in a calend

Change quantity button cannot be functioned, error_reporting(0); session_...

error_reporting(0); session_start(); header(''Content-type: text/html; charset=utf-8''); include_once(''../../xajax_core/xajax.inc.php''); // ?? xajax $xajax = new xajax()

I need help in completion of blackboard project, I need help in completion ...

I need help in completion of Blackboard Project This is the blackboard project. This is a seven days project. It only needs the designing of few functionalities. Students in ord

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd