Avatar of rgbcof
rgbcof

asked on 

javascript, how to read value from hidden field

Suppose i have two forms (A and no name).  In javascript, how do I get to the hidden field value in formA and formwith no name.

<form name="formA" action="dosomething" method="post">
  <input type="hidden" name="fieldA" value="AAAA">
  <input type="submit" value="Submit" />
</form>
<form action="dosomething" method="post">
  <input type="hidden" name="fieldB" value="BBBB">
  <input type="submit" value="Submit" />
</form>
JavaScriptHTML

Avatar of undefined
Last Comment
Sudaraka Wijesinghe
SOLUTION
Avatar of jafrazee
jafrazee

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
ASKER CERTIFIED SOLUTION
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
Avatar of rgbcof
rgbcof

ASKER

Both solutions works.  Thanks for the specifics Sud.
Glad to help. Thanks for the points.
JavaScript
JavaScript

JavaScript is a dynamic, object-based language commonly used for client-side scripting in web browsers. Recently, server side JavaScript frameworks have also emerged. JavaScript runs on nearly every operating system and in almost every mainstream web browser.

127K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo