Re: two form one jsp

2006-08-02 Thread Michael Jouravlev
http://www.w3.org/TR/REC-DOM-Level-1/level-one-html.html#ID-36113835 On 8/1/06, Monkeyden <[EMAIL PROTECTED]> wrote: Caroline (or Jen?) All I can say is "Wow!" document.getElementById() only works in IE, not FF. Your response is an arduous elaboration of my document.forms[0] and document.forms

Re: two form one jsp

2006-08-02 Thread Parvat Singh Ranawat
Hi All n Kalpesh, Here I can use seperate formBean but this may not be good practice... actually somebody suggested me to pass the form object as parameter in function while calling java script like

Re: two form one jsp

2006-08-02 Thread kalpesh modi
Is it not possible to use two seperate form beans? -Kalpesh - How low will we go? Check out Yahoo! Messenger’s low PC-to-Phone call rates.

Re: two form one jsp

2006-08-02 Thread Parvat Singh Ranawat
hi , The problem in using document.form[0]. and document.form[1] for first and second form respctively first form comes from Header.jsp and second form from myFoo.jsp and Header is there through out Application and the functionality that is part of Header that I need to write in myFoo.jsp there

Re: two form one jsp

2006-08-01 Thread Monkeyden
Can we please stop suggesting use of the form name? It.will.not.work. If both forms have the same name, it makes a reference to document.forms['foo'] an array and not a reference to the form. Of course you *could *do this: function tellMe(){ alert("Form 1: " + *document.forms['foo'][0].

Re: two form one jsp

2006-08-01 Thread kalpesh modi
I am not sure whether document. form['formName'] will work or not. Give it a try. -Kalpesh - Yahoo! Music Unlimited - Access over 1 million songs.Try it free.

Re: two form one jsp

2006-08-01 Thread Monkeyden
Hari, Form name won't work, or won't be reliable, since two forms have the same name (via Struts). You MUST use the index. Caroline (or Jen?) All I can say is "Wow!" document.getElementById() only works in IE, not FF. Your response is an arduous elaboration of my document.forms[0] and document

Re: two form one jsp

2006-08-01 Thread Caroline Jen
1. Each element in a document must have a unique id. This element is then accessed in script using document.getElementById(). e.g. ... --> document.getElementById("myP") If more than one element has the same id and you try to use that id with document.getElementById(), the method doesn't know w

Re: two form one jsp

2006-08-01 Thread Li
Hi, Would it be possible if you can combine two form to one but have two object behind to accept the dat from form you submit? On 8/1/06, Krishna, Hari <[EMAIL PROTECTED]> wrote: pass the formbean name at run time change the logic It works for me:) -Original Message- From: Parvat Sing

RE: two form one jsp

2006-08-01 Thread Krishna, Hari
pass the formbean name at run time change the logic It works for me:) -Original Message- From: Parvat Singh Ranawat [mailto:[EMAIL PROTECTED] Sent: Monday, July 31, 2006 11:32 PM To: user@struts.apache.org Subject: two form one jsp Hi all, I'm attempting to create a JSP that is made up

Re: two form one jsp

2006-07-31 Thread Monkeyden
Your example WILL always point to the first form, since you use the index of 0 (zero). You need to use 1 to point to the second form. This works fine for me: function tellMe(){ alert("Form 1: " + document.forms[0].form2Text.value); alert("Form 2: " + document.forms[1].form2Text.value)