LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-02-2015, 01:43 PM   #1
linux_walt
Member
 
Registered: Dec 2014
Location: Houston, TX
Distribution: Debian wheezy
Posts: 127

Rep: Reputation: 29
HTML Form action: post to self


Hello, I have been reading up on what happens when a form's action is set to 'self'. As I understand it, after hitting the 'submit' button, the form's information is sent back to the server, along with the 'action' information, which in this case would be 'pass on the form information to the same page that contains the form'.

What I'm not clear about is what happens next.

Does the server send a fresh copy of the html page that contains the form, along with the submitted form information?

Does the server send back only the form's information, and the browser refreshes the page locally, attaching to it the form's information sent to it by the server?

Does the browser know that the form is posting to the same web page, and not send anything to the server, just reloads the page, making the form's new data available?

Thanks!

Last edited by linux_walt; 03-02-2015 at 02:23 PM.
 
Old 03-02-2015, 03:01 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,760

Rep: Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931
The web page is actually a script or CGI program. When you press the submit button the script is called with arguments similar to running a bash script in a console i.e myscript arg1 arg2 etc. It would then parse the arguments i.e form data, do what ever it is supposed to do and then create the web page to display some sort of results. The browser expects a new page. The content is created dynamically by the server.

http://en.wikipedia.org/wiki/Server-side_scripting

I assume that the web page does not contain any JavaScript.
http://en.wikipedia.org/wiki/Client-side_scripting
 
1 members found this post helpful.
Old 03-02-2015, 04:42 PM   #3
linux_walt
Member
 
Registered: Dec 2014
Location: Houston, TX
Distribution: Debian wheezy
Posts: 127

Original Poster
Rep: Reputation: 29
Thanks Michael. So after hitting the 'submit' button I am looking at a new page from the server. For some reason this is not made very explicit in how-to's regarding this topic.

I have a small amount of java code in the page, but it's only to detect if the user has changed the selection in a drop down selector.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
HTML form action not passing content to PHP file Dafydd Programming 3 12-22-2013 01:41 AM
html: submitting form data as GET parameters instead of POST? stateless Programming 7 02-15-2013 01:17 PM
[SOLVED] HTML POST form gets 403 with certain characters in input Snark1994 Programming 4 05-30-2012 11:35 AM
PHP:Unable to post variables from html form to mysql database vikram_cvk Linux - Software 1 09-29-2004 03:01 PM
PHP and HTML Form Post Savahn Programming 12 06-30-2004 03:15 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:47 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration