Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Automatic posting (cold fusion?)

Posted on 1998-08-06
7
Medium Priority
?
346 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 400 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Australian government abolished Visa 457 earlier this April and this article describes how this decision might affect Australian IT scene and IT experts.
When the s#!t hits the fan, you don’t have time to look up who’s on call, draft emails, call collaborators, or send text messages. An instant chat window is definitely the way to go, especially one like HipChat. HipChat is a true business app. An…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses

597 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