By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,616 Members | 1,184 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,616 IT Pros & Developers. It's quick & easy.

form problem?

P: n/a
Hello,

How do I get the str_questions values into a form?! The following does
not work. I have also tried

document.write("<input type='hidden' name='slidervalues'
value=str_questions>");

Thanks

Geoff
document.getElementById("Slider1ValueText").innerH TML = str_questions;

document.write("<form
action='http://website/path/cgi-bin/formmail-nms.cgi'
method='post'>");
document.write("<input type='hidden' name='slidervalues'
value='str_questions'>");
document.write("<input type='hidden' name='recipient'
value='extraemails'>");
document.write("<input type='submit'send'>");

Sep 10 '05 #1
Share this Question
Share on Google+
20 Replies


P: n/a
Geoff Cox wrote:
Hello,

How do I get the str_questions values into a form?! The following does
not work. I have also tried

document.write("<input type='hidden' name='slidervalues'
value=str_questions>");
Jaysus Geoff!? You're writing the *STRING" "str_questions", not
inserting the value of the *VARIABLE" str_questions! THINK ABOUT IT:

document.write("<input type='hidden' name='slidervalues' value='" +
str_questions + "'>");
Thanks

Geoff
document.getElementById("Slider1ValueText").innerH TML = str_questions;

document.write("<form
action='http://website/path/cgi-bin/formmail-nms.cgi'
method='post'>");
document.write("<input type='hidden' name='slidervalues'
value='str_questions'>");
document.write("<input type='hidden' name='recipient'
value='extraemails'>");
document.write("<input type='submit'send'>");


Sep 10 '05 #2

P: n/a
On Sat, 10 Sep 2005 09:31:05 +0000 (UTC), ExGuardianReader
<no***@noway.com> wrote:
document.write("<input type='hidden' name='slidervalues' value='" +
str_questions + "'>");


Thanks! I knew it was wrong but couldn't see how to get it right.
Working OK now but a second question - hwo do I create the <form ....
</form> without using document.write() which opens a new window? I
imagine it has to do with using a <SPAN element and
document.getElementById("myID").innerHTML but not clear how to do
it...

document.write("<form action ='http://website/path/formmail-nms.cgi'
method='post'>");
document.write("<input type ='hidden' name ='slidervalues' value='" +
str_questions + "'>");
document.write("<input type ='hidden' name ='recipient' value
='extraemails'>");
document.write("<input type ='submit' value='send'
onlick-'sendslidervalues'>");
document.write("</form>");

Cheers

Geoff
Sep 10 '05 #3

P: n/a
Geoff Cox wrote:
On Sat, 10 Sep 2005 09:31:05 +0000 (UTC), ExGuardianReader
<no***@noway.com> wrote:

document.write("<input type='hidden' name='slidervalues' value='" +
str_questions + "'>");

Thanks! I knew it was wrong but couldn't see how to get it right.
Working OK now but a second question - hwo do I create the <form ....
</form> without using document.write() which opens a new window? I
imagine it has to do with using a <SPAN element and
document.getElementById("myID").innerHTML but not clear how to do
it...


I have no idea what to make of the above, it all seems very confused.
There is a syntax error below, fixing that may help (or not...).

Some general tips:

- Manually wrap it at about 70 characters to stop automatic wrapping.
- Make sure code can be cut and pasted and works (or demonstrates the
failure) without futher effort.
- Block code properly so it is easy to read.

document.write("<form action ='http://website/path/formmail-nms.cgi'
method='post'>");
document.write("<input type ='hidden' name ='slidervalues' value='" +
str_questions + "'>");
document.write("<input type ='hidden' name ='recipient' value
='extraemails'>");
document.write("<input type ='submit' value='send'
onlick-'sendslidervalues'>");


The last line has a serious error with the onclick attribute, it makes
no sense at all. It seems to have a hyphen instead of an equals sign
and the value is the name of the form rather than script.

[...]
--
Rob
Sep 10 '05 #4

P: n/a
On Sun, 11 Sep 2005 00:13:33 +1000, RobG <rg***@iinet.net.auau> wrote:
Rob,

Sorry if not clear and re the error - I have removed that onclick
event anyway.

I have a set of slider values in an array which I want to pass on to
the formmail-nms.cgi script so that they can be emailed to me.

I assumed that the way to do this is to create a form and have a
hidden field which will do this.

In fact the code (below) I showed does work but the submit button
appears in a new window whereas I would like it to appear in the same
window ... so it just this element that I am not sure about - how to
get the submit button in the original window?

Cheers

Geoff

document.write("<form action ='http://website/path/formmail-nms.cgi'
method='post'>");
document.write("<input type ='hidden' name ='slidervalues' value='"
+ str_questions +"'>");
document.write("<input type ='hidden' name ='recipient' value
='extraemails'>");
document.write("<input type ='submit' value='send'>");
document.write("</form>");

Sep 10 '05 #5

P: n/a
Geoff Cox wrote:
On Sun, 11 Sep 2005 00:13:33 +1000, RobG <rg***@iinet.net.auau> wrote:
Rob,

Sorry if not clear and re the error - I have removed that onclick
event anyway.

I have a set of slider values in an array which I want to pass on to
the formmail-nms.cgi script so that they can be emailed to me.

I assumed that the way to do this is to create a form and have a
hidden field which will do this.

In fact the code (below) I showed does work but the submit button
appears in a new window whereas I would like it to appear in the same
window ... so it just this element that I am not sure about - how to
get the submit button in the original window?


I can't say why it appears in a new window. Try writing the whole thing
with a single document.write, or you could put all the HTML into a
single string, then write that, or put it into an array and join it and
write it.

document.write(
"<form action='http://website/path/formmail-nms.cgi' method='post'>",
"<input type='hidden' name ='slidervalues' value='",
str_questions,
"'>",
"<input type='hidden' name='recipient' value='extraemails'>",
"<input type='submit' value='send'>",
"</form>"
);

or

var htmlString =
"<form action='http://website/path/formmail-nms.cgi'"
+ " method='post'><input type='hidden' name ='slidervalues'"
+ " value='" + str_questions + "'>"
+ "<input type='hidden' name='recipient' value='extraemails'>"
+ "<input type='submit' value='send'></form>"
document.write( htmlString );

or

var htmlArray = [
"<form action='http://website/path/formmail-nms.cgi'",
" method='post'><input type='hidden' name ='slidervalues'",
" value='" + str_questions + "'>",
"<input type='hidden' name='recipient' value='extraemails'>",
"<input type='submit' value='send'></form>"
];
document.write( htmlArray.join() );

The last way is probably the fastest as it avoids concatentation. All
should be faster than multiple calls to document.write (though perhaps
not noticeably so in this case) - over to you.

[...]

--
Rob
Sep 10 '05 #6

P: n/a
Lee
Geoff Cox said:

On Sun, 11 Sep 2005 00:13:33 +1000, RobG <rg***@iinet.net.auau> wrote:
Rob,

Sorry if not clear and re the error - I have removed that onclick
event anyway.

I have a set of slider values in an array which I want to pass on to
the formmail-nms.cgi script so that they can be emailed to me.

I assumed that the way to do this is to create a form and have a
hidden field which will do this.

In fact the code (below) I showed does work but the submit button
appears in a new window whereas I would like it to appear in the same
window ... so it just this element that I am not sure about - how to
get the submit button in the original window?

Cheers

Geoff

document.write("<form action ='http://website/path/formmail-nms.cgi'
method='post'>");
document.write("<input type ='hidden' name ='slidervalues' value='"
+ str_questions +"'>");
document.write("<input type ='hidden' name ='recipient' value
='extraemails'>");
document.write("<input type ='submit' value='send'>");
document.write("</form>");

The first time you use document.write() after the page has
been displayed, you clear the current contents of the page
and begin writing a new one.

I don't believe you're getting a new window when you use
document.write(). You're really just getting a new page
in the same window, right? What makes you think that the
rest of the form fields, other than the submit button, are
appearing in the original page? They're hidden, after all.

It seems odd to me that you're trying to send a form that
contains only data that already exists in the page. Don't
you already know the contents of the str_question variable?
Are you actually trying to display the questions to the user,
and send the answers to the formmail script?

Sep 10 '05 #7

P: n/a
On Sun, 11 Sep 2005 01:46:24 +1000, RobG <rg***@iinet.net.au> wrote:

var htmlArray = [
"<form action='http://website/path/formmail-nms.cgi'",
" method='post'><input type='hidden' name ='slidervalues'",
" value='" + str_questions + "'>",
"<input type='hidden' name='recipient' value='extraemails'>",
"<input type='submit' value='send'></form>"
];
document.write( htmlArray.join() );

The last way is probably the fastest as it avoids concatentation. All
should be faster than multiple calls to document.write (though perhaps
not noticeably so in this case) - over to you.
Rob,

I have used your last suggestion above but I still get the submit
button appearing in a new window! Perhaps you can see why from the
whole code below? In fact also get 2 commas in front of the button?!

Cheers

Geoff

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<HEAD>

<link rel=stylesheet href="slider.css" type="text/css">
<SCRIPT SRC="slider.js"></SCRIPT>

<SCRIPT>

var mySlider1 = new Slider( "Slider1" );
var count = 0;
var slider_value = new Array(8);

mySlider1.leftValue = -10;
mySlider1.rightValue = 10;
mySlider1.defaultValue = 0;
mySlider1.offsetX = 1;
mySlider1.offsetY = 1;
mySlider1.buttonWidth = 10;
mySlider1.maxSlide = 288;

mySlider1.onchange
="document.getElementById('Slider1ValueText').inne rHTML
=''+this.getValue(0)";
var lhs_questions = new Array(8)
lhs_questions[0]="I would often be in this situation";
lhs_questions[1]="I would often talk to a group of friends";
lhs_questions[2]="I would not worry if I stuttered here";
lhs_questions[3]="If I were to stutter here I would know why";
lhs_questions[4]="I would stutter mildy here";
lhs_questions[5]="If I were to stutter here, my friends would not be
able to tell";
lhs_questions[6]="If I were to stutter here I would feel bad";
lhs_questions[7]="If I were to stutter here, my group of friends would
be understanding";

var rhs_questions = new Array(8)
rhs_questions[0]="I would hardly ever be in this situation";
rhs_questions[1]="I would hardly talk to a group of friends";
rhs_questions[2]="I would worry if I stuttered here";
rhs_questions[3]="If I were to stutter here I would not know why";
rhs_questions[4]="I would stutter severly here";
rhs_questions[5]="If I were to stutter here, my friends would be able
to tell";
rhs_questions[6]="If I were to stutter here I would feel good";
rhs_questions[7]="If I were to stutter here, my group of friends would
not be understanding";

function buildTable()
{

document.write("<center>");
document.write("<table border='0' width='100%'>");

document.write("<tr>");
document.write(" <td ID='lhs_question' width='30%' valign='top'
height='70'>" + this.lhs_questions[count] + "</td>");
document.write(" <td width='40%' align='center' valign='top'
height='70'>" + "<IMG SRC='sliderbg.gif' NAME='Slider1RailImg'
ID='Slider1RailImg'>" + "</td>");
document.write(" <td ID='rhs_question' width='30%' valign='top'
height='70'>" + this.rhs_questions[count] + "</td>");
document.write("</tr>");

document.write("<tr><td colspan='3' align='center' valign='top'
height='100'>");
document.write("<input type='button' name ='nextbutton' value='Next'
onclick='next_question(this)' />");
document.write("<SPAN class='invisible'
ID='Slider1ValueText'></SPAN>");
document.write("<SPAN ID='Status'></SPAN></td></tr>");

document.write("</table>");
document.write("</center>");
}

function next_question(button)
{
slider_value[count] = this.mySlider1.getValue(0);
this.count++;
if (this.count < 8)
{
document.getElementById('lhs_question').innerHTML =
this.lhs_questions[count];
document.getElementById('rhs_question').innerHTML =
this.rhs_questions[count];

mySlider1.setValue( (mySlider1.leftValue + mySlider1.rightValue) / 2
);

} else
{
if (button.parentNode &&
button.parentNode.removeChild) {
button.parentNode.removeChild(button);

}
saveIt();
}
}

function saveIt()
{
var str_questions = "";
for (var i=0; i < slider_value.length; i++)
{
str_questions += slider_value[i] + "\n";
}

document.getElementById("Slider1ValueText").innerH TML =
str_questions;

var htmlArray = [
"<form action='http://wwebsite/path/formmail-nms.cgi'",
" method='post'><input type='hidden' name ='slidervalues'",
" value='" + str_questions + "'>",
"<input type='hidden' name='recipient' value='extraemails'>",
"<input type='submit' value='send'></form>"
];

document.write( htmlArray.join() );

}

</script>
</HEAD>

<BODY onLoad="mySlider1.placeSlider()">

<h2 align="center">Social Group</h2>

<p align="center"><img src="pic3.jpg"></p>

<script language="javascript"
type="text/javascript">buildTable();</script>

<SCRIPT>

mySlider1.writeSlider();

</SCRIPT>

</body>
</html>






[...]


Sep 10 '05 #8

P: n/a
On 10 Sep 2005 08:59:32 -0700, Lee <RE**************@cox.net> wrote:
The first time you use document.write() after the page has
been displayed, you clear the current contents of the page
and begin writing a new one. I don't believe you're getting a new window when you use
document.write(). You're really just getting a new page
in the same window, right? What makes you think that the
rest of the form fields, other than the submit button, are
appearing in the original page? They're hidden, after all.
Lee,

Ah! You are quite correct - I should have been saying new page not
new window. Thanks for that.
It seems odd to me that you're trying to send a form that
contains only data that already exists in the page. Don't
you already know the contents of the str_question variable?
Are you actually trying to display the questions to the user,
and send the answers to the formmail script?


I do indeed know the contents of the str_question variable - I just
want to pass the contents to the formmail-nms.cgi script which will
send these values to me via email. Hence the wish to put these
contents into a hidden field in a form.

In actual fact I have script that works fine using prototype.js but am
trying to get this to work with a simple <form> as prototype.js seems
overkill for what I am trying to do...!

Cheers

Geoff
Sep 10 '05 #9

P: n/a
On Sun, 11 Sep 2005 01:46:24 +1000, RobG <rg***@iinet.net.au> wrote:

Apologies Rob - I should have been saying a new page not a new window
- this has just been pointed out to me by Lee. Stupid mistake.

Geoff
Sep 10 '05 #10

P: n/a
ASM
Geoff Cox wrote:

I have used your last suggestion above but I still get the submit
button appearing in a new window!
Isn't it because you forgot to display the div "Slider1ValueText"
somewhere on your page ? !

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> [...] <BODY onLoad="mySlider1.placeSlider()">

<h2 align="center">Social Group</h2>

<p align="center"><img src="pic3.jpg"></p>

<script language="javascript"
type="text/javascript">buildTable();</script>
<div id="Slider1ValueText"></div>
<SCRIPT>

mySlider1.writeSlider();

</SCRIPT>

</body>
</html>

--
Stephane Moriaux et son [moins] vieux Mac
Sep 10 '05 #11

P: n/a
On Sat, 10 Sep 2005 18:41:55 +0200, ASM
<st*********************@wanadoo.fr.invalid> wrote:
Geoff Cox wrote:

I have used your last suggestion above but I still get the submit
button appearing in a new window!


Isn't it because you forgot to display the div "Slider1ValueText"
somewhere on your page ? !


Stephane,

Too true!

The code below now works OK in that the send button appears on the
same page but

1. there are 2 commas in front of it - can you see where they come
from?

2. is it possible to have the form sent without the user having to
click on the send button?

Thanks

Geoff

function saveIt()
{

var str_questions = "";
for (var i=0; i < slider_value.length; i++)
{
str_questions += slider_value[i] + "\n";
}

document.getElementById("Slider1ValueText").innerH TML =
str_questions;

var htmlArray = [
"<form action='http://website/path/formmail-nms.cgi'",
" method='post'><input type='hidden' name ='slidervalues'",
" value='" + str_questions + "'>",
"<input type='hidden' name='recipient' value='extraemails'>",
"<input type='submit' value='send'></form>"
];

// document.write( htmlArray.join() );

document.getElementById("form").innerHTML = htmlArray.join();

}

</script>
</HEAD>

<BODY onLoad="mySlider1.placeSlider()">

<h2 align="center">Social Group</h2>

<p align="center"><img src="pic3.jpg"></p>

<script language="javascript"
type="text/javascript">buildTable();</script>

<div id="form"></div>

<SCRIPT>

mySlider1.writeSlider();

</SCRIPT>

</body>
</html>
Sep 10 '05 #12

P: n/a
ASM
Geoff Cox wrote:
On Sat, 10 Sep 2005 18:41:55 +0200, ASM
<st*********************@wanadoo.fr.invalid> wrote:
Isn't it because you forgot to display the div "Slider1ValueText"
somewhere on your page ? !
Too true!

The code below now works OK in that the send button appears on the
same page but

1. there are 2 commas in front of it - can you see where they come
from?


I've seen that and ... my little finger didn't tell it to my ear

Change your code ... ?
2. is it possible to have the form sent without the user having to
click on the send button?
of course !
function saveIt()
{

var str_questions = "";
for (var i=0; i < slider_value.length; i++)
{
str_questions += slider_value[i] + "\n";
}

document.getElementById("Slider1ValueText").innerH TML =
str_questions;
var htmlArray =
"<form action='http://website/path/formmail-nms.cgi'"+
" method='post'><input type='hidden' name ='slidervalues'"+
" value='" + escape(str_questions) + "'>"+
"<input type='hidden' name='recipient' value='extraemails'>"+
"<input type='submit' value='send'></form>";

document.getElementById("form").innerHTML = htmlArray;

var subForm = document.getElementById("form");
subForm = document.getElementsByTagName('FORM')[0];
subForm.submit();
}

</script>
</HEAD>

<BODY onLoad="mySlider1.placeSlider()">

<h2 align="center">Social Group</h2>

<p align="center"><img src="pic3.jpg"></p>

<script language="javascript"
type="text/javascript">buildTable();</script>

<div id="form"></div>

<SCRIPT>

mySlider1.writeSlider();

</SCRIPT>

</body>
</html>

--
Stephane Moriaux et son [moins] vieux Mac
Sep 10 '05 #13

P: n/a
ASM
ASM wrote:
function saveIt(){
var str_questions = "";
for (var i=0; i < slider_value.length; i++) {
str_questions += slider_value[i] + "\n";
}
document.getElementById("Slider1ValueText").innerH TML=str_questions;


var htmlArray =
"<form action='http://website/path/formmail-nms.cgi'"+
" method='post'><input type='hidden' name ='slidervalues'"+
" value='" + escape(str_questions) + "'>"+
"<input type='hidden' name='recipient' value='extraemails'>"+
"<input type='submit' value='send'></form>";

document.getElementById("form").innerHTML = htmlArray;


var subForm = document.getElementById("form");
subForm = subForm.getElementsByTagName('FORM')[0];
subForm.submit();
}

--
Stephane Moriaux et son [moins] vieux Mac
Sep 10 '05 #14

P: n/a

"Geoff Cox" <ge*******@notquitecorrectfreeuk.com> wrote in message
news:bq********************************@4ax.com...
On 10 Sep 2005 08:59:32 -0700, Lee <RE**************@cox.net> wrote:
The first time you use document.write() after the page has
been displayed, you clear the current contents of the page
and begin writing a new one.
I don't believe you're getting a new window when you use
document.write(). You're really just getting a new page
in the same window, right? What makes you think that the
rest of the form fields, other than the submit button, are
appearing in the original page? They're hidden, after all.


Lee,

Ah! You are quite correct - I should have been saying new page not
new window. Thanks for that.
It seems odd to me that you're trying to send a form that
contains only data that already exists in the page. Don't
you already know the contents of the str_question variable?
Are you actually trying to display the questions to the user,
and send the answers to the formmail script?


I do indeed know the contents of the str_question variable - I just
want to pass the contents to the formmail-nms.cgi script which will
send these values to me via email.


I dont get it !!! If you know the contents - why do you need it emailed to
you ??
Please start from the begining and tell me what you are trying to acheive.
Hence the wish to put these
contents into a hidden field in a form.

In actual fact I have script that works fine using prototype.js but am
trying to get this to work with a simple <form> as prototype.js seems
overkill for what I am trying to do...!

Cheers

Geoff

Sep 10 '05 #15

P: n/a
Geoff Cox wrote:
<snip>
1. there are 2 commas in front of it - can you see where
they come from?
<snip> // document.write( htmlArray.join() );

<snip>

The commas a caused by your not passing a string argument to the
Array's - join - method. The default string used by
Array.prototype.join - is ",", and the output is the same of the
Array's - toString - method. You should pass an empty string to the
Array's join method so that is the string inserted between non-undefined
array elements when - join - builds the string. E.G.:-

document.write( htmlArray.join('') );

Richard.
Sep 10 '05 #16

P: n/a
On Sat, 10 Sep 2005 21:31:04 GMT, "Zoe Brown"
<zo***********@N-O-S-P-A-A-Mtesco.net> wrote:
I dont get it !!! If you know the contents - why do you need it emailed to
you ??
Zoe,

I see what you mean! The questions are to be answered by other people
and their results are sent to me by email ... so although I know the
slider values at the moment, I will not know then later!

Cheers

Geoff

Please start from the begining and tell me what you are trying to acheive.
Hence the wish to put these
contents into a hidden field in a form.

In actual fact I have script that works fine using prototype.js but am
trying to get this to work with a simple <form> as prototype.js seems
overkill for what I am trying to do...!

Cheers

Geoff


Sep 10 '05 #17

P: n/a
On Sat, 10 Sep 2005 23:14:16 +0100, "Richard Cornford"
<Ri*****@litotes.demon.co.uk> wrote:
Geoff Cox wrote:
<snip>
1. there are 2 commas in front of it - can you see where
they come from?
<snip>
// document.write( htmlArray.join() );

<snip>

The commas a caused by your not passing a string argument to the
Array's - join - method. The default string used by
Array.prototype.join - is ",", and the output is the same of the
Array's - toString - method. You should pass an empty string to the
Array's join method so that is the string inserted between non-undefined
array elements when - join - builds the string. E.G.:-

document.write( htmlArray.join('') );


Thanks Richard - the ,, have gone.

Cheers

Geoff



Richard.


Sep 10 '05 #18

P: n/a
On Sat, 10 Sep 2005 20:18:24 +0200, ASM
<st*********************@wanadoo.fr.invalid> wrote:

var htmlArray =
"<form action='http://website/path/formmail-nms.cgi'"+
" method='post'><input type='hidden' name ='slidervalues'"+
" value='" + escape(str_questions) + "'>"+
"<input type='hidden' name='recipient' value='extraemails'>"+
"<input type='submit' value='send'></form>";

document.getElementById("form").innerHTML = htmlArray;

var subForm = document.getElementById("form");
subForm = document.getElementsByTagName('FORM')[0];
subForm.submit();


Stephanie,

That does the trick but could you explain how it works?!

Thanks

Geoff

Sep 10 '05 #19

P: n/a
My thanks to all for your help and patience !!

Cheers

Geoff
Sep 10 '05 #20

P: n/a
ASM
Geoff Cox wrote:
On Sat, 10 Sep 2005 20:18:24 +0200, ASM
<st*********************@wanadoo.fr.invalid> wrote:
var htmlArray =
"<form action='http://website/path/formmail-nms.cgi'"+
" method='post'><input type='hidden' name ='slidervalues'"+
" value='" + escape(str_questions) + "'>"+
"<input type='hidden' name='recipient' value='extraemails'>"+
"<input type='submit' value='send'></form>";

document.getElementById("form").innerHTML = htmlArray;

var subForm = document.getElementById("form");
subForm = document.getElementsByTagName('FORM')[0];
subForm.submit();

Stephanie,


Geoff,
it's Stephane, thanks
That does the trick but could you explain how it works?!


what don't you understand ?

'htmlArray' here is a variable and no more an array
its value is a string built with 2 others strings and your variable
'str_questions' created further above

example :
(I have to tronckate strings because
lines on a post are limited to 72 letters long)

var txt_1 = '<form action="http://website/path/formmail-nms.cgi" '+
'method="post"><input type="hidden" name="slidervalues" value="';
vr txt_2 = '"><input type="hidden" name="recipient"' +
' value="extraemails"><input type="submit" value="send"><\/form>';

var htmlArray = text_1 + escape(str_questions) +text_2;

escape() to get a traduction for url

then ...
document.getElementById("form").innerHTML = htmlArray;
you did understand

a shortcut for the div 'form'
var subForm = document.getElementById("form");

let's change this shortcut, now for the form inside precedent div 'form'
subForm = subForm.getElementsByTagName('FORM')[0];
(1st element of forms collection found in div 'form')

shortcut of our form now receives order to submit :
subForm.submit();
--
Stephane Moriaux et son [moins] vieux Mac
Sep 11 '05 #21

This discussion thread is closed

Replies have been disabled for this discussion.