View Full Version : prompting document

Jun 29th, 2007, 06:00 PM
I am trying to creat javascript to creat a document that will display info for three banks then prompt for the user to input information further where do i go from here.
My code is below.



<TITLE>Parallel Array Lookup</TITLE>
// the data

var institutionname = new Array("bank1", "bank2", "bank3", "bank4")

var accounttype = new Array("saving", "current", "e-save")

var regOfficeQuotas = new Array(300000, 250000, 350000, 225000)

// do the lookup into parallel arrays

function getData(form) {
var i = form.offices.selectedIndex
form.manager.value = institutionname[i]
form.quota.value = accounttype[i]
<BODY onLoad="getData(document.officeData)">
<H1>Parallel Array Lookup</H1>
<FORM NAME="officeData">

Philip M
Jun 29th, 2007, 07:02 PM
I am sure we have seen this before - an examination question isn't it?

I am afraid that it is not fair on the other candidates if you get help from others. It is supposed to be your own work.

Jun 29th, 2007, 11:17 PM
No it is not i am currently studying but this is not an exam question i am looking for advice arrays and this is a question from a study book not an exam.