Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adobe PDFs and Javascript

Status
Not open for further replies.

mtorbin

Technical User
Nov 5, 2002
369
US
Oops... guess that didn't work. Here is the recreated conversation:


Matt said:
Hey all,

I'm in the process of constructing a PDF Form. I would like to do the following:
[ol]
[li]A user clicks on RADIO BUTTON A.
[li]CHECKBOX B becomes selected.
[/ol]
Now, this is very easy to do in HTML/Javascript where the browser DOM is layed out. However, I don't know the DOM for the PDF document. Does anyone have any suggestions about this?

Thanks,

- MT

George said:
Controlling one field from an event in another is certainly possible with Acrobat JavaScript, but your description of what you want to happen isn't clear to me.

George

Matt said:
Maybe this will make it easier. When the mouseUp action takes place on the CHECKBOX, the following JS is run:

[tt]var mounting = this.getField("accessories.1");

if (mounting.isBoxChecked(0)) {
// the radio button is selected
app.alert("You have chosen the right mounting clip.");
}

else {
// the radio button is not selected.
app.alert("This mounting clip will not work. Use this one instead.");
// PUT ACTION HERE TO SELECT THE APPROPRIATE RADIO BUTTON
}
[/tt]

I don't think that there is any way to set the 'state' of a radio button.

- MT

Hopefully this will help.

- MT

Matt Torbin
Web and Graphic Arts Engineer
PEI-Genesis

aim: dgtlby
direct email: mtorbin_at_earthlink.net
 
I don't think that there is any way to set the 'state' of a radio button.

There is another way to set the "state", use tab and blank key on the keyboard.

RocSky SPlitPDF:Split one multipage Pdf document into one page PDF Documents
RocSky PDFMerger:Merge many a PDF document in a folder into one PDF document

Pls visit
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top