Hyperref TextField – How to implement an hyperref action WITHOUT pushbutton
How are the hyperref
package options onchange and onkeypress used?
In the following example, which transfers the input-text to the output-text, only the pushbutton using the onclick -option work.... but not the onchange option within the textfield.
I would like to obtain that the input text is copied to the output text field immediately, if the input text field changes, WITHOUT using the push button.
documentclass[20pt,a4paper]{article}
usepackage{xcolor}
usepackage{hyperref}
%% Short hand commands
newcommand{textforlabel}[2]{%
TextField[name={#1}, value={#2}, width=9em,align=2,%
bordercolor={0.990 .980 .85},%
readonly=true]{}%
}%
newcommand{heading}[1]{textsc{#1}}
%% document
begin{document}
begin{Form}
%% Input
heading{Input}
\
\
textforlabel{l01}{Input:}
TextField[name=input1,onchange={%
var datastring1=this.getField("input1").value;
this.getField("output1").value=datastring1;%
}%
,width=2in, bordercolor={0.650 .790 .94}]{}%
\
%% Push button
PushButton[name=button1,onclick={%
var datastring1=this.getField("input1").value;
this.getField("output1").value=datastring1;%
}%
,bordercolor={0 0 0}]{To Output}
\
%% Output
heading{Output}
\
\
textforlabel{l02}{Output:}
TextField[name=output1,width=2in,%
bordercolor={0.650 .790 .94},readonly=true]{}
end{Form}
end{document}
hyperref
add a comment |
How are the hyperref
package options onchange and onkeypress used?
In the following example, which transfers the input-text to the output-text, only the pushbutton using the onclick -option work.... but not the onchange option within the textfield.
I would like to obtain that the input text is copied to the output text field immediately, if the input text field changes, WITHOUT using the push button.
documentclass[20pt,a4paper]{article}
usepackage{xcolor}
usepackage{hyperref}
%% Short hand commands
newcommand{textforlabel}[2]{%
TextField[name={#1}, value={#2}, width=9em,align=2,%
bordercolor={0.990 .980 .85},%
readonly=true]{}%
}%
newcommand{heading}[1]{textsc{#1}}
%% document
begin{document}
begin{Form}
%% Input
heading{Input}
\
\
textforlabel{l01}{Input:}
TextField[name=input1,onchange={%
var datastring1=this.getField("input1").value;
this.getField("output1").value=datastring1;%
}%
,width=2in, bordercolor={0.650 .790 .94}]{}%
\
%% Push button
PushButton[name=button1,onclick={%
var datastring1=this.getField("input1").value;
this.getField("output1").value=datastring1;%
}%
,bordercolor={0 0 0}]{To Output}
\
%% Output
heading{Output}
\
\
textforlabel{l02}{Output:}
TextField[name=output1,width=2in,%
bordercolor={0.650 .790 .94},readonly=true]{}
end{Form}
end{document}
hyperref
pdflatex
issues a message: "Package hyperref Warning: HTML field option 'onchange' is ignored on line 28". Possibly this functionality is not provided for PDF forms, and only for HTML forms (which you can make withhtlatex
)?
– Marijn
Mar 30 '17 at 22:21
add a comment |
How are the hyperref
package options onchange and onkeypress used?
In the following example, which transfers the input-text to the output-text, only the pushbutton using the onclick -option work.... but not the onchange option within the textfield.
I would like to obtain that the input text is copied to the output text field immediately, if the input text field changes, WITHOUT using the push button.
documentclass[20pt,a4paper]{article}
usepackage{xcolor}
usepackage{hyperref}
%% Short hand commands
newcommand{textforlabel}[2]{%
TextField[name={#1}, value={#2}, width=9em,align=2,%
bordercolor={0.990 .980 .85},%
readonly=true]{}%
}%
newcommand{heading}[1]{textsc{#1}}
%% document
begin{document}
begin{Form}
%% Input
heading{Input}
\
\
textforlabel{l01}{Input:}
TextField[name=input1,onchange={%
var datastring1=this.getField("input1").value;
this.getField("output1").value=datastring1;%
}%
,width=2in, bordercolor={0.650 .790 .94}]{}%
\
%% Push button
PushButton[name=button1,onclick={%
var datastring1=this.getField("input1").value;
this.getField("output1").value=datastring1;%
}%
,bordercolor={0 0 0}]{To Output}
\
%% Output
heading{Output}
\
\
textforlabel{l02}{Output:}
TextField[name=output1,width=2in,%
bordercolor={0.650 .790 .94},readonly=true]{}
end{Form}
end{document}
hyperref
How are the hyperref
package options onchange and onkeypress used?
In the following example, which transfers the input-text to the output-text, only the pushbutton using the onclick -option work.... but not the onchange option within the textfield.
I would like to obtain that the input text is copied to the output text field immediately, if the input text field changes, WITHOUT using the push button.
documentclass[20pt,a4paper]{article}
usepackage{xcolor}
usepackage{hyperref}
%% Short hand commands
newcommand{textforlabel}[2]{%
TextField[name={#1}, value={#2}, width=9em,align=2,%
bordercolor={0.990 .980 .85},%
readonly=true]{}%
}%
newcommand{heading}[1]{textsc{#1}}
%% document
begin{document}
begin{Form}
%% Input
heading{Input}
\
\
textforlabel{l01}{Input:}
TextField[name=input1,onchange={%
var datastring1=this.getField("input1").value;
this.getField("output1").value=datastring1;%
}%
,width=2in, bordercolor={0.650 .790 .94}]{}%
\
%% Push button
PushButton[name=button1,onclick={%
var datastring1=this.getField("input1").value;
this.getField("output1").value=datastring1;%
}%
,bordercolor={0 0 0}]{To Output}
\
%% Output
heading{Output}
\
\
textforlabel{l02}{Output:}
TextField[name=output1,width=2in,%
bordercolor={0.650 .790 .94},readonly=true]{}
end{Form}
end{document}
hyperref
hyperref
edited Mar 30 '17 at 16:59
Sebastiano
9,50741857
9,50741857
asked Mar 30 '17 at 15:26
JacobHerJacobHer
111
111
pdflatex
issues a message: "Package hyperref Warning: HTML field option 'onchange' is ignored on line 28". Possibly this functionality is not provided for PDF forms, and only for HTML forms (which you can make withhtlatex
)?
– Marijn
Mar 30 '17 at 22:21
add a comment |
pdflatex
issues a message: "Package hyperref Warning: HTML field option 'onchange' is ignored on line 28". Possibly this functionality is not provided for PDF forms, and only for HTML forms (which you can make withhtlatex
)?
– Marijn
Mar 30 '17 at 22:21
pdflatex
issues a message: "Package hyperref Warning: HTML field option 'onchange' is ignored on line 28". Possibly this functionality is not provided for PDF forms, and only for HTML forms (which you can make with htlatex
)?– Marijn
Mar 30 '17 at 22:21
pdflatex
issues a message: "Package hyperref Warning: HTML field option 'onchange' is ignored on line 28". Possibly this functionality is not provided for PDF forms, and only for HTML forms (which you can make with htlatex
)?– Marijn
Mar 30 '17 at 22:21
add a comment |
2 Answers
2
active
oldest
votes
You can use the keystroke
option of TextField
and evaluate the event.value
property in the JavaScript to set the output field's value.
Unfortunately, event.value
contains only the value that was known before input1
received the keystroke. You have to end the input by hitting "Enter" in order to also get the last key typed in:
documentclass[20pt,a4paper]{article}
usepackage{xcolor}
usepackage{hyperref}
%% Short hand commands
newcommand{textforlabel}[2]{%
TextField[name={#1}, value={#2}, width=9em,align=2,%
bordercolor={0.990 .980 .85},%
readonly=true]{}%
}%
newcommand{heading}[1]{textsc{#1}}
%% document
begin{document}
begin{Form}
%% Input
heading{Input}
\
\
textforlabel{l01}{Input:}
TextField[name=input1,keystroke={%
% var datastring1=this.getField("input1").value;
% this.getField("output1").value=datastring1;%
this.getField("output1").value=event.value;
}%
,width=2in, bordercolor={0.650 .790 .94}]{}%
\
%%% Push button
%PushButton[name=button1,onclick={%
% var datastring1=this.getField("input1").value;
% this.getField("output1").value=datastring1;%
% }%
% ,bordercolor={0 0 0}]{To Output}
% \
%% Output
heading{Output}
\
\
textforlabel{l02}{Output:}
TextField[name=output1,width=2in,%
bordercolor={0.650 .790 .94},readonly=true]{}
end{Form}
end{document}
1
Thanks. Very Helpful. The restriction that the last letter is not transfered, will be difficult to overcome as I see. I don t think that it is possible.
– JacobHer
Mar 31 '17 at 13:47
add a comment |
Would this be enough for you ? It is not completely instaneous but changes the whole answer directly. You have to press tab or go in another field to implement the JS command, similarly as with Keystroke, which does not implement the last letter until after the event.
documentclass[20pt,a4paper]{article}
usepackage{xcolor}
usepackage{hyperref}
%% Short hand commands
newcommand{textforlabel}[2]{%
TextField[name={#1}, value={#2}, width=9em,align=2,%
bordercolor={0.990 .980 .85},%
readonly=true]{}%
}%
newcommand{heading}[1]{textsc{#1}}
%% document
begin{document}
begin{Form}
heading{Input 1}
\
\
textforlabel{l01}{Input 1:}
TextField[name=input1,width=2in, bordercolor={0.650 .790 .94}]{}%
\
%% Push button
PushButton[name=button1,onclick={%
var datastring1=this.getField("input1").value;
this.getField("output1").value=datastring1;%
}%
,bordercolor={0 0 0}]{To Output}
\
%% Output
heading{Output 1}
\
\
textforlabel{l02}{Output1:}
TextField[name=output1,width=2in,%
bordercolor={0.650 .790 .94},readonly=true]{}
vspace{40pt}
%% Input 2
heading{Input 2}
\
\
textforlabel{l03}{Input 2:}
TextField[
name=input2,
width=2in,
bordercolor={0.650 .790 .94}]{}
\
%% Output 2
heading{Output 2}
\
\
textforlabel{l04}{Output:}
TextField[
name=output2,
width=2in,
bordercolor={0.650 .790 .94},
readonly=true,
calculate = {%
event.value = this.getField("input2").value;
}
]{}
end{Form}
end{document}
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f361269%2fhyperref-textfield-how-to-implement-an-hyperref-action-without-pushbutton%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
You can use the keystroke
option of TextField
and evaluate the event.value
property in the JavaScript to set the output field's value.
Unfortunately, event.value
contains only the value that was known before input1
received the keystroke. You have to end the input by hitting "Enter" in order to also get the last key typed in:
documentclass[20pt,a4paper]{article}
usepackage{xcolor}
usepackage{hyperref}
%% Short hand commands
newcommand{textforlabel}[2]{%
TextField[name={#1}, value={#2}, width=9em,align=2,%
bordercolor={0.990 .980 .85},%
readonly=true]{}%
}%
newcommand{heading}[1]{textsc{#1}}
%% document
begin{document}
begin{Form}
%% Input
heading{Input}
\
\
textforlabel{l01}{Input:}
TextField[name=input1,keystroke={%
% var datastring1=this.getField("input1").value;
% this.getField("output1").value=datastring1;%
this.getField("output1").value=event.value;
}%
,width=2in, bordercolor={0.650 .790 .94}]{}%
\
%%% Push button
%PushButton[name=button1,onclick={%
% var datastring1=this.getField("input1").value;
% this.getField("output1").value=datastring1;%
% }%
% ,bordercolor={0 0 0}]{To Output}
% \
%% Output
heading{Output}
\
\
textforlabel{l02}{Output:}
TextField[name=output1,width=2in,%
bordercolor={0.650 .790 .94},readonly=true]{}
end{Form}
end{document}
1
Thanks. Very Helpful. The restriction that the last letter is not transfered, will be difficult to overcome as I see. I don t think that it is possible.
– JacobHer
Mar 31 '17 at 13:47
add a comment |
You can use the keystroke
option of TextField
and evaluate the event.value
property in the JavaScript to set the output field's value.
Unfortunately, event.value
contains only the value that was known before input1
received the keystroke. You have to end the input by hitting "Enter" in order to also get the last key typed in:
documentclass[20pt,a4paper]{article}
usepackage{xcolor}
usepackage{hyperref}
%% Short hand commands
newcommand{textforlabel}[2]{%
TextField[name={#1}, value={#2}, width=9em,align=2,%
bordercolor={0.990 .980 .85},%
readonly=true]{}%
}%
newcommand{heading}[1]{textsc{#1}}
%% document
begin{document}
begin{Form}
%% Input
heading{Input}
\
\
textforlabel{l01}{Input:}
TextField[name=input1,keystroke={%
% var datastring1=this.getField("input1").value;
% this.getField("output1").value=datastring1;%
this.getField("output1").value=event.value;
}%
,width=2in, bordercolor={0.650 .790 .94}]{}%
\
%%% Push button
%PushButton[name=button1,onclick={%
% var datastring1=this.getField("input1").value;
% this.getField("output1").value=datastring1;%
% }%
% ,bordercolor={0 0 0}]{To Output}
% \
%% Output
heading{Output}
\
\
textforlabel{l02}{Output:}
TextField[name=output1,width=2in,%
bordercolor={0.650 .790 .94},readonly=true]{}
end{Form}
end{document}
1
Thanks. Very Helpful. The restriction that the last letter is not transfered, will be difficult to overcome as I see. I don t think that it is possible.
– JacobHer
Mar 31 '17 at 13:47
add a comment |
You can use the keystroke
option of TextField
and evaluate the event.value
property in the JavaScript to set the output field's value.
Unfortunately, event.value
contains only the value that was known before input1
received the keystroke. You have to end the input by hitting "Enter" in order to also get the last key typed in:
documentclass[20pt,a4paper]{article}
usepackage{xcolor}
usepackage{hyperref}
%% Short hand commands
newcommand{textforlabel}[2]{%
TextField[name={#1}, value={#2}, width=9em,align=2,%
bordercolor={0.990 .980 .85},%
readonly=true]{}%
}%
newcommand{heading}[1]{textsc{#1}}
%% document
begin{document}
begin{Form}
%% Input
heading{Input}
\
\
textforlabel{l01}{Input:}
TextField[name=input1,keystroke={%
% var datastring1=this.getField("input1").value;
% this.getField("output1").value=datastring1;%
this.getField("output1").value=event.value;
}%
,width=2in, bordercolor={0.650 .790 .94}]{}%
\
%%% Push button
%PushButton[name=button1,onclick={%
% var datastring1=this.getField("input1").value;
% this.getField("output1").value=datastring1;%
% }%
% ,bordercolor={0 0 0}]{To Output}
% \
%% Output
heading{Output}
\
\
textforlabel{l02}{Output:}
TextField[name=output1,width=2in,%
bordercolor={0.650 .790 .94},readonly=true]{}
end{Form}
end{document}
You can use the keystroke
option of TextField
and evaluate the event.value
property in the JavaScript to set the output field's value.
Unfortunately, event.value
contains only the value that was known before input1
received the keystroke. You have to end the input by hitting "Enter" in order to also get the last key typed in:
documentclass[20pt,a4paper]{article}
usepackage{xcolor}
usepackage{hyperref}
%% Short hand commands
newcommand{textforlabel}[2]{%
TextField[name={#1}, value={#2}, width=9em,align=2,%
bordercolor={0.990 .980 .85},%
readonly=true]{}%
}%
newcommand{heading}[1]{textsc{#1}}
%% document
begin{document}
begin{Form}
%% Input
heading{Input}
\
\
textforlabel{l01}{Input:}
TextField[name=input1,keystroke={%
% var datastring1=this.getField("input1").value;
% this.getField("output1").value=datastring1;%
this.getField("output1").value=event.value;
}%
,width=2in, bordercolor={0.650 .790 .94}]{}%
\
%%% Push button
%PushButton[name=button1,onclick={%
% var datastring1=this.getField("input1").value;
% this.getField("output1").value=datastring1;%
% }%
% ,bordercolor={0 0 0}]{To Output}
% \
%% Output
heading{Output}
\
\
textforlabel{l02}{Output:}
TextField[name=output1,width=2in,%
bordercolor={0.650 .790 .94},readonly=true]{}
end{Form}
end{document}
edited Mar 31 '17 at 11:04
answered Mar 31 '17 at 10:44
AlexGAlexG
32.7k479145
32.7k479145
1
Thanks. Very Helpful. The restriction that the last letter is not transfered, will be difficult to overcome as I see. I don t think that it is possible.
– JacobHer
Mar 31 '17 at 13:47
add a comment |
1
Thanks. Very Helpful. The restriction that the last letter is not transfered, will be difficult to overcome as I see. I don t think that it is possible.
– JacobHer
Mar 31 '17 at 13:47
1
1
Thanks. Very Helpful. The restriction that the last letter is not transfered, will be difficult to overcome as I see. I don t think that it is possible.
– JacobHer
Mar 31 '17 at 13:47
Thanks. Very Helpful. The restriction that the last letter is not transfered, will be difficult to overcome as I see. I don t think that it is possible.
– JacobHer
Mar 31 '17 at 13:47
add a comment |
Would this be enough for you ? It is not completely instaneous but changes the whole answer directly. You have to press tab or go in another field to implement the JS command, similarly as with Keystroke, which does not implement the last letter until after the event.
documentclass[20pt,a4paper]{article}
usepackage{xcolor}
usepackage{hyperref}
%% Short hand commands
newcommand{textforlabel}[2]{%
TextField[name={#1}, value={#2}, width=9em,align=2,%
bordercolor={0.990 .980 .85},%
readonly=true]{}%
}%
newcommand{heading}[1]{textsc{#1}}
%% document
begin{document}
begin{Form}
heading{Input 1}
\
\
textforlabel{l01}{Input 1:}
TextField[name=input1,width=2in, bordercolor={0.650 .790 .94}]{}%
\
%% Push button
PushButton[name=button1,onclick={%
var datastring1=this.getField("input1").value;
this.getField("output1").value=datastring1;%
}%
,bordercolor={0 0 0}]{To Output}
\
%% Output
heading{Output 1}
\
\
textforlabel{l02}{Output1:}
TextField[name=output1,width=2in,%
bordercolor={0.650 .790 .94},readonly=true]{}
vspace{40pt}
%% Input 2
heading{Input 2}
\
\
textforlabel{l03}{Input 2:}
TextField[
name=input2,
width=2in,
bordercolor={0.650 .790 .94}]{}
\
%% Output 2
heading{Output 2}
\
\
textforlabel{l04}{Output:}
TextField[
name=output2,
width=2in,
bordercolor={0.650 .790 .94},
readonly=true,
calculate = {%
event.value = this.getField("input2").value;
}
]{}
end{Form}
end{document}
add a comment |
Would this be enough for you ? It is not completely instaneous but changes the whole answer directly. You have to press tab or go in another field to implement the JS command, similarly as with Keystroke, which does not implement the last letter until after the event.
documentclass[20pt,a4paper]{article}
usepackage{xcolor}
usepackage{hyperref}
%% Short hand commands
newcommand{textforlabel}[2]{%
TextField[name={#1}, value={#2}, width=9em,align=2,%
bordercolor={0.990 .980 .85},%
readonly=true]{}%
}%
newcommand{heading}[1]{textsc{#1}}
%% document
begin{document}
begin{Form}
heading{Input 1}
\
\
textforlabel{l01}{Input 1:}
TextField[name=input1,width=2in, bordercolor={0.650 .790 .94}]{}%
\
%% Push button
PushButton[name=button1,onclick={%
var datastring1=this.getField("input1").value;
this.getField("output1").value=datastring1;%
}%
,bordercolor={0 0 0}]{To Output}
\
%% Output
heading{Output 1}
\
\
textforlabel{l02}{Output1:}
TextField[name=output1,width=2in,%
bordercolor={0.650 .790 .94},readonly=true]{}
vspace{40pt}
%% Input 2
heading{Input 2}
\
\
textforlabel{l03}{Input 2:}
TextField[
name=input2,
width=2in,
bordercolor={0.650 .790 .94}]{}
\
%% Output 2
heading{Output 2}
\
\
textforlabel{l04}{Output:}
TextField[
name=output2,
width=2in,
bordercolor={0.650 .790 .94},
readonly=true,
calculate = {%
event.value = this.getField("input2").value;
}
]{}
end{Form}
end{document}
add a comment |
Would this be enough for you ? It is not completely instaneous but changes the whole answer directly. You have to press tab or go in another field to implement the JS command, similarly as with Keystroke, which does not implement the last letter until after the event.
documentclass[20pt,a4paper]{article}
usepackage{xcolor}
usepackage{hyperref}
%% Short hand commands
newcommand{textforlabel}[2]{%
TextField[name={#1}, value={#2}, width=9em,align=2,%
bordercolor={0.990 .980 .85},%
readonly=true]{}%
}%
newcommand{heading}[1]{textsc{#1}}
%% document
begin{document}
begin{Form}
heading{Input 1}
\
\
textforlabel{l01}{Input 1:}
TextField[name=input1,width=2in, bordercolor={0.650 .790 .94}]{}%
\
%% Push button
PushButton[name=button1,onclick={%
var datastring1=this.getField("input1").value;
this.getField("output1").value=datastring1;%
}%
,bordercolor={0 0 0}]{To Output}
\
%% Output
heading{Output 1}
\
\
textforlabel{l02}{Output1:}
TextField[name=output1,width=2in,%
bordercolor={0.650 .790 .94},readonly=true]{}
vspace{40pt}
%% Input 2
heading{Input 2}
\
\
textforlabel{l03}{Input 2:}
TextField[
name=input2,
width=2in,
bordercolor={0.650 .790 .94}]{}
\
%% Output 2
heading{Output 2}
\
\
textforlabel{l04}{Output:}
TextField[
name=output2,
width=2in,
bordercolor={0.650 .790 .94},
readonly=true,
calculate = {%
event.value = this.getField("input2").value;
}
]{}
end{Form}
end{document}
Would this be enough for you ? It is not completely instaneous but changes the whole answer directly. You have to press tab or go in another field to implement the JS command, similarly as with Keystroke, which does not implement the last letter until after the event.
documentclass[20pt,a4paper]{article}
usepackage{xcolor}
usepackage{hyperref}
%% Short hand commands
newcommand{textforlabel}[2]{%
TextField[name={#1}, value={#2}, width=9em,align=2,%
bordercolor={0.990 .980 .85},%
readonly=true]{}%
}%
newcommand{heading}[1]{textsc{#1}}
%% document
begin{document}
begin{Form}
heading{Input 1}
\
\
textforlabel{l01}{Input 1:}
TextField[name=input1,width=2in, bordercolor={0.650 .790 .94}]{}%
\
%% Push button
PushButton[name=button1,onclick={%
var datastring1=this.getField("input1").value;
this.getField("output1").value=datastring1;%
}%
,bordercolor={0 0 0}]{To Output}
\
%% Output
heading{Output 1}
\
\
textforlabel{l02}{Output1:}
TextField[name=output1,width=2in,%
bordercolor={0.650 .790 .94},readonly=true]{}
vspace{40pt}
%% Input 2
heading{Input 2}
\
\
textforlabel{l03}{Input 2:}
TextField[
name=input2,
width=2in,
bordercolor={0.650 .790 .94}]{}
\
%% Output 2
heading{Output 2}
\
\
textforlabel{l04}{Output:}
TextField[
name=output2,
width=2in,
bordercolor={0.650 .790 .94},
readonly=true,
calculate = {%
event.value = this.getField("input2").value;
}
]{}
end{Form}
end{document}
answered Jan 17 at 16:37
A.DuA.Du
326
326
add a comment |
add a comment |
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f361269%2fhyperref-textfield-how-to-implement-an-hyperref-action-without-pushbutton%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
pdflatex
issues a message: "Package hyperref Warning: HTML field option 'onchange' is ignored on line 28". Possibly this functionality is not provided for PDF forms, and only for HTML forms (which you can make withhtlatex
)?– Marijn
Mar 30 '17 at 22:21