Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    New Coder
    Join Date
    Aug 2002
    Location
    Canada
    Posts
    94
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Submit button information

    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
    Last edited by jrmevans; 08-26-2002 at 07:34 AM.

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    UK
    Posts
    1,137
    Thanks
    0
    Thanked 0 Times in 0 Posts
    i have some code which maybe of use to you. I used it when developing one of my web aplications.

    Code:
    <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:
    Code:
    <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
    Spammers next time you spam me consider the implications:
    (1) that you will be persuaded by me(in a legitimate mannor)
    (2)It is worthless to you, when i have finished

  • #3
    New Coder
    Join Date
    Aug 2002
    Location
    Canada
    Posts
    94
    Thanks
    0
    Thanked 0 Times in 0 Posts

    thanks, i will try this out.

    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

  • #4
    New Coder
    Join Date
    Aug 2002
    Location
    Canada
    Posts
    94
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Nope sorry, didn't work

    I tried editing the string, and it still donesn't post to the text area.


    So the search goes on.....

    James

  • #5
    Regular Coder
    Join Date
    Jun 2002
    Posts
    166
    Thanks
    0
    Thanked 0 Times in 0 Posts
    <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

  • #6
    New Coder
    Join Date
    Aug 2002
    Location
    Canada
    Posts
    94
    Thanks
    0
    Thanked 0 Times in 0 Posts

    please read the update above

    I have updated the original post. so read above...

    thanks ..

    James

  • #7
    Regular Coder
    Join Date
    Jun 2002
    Posts
    166
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Change the 'submit' to 'button' - as follows:


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

  • #8
    New Coder
    Join Date
    Aug 2002
    Location
    Canada
    Posts
    94
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thank you Paulette

    That worked. thank you very much.

    James


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •