473,396 Members | 2,070 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,396 software developers and data experts.

Array Set-Up Question

kc
Hello All

I put this array on the document level of an Acrobat form

var gmagazine = new Array
gmagazine["mhm"] = "48"
gmagazine["mhm"] = "12"
gmagazine["mhm"] = "20"

I then put this on a drop down list field of the form

var trimFld = this.getField("spec_trim")
var liveFld = this.getField("spec_live")
var bleedFld = this.getField("spec_bleed")

if (event.changeEx in gmagazine)
trimFld.value = gmagazine[event.changeEx]

My goal is that when the export value of mhm is selected via the combo
box, these values will diaplay as follows:
48 will appear in the text field "spec_trim"
12 will appear in the text field "spec_live"
20 will appear in the text field "spec_bleed"

I know as currently constructed, the array will only work if I have one
text
field associated with the export value of "mhm". How do I create an
array
that allows for three separate values (for spec_trim, spec_live and
spec_bleed, from a single export value of "mhm"

Is this possible?

Thanks in advance for any assistance.

Kenn

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 23 '05 #1
2 1691
KC
I posted an example of what I am trying to accomplish at
http://www.polar.icestorm.com/sfl/array_example.pdf Please let me know if
you have any ideas on this.
"kc" <cl****@email.toast.net> wrote in message
news:40*********************@news.frii.net...
Hello All

I put this array on the document level of an Acrobat form

var gmagazine = new Array
gmagazine["mhm"] = "48"
gmagazine["mhm"] = "12"
gmagazine["mhm"] = "20"

I then put this on a drop down list field of the form

var trimFld = this.getField("spec_trim")
var liveFld = this.getField("spec_live")
var bleedFld = this.getField("spec_bleed")

if (event.changeEx in gmagazine)
trimFld.value = gmagazine[event.changeEx]

My goal is that when the export value of mhm is selected via the combo
box, these values will diaplay as follows:
48 will appear in the text field "spec_trim"
12 will appear in the text field "spec_live"
20 will appear in the text field "spec_bleed"

I know as currently constructed, the array will only work if I have one
text
field associated with the export value of "mhm". How do I create an
array
that allows for three separate values (for spec_trim, spec_live and
spec_bleed, from a single export value of "mhm"

Is this possible?

Thanks in advance for any assistance.

Kenn

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Jul 23 '05 #2
kc wrote:
var gmagazine = new Array
gmagazine["mhm"] = "48"
gmagazine["mhm"] = "12"
gmagazine["mhm"] = "20"
var trimFld = this.getField("spec_trim")
var liveFld = this.getField("spec_live")
var bleedFld = this.getField("spec_bleed")
if (event.changeEx in gmagazine)
trimFld.value = gmagazine[event.changeEx]
My goal is that when the export value of mhm is selected via the combo
box, these values will diaplay as follows:
48 will appear in the text field "spec_trim"
12 will appear in the text field "spec_live"
20 will appear in the text field "spec_bleed"

<snip>

I'm not sure if this applies to pdf files because I don't understand
your code. This works in an html page. Maybe you can use or modify this
approach:

- use a 2 dimensional array
- match array index data with select index

<script type="text/javascript">
var gmagazine = new Array();
gmagazine[1] = new Array();
gmagazine[1] = ["48","12","20"];
gmagazine[2] = new Array();
gmagazine[2] = ["100","200","300"];

function processlistpick(num) {
var frm=document.forms["form1"];
frm.trim.value = gmagazine[num][0];
frm.live.value = gmagazine[num][1];
frm.bleed.value = gmagazine[num][2];
}
</script>
</head>
<body>
<form name="form1">
<select name="List1" OnChange="processlistpick(this.selectedIndex)">
<option>Choose A Publication</option>
<option>MHM - Miluakee Home</option>
<option>Other - ___________</option>
</select>
<br>
<br>
<input type="text" length=12 name="trim">&nbsp;
<input type="text" length=12 name="live">&nbsp;
<input type="text" length=12 name="bleed">&nbsp;
</form>

Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: JW | last post by:
Hi, Below is a description of what I would like to do. Would someone tell me if it is possible and if so, how? I have an array (presumably 'large') that is mallocced in a C function and its...
8
by: Gactimus | last post by:
I made the program below. It outputs the smallest number in the array. What I would like to know is how do I output the array location. I am at a loss. For example, since the smallest number in...
5
by: eliffman | last post by:
I'm trying to populate an array with the records from a recordset. But I'm getting an error. Here's the code: Dim db As Database, qd As QueryDef, rs As Recordset Dim MyArray() As Double, i As...
11
by: deko | last post by:
I need to create a basic one-dimensional array of strings, but I don't know how many strings I'm going to have until the code is finished looping. pseudo code: Dim astrMyArray() Do While Not...
3
by: Nathan Sokalski | last post by:
I have an array declared as follows: Dim ButtonList() As NavButtonInfo and a Class defined as follows: Public Class NavButtonInfo Public Shared name As String
3
by: simonc | last post by:
Can you define a property as type Byte array of a specific length? I am trying to pass a byte array which is 3200 bytes in length from one form (in which the bytes are read from a file) to...
23
by: sandy | last post by:
I need (okay, I want) to make a dynamic array of my class 'Directory', within my class Directory (Can you already smell disaster?) Each Directory can have subdirectories so I thought to put these...
14
by: mast2as | last post by:
Hi everyone, I am trying to implement some specs which specify that an array of parameter is passed to a function as a pointer to an array terminated by a NULL chatacter. That seemed fairly easy...
5
by: Stephen3776 | last post by:
I am doing an inventory control progam and trying to output a multiple array, I am getting an illegal conversion error java.lang.double !d. Can somebody tell me what I am doing wrong or if there is...
0
by: blainegray | last post by:
Greetings This is one of those Access is not closing Excel problems. The first time through the code works fine. The second time there is a problem. After lots of combinations, I finally...
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:
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.