Forms: Data Passing

Posted on 2006-04-23
Last Modified: 2010-04-09
Hi Guys,

I need to pass a set of data to be passed to a page "getmapprocess.asp" situated on the customer site using form. Is there any way that I can pass this automatically once our page being load instead of having to click submit button everytime? Below is the sample code given by my customer:-

<form name=frm method=post action="">
        Transaction_ID:<input name=Transaction_ID value="10001" ><br>
        Userid:<input name=Userid value="testuserid" ><br>
        Request_ID:<input name=Request_ID value="20002" ><br>
        Latitude:<input name=Latitude value="123.456789" ><br>
        Longitude:<input name=Longitude value="234.567890" ><br>
        First_RequestID:<input name=First_RequestID value="1" ><br>
        Other_Request:<input name=Other_Request value="0" ><br>
        Transaction_Time:<input name=Transaction_Time value="2006-04-20 10:20:36.850"><br>
        <INPUT type=submit value=Submit>

Appreciate your help here. Thanks a lot.
Question by:rs-250
    LVL 18

    Expert Comment

    Somthing like this would do it:

    <FORM NAME="frm">

    <SCRIPT LANGUAGE="JavaScript"><!--

    Obviously you can play around with the value.

    Author Comment

    How about this then?

    <BODY onLoad="updatequery.submit()">
      <img src="gif\globe.gif" height="40" width="40" align="middle">
      <form name="updatequery" method="post" action="">
         <input name="userid" value="#userid#" type="hidden">
          <input name="request_id" value="#requestid#" type="hidden">
          <input name="latitude" value="#latitude#" type="hidden">
          <input name="longitude" value="#longitude#" type="hidden">
          <input name="first_requestid" value="#FirstRequest#" type="hidden">
          <input name="other_request" value="#OtherRequest#" type="hidden">
          <input name="transaction_time" value="#CreateODBCDateTime(Now())#" type="hidden">
    LVL 28

    Expert Comment

    Since you are using ASP pages, you can set session variable. This way you can just set the session variables and then Response.Redirect(somewhere.asp).

    Author Comment


    On my side, we're using CFM while the client on ASP
    LVL 28

    Accepted Solution

    You can use query strings, but they can be hacked somewhat. The best option would probably be the javascript submit.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    "I want to put my photos online, but I don't want them stolen.  What settings should I use?" When You Put Photos Online First and foremost, any digital file published on the WWW can be copied, stored, modified, retransmitted, etc.  Remember Naps…
    Both Easy and Powerful How easy is PHP? (  Very easy.  It has been described as "a programming language even my grandmother can use." How powerful is PHP?  http://en.wikiped…
    HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
    The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

    759 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

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now