• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to get Form Name using TexyBox name

 
Nishita Jain
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
 
Kamesh Rao
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic