...

View Full Version : Submit button information



jrmevans
08-24-2002, 05:16 AM
I have been trying to figure something out, and haven't found an awswer to what I am looking for ....


This is a template that I use at work, what i am trying to get it to do, is when i enter the name in the name field and click submit I want it to populate over to the text area box in front of the "* is caller" line. I have the basic submit code

<input type="submit" align="left" value="submit" onclick="form.textarea.value="faqform.customername.form(this.form)"/>;

but it doesn't want to populate to were i want it to go, and just opens up another window, which i don't want it to do.

If anyone can give me some information I would appreciate it.

Thank
James


*****UPDATE********

I have figured out the script for this for the most part, the problem that now occurs is that when i click on submit/enter, it populates to the text area, but refreshs right away to a new screen.... and i have searched everywhere on how to solve this one. If anyone would like to look at what i have done so far you can go to this link, the choose the view>source option... that way I don't have to post the long script here...

This is the link to the template that i have...

http://members.shaw.ca/jrmevans/Template/testctt.html

If anyone can help me I would appreciate it.....

James

scroots
08-24-2002, 09:44 AM
i have some code which maybe of use to you. I used it when developing one of my web aplications.



<script language="javascript">
function moo(){
document.form.tot.value=document.form.DT.value
}
</script>
<input type="button" onClick="moo()" value="Calculate">

Is that of any use to you?

or you could use your own code and remove the slash, you posted:
<input type="submit" align="left" value="submit" onclick="form.textarea.value="faqform.customername.form(this.form)"/>;

which should be if i am correct, you need to remove the slash i have put in bold, so it becomes:



<input type="submit" align="left" value="submit" onclick="form.textarea.value="faqform.customername.form(this.form)">;

and why the semicolon at the end?

scroots
scroots

jrmevans
08-24-2002, 05:02 PM
I will try you suggestions out... see if it and let you know... but the coding seems to make sense to me so far.

Thanks again

jrmevans
08-24-2002, 10:27 PM
I tried editing the string, and it still donesn't post to the text area.


So the search goes on.....

James

PauletteB
08-25-2002, 12:32 AM
<script language="JavaScript1.2" fptype="dynamicanimation" src="file:///D:/Program%20Files/Microsoft%20Office/Office10/fpclass/animate.js">

Not the proper url.

<input type="submit" align="left" value="submit" onclick="form.textarea.value="faqform.customername.form(this.form)"/>;
One Quote too much

This should work, though not the proper terminology.
<input type="button" align="left" value="submit"
onclick="form.textarea.value=document.faqform.customername.value">

Don't know if that helps, but maybe a bit closer anyhow...

PauletteB

jrmevans
08-26-2002, 06:36 AM
I have updated the original post. so read above...

thanks ..

James

PauletteB
08-26-2002, 06:07 PM
Change the 'submit' to 'button' - as follows:


<input type="button" align="left" value="submit" onclick="javascript:showNOTES(this.form);" name="submit"></tr>

jrmevans
08-26-2002, 11:09 PM
That worked. thank you very much.

James



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum