[RESOLVED] Flying around d Web - Post action coding
Hi members / gurus
Just got into the learning curve of numerous web coding and is really STRUGGLING. Thank God, my associates here have moved on much earlier and have VB6 also to deal with these matters here. So here i go..
Frequently we have form that starts off with lines such as
<form name="DataFrm1" method="post" action="index.php" onsubmit="Frm1_validation()">
or
<p><iframe style="display: none;" name="hidden_iframe" width="320" height="240"></iframe></p>
<form id="DataFrm2" action="https://webxxx.com/folder/###222###/formResponse" method="post" onsubmit="submitted=true;" target="hidden_iframe">
Questions based on the above 2 snippets:
1 Where do i find the Frm1_validation() in the website folder; i presume this is a function
2 What's the difference between form id & form name
3 Is formResponse a php or html file in the folder?
4 Is the numbers ###222### the encrypt codes for the method post to work?
Pardon me if my questions are over the place. Do teach :wave:
Re: Flying around d Web - Post action coding
Quote:
1 Where do i find the Frm1_validation() in the website folder; i presume this is a function
It's function call. Probably you should look at the Javascript codes in that page or any linked JS files.
Quote:
2 What's the difference between form id & form name
ID is unique name given to an element. In a page, there should be only one element with a particular name. Means, it should be unique. Whereas, the class names which can also be used in any elements, don't need to be unique! Form name is just a name given to the form. It is not mandatory to give the form a name unless you need it somewhere else, say for a client side validation code, etc. Form names are not submitted to the page, when the form is submitted.
Quote:
3 Is formResponse a php or html file in the folder?
It could be a PHP file. Because the user is filling a form and submitting it to a page. So, at the server, this client submitted data needs to be done something. Say, saving it to a database or doing some calculations or whatever. A HTML file might not be able to do these things. So, probably a PHP(or JSP/ASP, etc) file.
formResponse might not be a folder. Say, if mod_rewrite is enabled with rewriting rules, then that link might be redirected to some other actual page.
Quote:
4 Is the numbers ###222### the encrypt codes for the method post to work?
That can be many things. Say,
- a script generated session id
- user id
- folder id
- etc.
:wave:
Re: Flying around d Web - Post action coding
Thank you brother from Kerala. Much appreciate the effort and the superb & clear English. Will chew on it to digest. :o
Re: Flying around d Web - Post action coding
Quote:
Originally Posted by
FuzMic
Thank you brother from Kerala. Much appreciate the effort and the superb & clear English. Will chew on it to digest. :o
You're welcome... :wave:
I'm not good in English! Don't make fun of me like you did now. :p
Re: Flying around d Web - Post action coding
No no no, you did make careful effort to write, so it is sincerely good. Till we meet again. Kind Regards.