Solved

Automatic posting (cold fusion?)

Posted on 1998-08-06
7
339 Views
Last Modified: 2013-12-25
is there any way to get a page to automaticly post to a database (like for a hit counter) some thing along the line
of <form action="guest.cfm" method="POST"><input type="hidden" name="Date_Entered" value="CurrentDateTime()"><input type="hidden" name="ClientHost" value="CGI.REMOTE_HOST">
0
Comment
Question by:jagoodie
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 75

Accepted Solution

by:
Michel Plungjan earned 100 total points
ID: 1858869
<form NAME="AUTOPOST" action="guest.cfm" method="POST"><input type="hidden" name="Date_Entered"
    value="CurrentDateTime()"><input type="hidden" name="ClientHost" value="CGI.REMOTE_HOST">

<SCRIPT LANGUAGE="JavaScript">
document.AUTOPOST.submit();
</SCRIPT>

If you wish the post not to change the current page, either put the form inside frames with an invisible frame and put a TARGET="HIDDENFRAME" on the form tag
or print a 304 Nothing Changed http header from the cgi...

Michel
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 1858870
PS: if you wish the date to be filled out for you, remove CurrentDateTime() and change the script to read
<SCRIPT LANGUAGE="JavaScript">
    var today = new Date();
    document.AUTOPOST.Date_Entered.value = today.toString();
    document.AUTOPOST.submit();
</SCRIPT>
0
 
LVL 2

Author Comment

by:jagoodie
ID: 1858871
What do you meant about the TARGET="HIDDENFRAME" on the form tag
where do i put it? how does it work?
0
Report: Liquid Web beats Amazon, Rackspace & More

A study by performance analyst firm Cloud Spectator finds that Liquid Web beats rivals Amazon, Rackspace and DigitalOcean when it comes to website and cloud application performance.

 
LVL 2

Author Comment

by:jagoodie
ID: 1858872
i got it to work but it keeps opening up a new fram for the page. is there a way to get it to not open the frame?
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 1858873
Sorry, I was away all day yesterday...
To target a hidden frame, create the following HTML:
<HTML>
<HEAD>
<TITLE>My title</TITLE>
</HEAD>
<FRAMESET ROWS="100%,*">
<FRAME NAME="VISIBLEFRAME" SRC="OriginalPageWithTheFormInIt.html">
<FRAME NAME="HIDDENFRAME" SRC="javascript:' '">
</FRAMESET>
</HTML>

This will create a frame which is 100% of the screen and another which is the rest (e.g. not there). The javascript:' ' is to initialise it with an empty page.

Hope this helps,

Michel
0
 
LVL 2

Author Comment

by:jagoodie
ID: 1858874
I am sorry, i am not very good with this frames thing. Now where do i put the javascript part? in the page named javascript: ?
thank you for your continued help. :)
0
 
LVL 2

Author Comment

by:jagoodie
ID: 1858875
sorry, nevermind, i got it. (put it in the OriginalPageWithTheFormInIt.html>
thanks again.
0

Featured Post

Business Impact of IT Communications

What are the business impacts of how well businesses communicate during an IT incident? Targeting, speed, and transparency all matter. Find out more in this infographic.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Any business that wants to seriously grow needs to keep the needs and desires of an international audience of their websites in mind. Making a website friendly to international users isn’t prohibitively expensive and can provide an incredible return…
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question