HTML Tutorial


 Forum HomeForum Home   FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
RegisterRegister - Not registered yet? Got something to say? Join HTML Code Tutorial!
html post itself
Post new topic   Reply to topic    HTML Help Forum Index -> HTML Form
View previous topic :: View next topic  
Author Message
pesty



Joined: 22 Jul 2004
Posts: 28

PostPosted: Thu Jul 22, 2004 1:50 pm     html post itself Reply with quote

Hi everyone?

What is the code to make html post itself? I had found it on a website once and thought I saved it. It caught my attention because none of my text books has it in it.

It was very similar to the php server post $_SERVER[PHP_SELF] except that one was for html.

I want the form action to read itself. Does anyone know this code?

Thanks for your help

Pesty Laughing
T1



Joined: 27 May 2004
Posts: 18
Location: Belgium

PostPosted: Sat Jul 24, 2004 2:23 pm     Re: html post itself Reply with quote

Hi,

I haved tested this but i think you have to use javascript.

You put the script in the onload="yourscript" of the body tag.

The script contains the following.

Code:

function yourscript(form)
{
   form.method="post";
   form.target="_self";
   form.action="youraction.php";
   form.submit();
}
}


Hope this helps.. keep me posted.
pesty



Joined: 22 Jul 2004
Posts: 28

PostPosted: Sun Jul 25, 2004 12:26 am     Reply with quote

Hey T1,

Thanks for answering. I'll give this function a try. I agree with you it is a javascript func.

The code I'm looking for sets in the form tag itself as the action. Sure wish I knew what site I was on.

Anyway, I'll use your posted code if you don't mind so I can get my site going.

Thank you!
Pesty
Display posts from previous:   
Post new topic   Reply to topic    HTML Help Forum Index -> HTML Form All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
HTML Help Archive
Powered by phpBB © 2001, 2005 phpBB Group
 
HOSTING / DESIGN
MAKE MONEY

Home
  |   Tutorials   |   Forum   |   Quick List   |   About
Copyright ©1997-2002 Idocs and ©2002-2007 HTML Code Tutorial