` Pre-populating HTML form from client side (Jtdunn01740@attbi.com (john Dunn)) - Icetips Article
Icetips - Templates, Tools & Utilities for Clarion Developers

Templates, Tools and Utilities
for Clarion Developers

Icetips Article

Back to article list   Search Articles     Add Comment     Printer friendly     Direct link  

Clarion in general: Pre-populating HTML form from client side
2003-02-02 -- Jtdunn01740@attbi.com (john Dunn)
 
Newsgroups: softvelocity.products.c55ee >I have a ASP that displays an order form for the user to fill out. >Currently it is mainly static (except for a server side include). The >user gets to it by clicking a Buy link on my web site. > >I would like to have a my Clarion program that is running on the >user's PC be able to do ShellExecute to start the default web browser >(over 90% of my visitors are using Internet Explorer), navigate to >this asp page, and prefill some of the fields on the form with >information that the Clarion program already has (like name, address, >which licenses they want to buy, etc.). > >I have the following constraints (with good reasons): > > - No cookies > - None of the information can come from a database on the web server > - Must work with user's primary web browser (typically Internet Explorer) > - ASP page must be able to handle navigation from within the web site > (form initializes with blank fields) as well as defaults being supplied > from client PC (form initializes with some fields pre-filled). > - May need to pass more data than can fit in a single URL > >One idea is for the Clarion program to create a dummy html file on the >PC which contains a form with hidden fields set to the values I want >to send to the ASP file on the web server (which will display those >values in the real form). But I'm stuck at how I would get the web >browser to automatically submit the dummy form without requiring the >user to click a submit button. This may not be exactly what you need but here is some code that I use to populate a tracking number on a web page: !---------------------------------------------------------! TrackPackage ROUTINE WebBrowser = CREATE(0,CREATE:OLE) WebBrowser{PROP:Create} = 'InternetExplorer.Application' WebBrowser{'Visible'} = True UrlString = 'http://www.your_url/your.html' WebBrowser{'Navigate(' & CLIP(UrlString) & ')'} ! Waiting until page loaded StartTime = CLOCK() LOOP IF WebBrowser{'ReadyState'} = 4 THEN BREAK. IF CLOCK() - StartTime > 1000 THEN BREAK. ! 10 seconds YIELD() END ! loop ! Fill fields WebBrowser{'Document.forms("SearchForm").SearchField.Value'} = CLIP(Pkg:TrackingNo) !---------------------------------------------------------! John


Today is April 23, 2024, 5:38 am
This article has been viewed 35115 times.
Google search has resulted in 289 hits on this article since January 25, 2004.



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: