I've used the gateway numerous times and I really like it a lot. I
don't have any code where I return back to the same page. Usually I
return to a menu that leads into the page using the gateway.
I can't think of any reason why it wouldn't work the second time. By
the way I have found Firefox's _javascript_ console to be immensely
useful in debugging my gateway code.
Did you think of using cflocation to force the reinitialization of the
page? There might be a way to reload the gateway in the code, but the
best bet would be to ask Dan.
Couple of years ago he drove five hours one way to speak at our user
group about QForms. He did succeed in getting 75% of us to adopt it
though :>)! We all owe him a huge debt of thanks.
Rick Mason
----- Original Message -----
From: Dan O'Keefe <[EMAIL PROTECTED]>
Date: Wed, 22 Sep 2004 11:16:39 -0400
Subject: Re: OT: JS Gateway Question
To: CF-Talk <[EMAIL PROTECTED]>
Hi Mike,
Did you check with Dan Switzer? Does he have a yahoo group for the
gateway as he does for qForms?
Dan
----- Original Message -----
From: Tangorre, Michael <[EMAIL PROTECTED]>
Date: Tue, 21 Sep 2004 17:31:37 -0400
Subject: OT: JS Gateway Question
To: CF-Talk <[EMAIL PROTECTED]>
I am still in search of a solution to a problem I had a few weeks back.
This is OT for the CF list, but I am hoping someone here has used the JS
Gateway from www.pengoworks.com.
I have a form with a bunch of select boxes on it that I use qForms to
populate, etc (from a DB.. use ColdFusion to loop etc...). I also use
the JS Gateway for two of the select boxes; lets call them "A" and "B".
When the page initially loads everything works fine.. "A" populates fine
and when a user selects something in "A", "B" populates fine (using
Gateway). The issue I have is that when the user comes back into the
form after saving the form, how can I get "A" and "B" populated since
they rely on the Gateway for initial population as well as obtaining the
values for "B" from "A"?
I have tried everything from setting the value for the "A" select after
the loadOptions() method loads the options etc, but I keep finding
myself in this infinite loop or getting out of memory errors etc. Do you
know how I could accomplish getting "A" populated and set with the value
from the DB then get "B" set based on "A", finally setting the value of
"B" set with the value from that comes from the DB (if there is one of
course). I have come back to this problem many times, always failing to
find a solution.
Anyone using the Gateway and have some suggestions? In case it helps,
the following are the Gateway functions that are used:
Thanks!
-Mike
// Gateway Init() function
function init(){
objGateway.> document.basicDataForm.strAgency.length = 1;
document.basicDataForm.strBureau.length = 1;
loadOptions("strAgency");
}
// Gateway populate() function
function populate(f, a){
var oField = document.basicDataForm[f];
oField.options.length = 0;
for( var i=0; i < a.length; i++ ) oField.options[oField.options.length]
= new Option(a[i][0], a[i][1]);
}
// Gateway loadOptions() function
function loadOptions(f){
var d = {}, oForm = document.basicDataForm;
if( f == "strAgency" ){
document.basicDataForm.strAgency.length = 1;
}
var sAgency =
oForm.strAgency.options[oForm.strAgency.options.selectedIndex].value;
displayLoadMsg(f);
objGateway.sendPacket({field: f, strAgency: sAgency});
}
// Gateway updateOptins() function
function updateOptions(){
if( this.received == null ) return false;
populate(this.received[0], this.received[1]);
return true;
}
// Gatewaye displayLoadMsg() function
function displayLoadMsg(f){
var oField = document.basicDataForm[f];
oField.options.length = 0;
oField.options[oField.options.length] = new Option("Loading data...",
"");
}
// Create the gateway object
objGateway.create();
// Initialize the gateway object
init();________________________________________________________________
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

