Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

How to get Form Name using TexyBox name

 
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everyone,
i want to that How to get Form Name using TexyBox name.
suppose in 1 jsp page i have created 3 forms
In 1 of the forms i have included common.jsp file
now in that common.jsp file there is an textBox name Go.

what i want is Using that Go button i want to know the Action name and the Form name..
jsp will look something like this:
test.jsp-------------------------
< html form name=... action=...... >
.
.
.
< / html form >
< html form name=test action=test >
.
< input type.... name= Go value=... / >
.
< / html form >

< html form name=... action=...... >
.
.
.
< / html form >
On Click of Go what i want is that Action is ... and formname is ..... where
textbox name is GO..

i hope i am clear

thanks,
Nishita
 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
call the following function on click of the go button by passing an instance of textbox.

function getFormName(obj){
var formObj=obj.form;

alert(formObj.name);
alert(formObj.action);
}


Hope I got your question correct
 
Nishita Jain
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello Kamesh
tahnks for the prompt reply.
but thing is that whta if there is a link instead of that button..
i want form name in Link. i m sorry i forgot to mension that

thanks,
Nishita
[ December 28, 2006: Message edited by: Nishita Jain ]
    Bookmark Topic Watch Topic
  • New Topic