Link to home
Start Free TrialLog in
Avatar of jagoodie
jagoodie

asked on

Automatic posting (cold fusion?)

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">
ASKER CERTIFIED SOLUTION
Avatar of Michel Plungjan
Michel Plungjan
Flag of Denmark image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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>
Avatar of jagoodie
jagoodie

ASKER

What do you meant about the TARGET="HIDDENFRAME" on the form tag
where do i put it? how does it work?
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?
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
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. :)
sorry, nevermind, i got it. (put it in the OriginalPageWithTheFormInIt.html>
thanks again.