Query_String problem, due to refresh

Hi,

I was succefully passing the input values from one form to another form using “Query_String”, this success due to this forum only.

Now I am facing little bit problem. Actually I am passing three values empid, month, and year to other form. Then from query_string, I am extracting these three values to another 3 text fields (hidden fields). Using these 3 fields, I am sending these three to the other database, and getting dates into $list field.

Now what I am doing that I am selecting one date from the $list field, and then sending to the other datbase, to fetch some related values.

Here is the main problem, once I send the date value to the other database, I am getting the values, but due to refreshing , the dates are not displaying in $list field. But I want to send one by one dates, to get the values.

For this please give ur suggestion. Waiting with tensionious.

Rajan

Subject: Query_String problem, due to refresh

If I understand you, it sounds like when you initially open form2, you are able to extract the values from the query_string. But when you click on some field (a drop down list perhaps) to fetch additional data based on the query_string values passed, the act of refreshing wipes out the previous query_string values and causes subsequent lookups to fail. Do I understand the problem correctly?

Steve

Subject: RE: Query_String problem, due to refresh

Ys Cannon, that is my problem. U got my point. Pls give ur valuable suggestion

Subject: RE: Query_String problem, due to refresh

Okay. Basically what you want to do is intercept the refresh. Instead of setting your keyword field to refresh fields on keyword change, you call a function in the onChange event. Let’s call the function doRefresh().

The doRefresh() function will take your query_string variables and append them to the URL and then call the _doClick function which will do your refresh for you, but still preserve the original variables.

In pseudo code, it would look something like this:

doRefresh(){

var f = document.forms[0];

var empID = f.somefield.value;

var mon = f.someotherfield.value

var params = “”;

params += “&EMPID=” + empID + “&MONTH=” + mon;

_doClick(‘$Refresh’, this, ‘_self’, params);

}

HTH

Steve