Web Analytics Made Easy -
StatCounter Initializing the submit action - CodingForum

Announcement

Collapse
No announcement yet.

Initializing the submit action

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Initializing the submit action

    Hi!

    Can anybody tell me how can I use javascript function to process the form - so that a person does not need to click on the submit button?

    Thanks,
    Bostjan

  • #2
    I dont understand what you mean with "process the form".But you can submit the form using the .submit() function.
    Btw,the user can also submit the form by pressing ENTER.

    Comment


    • #3
      Re

      BY "process the form" I mean to initialize the action, defined in the form tag. I know that one can use Enter instead of SUbmit button, but in my case it doesn't help. This is why:

      All the information on the page "one.asp" are stored in the database, when the user submits the information to page "two.asp".
      The problem is that in some cases, user can click on a link that opens a new window - there he can change some parameters that change the content of "one.asp" - so in order to show that changes, the page "one.asp" must be reloaded.
      But I don't want to simply reload the page, because all the unsaved information would be lost. Instead I want to submit the data automatically and then reload the page.

      You mentioned the submit() function. Where could I learn more about its syntax etc.


      Thanks,
      Bostjan

      Comment


      • #4
        This will submit the form:

        function submitForm()
        {
        document.YourFormsName.submit();
        }

        Comment


        • #5
          I am having the same problem as this person.i need to process the form in a pop up window.and save it.but i could not use a submit button.how can i process it using asp?
          Thanks for all of you for helping.God bless you~

          Comment

          Working...
          X