Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Remote Scripting - refresh updated values

Status
Not open for further replies.

MikeCole

Programmer
Jul 6, 2000
4
US
I am calling two javascripts to perform a validation on whether inputted form values exist as a table entry.

FORM:

OnClick = "chk1(this.form); chk2(this.form);"

The refresh problem occurs where I updated a this.form hidden field in the first javascript (chk1) and unsuccessful trying to make reference to the updated value in the second javascript (chk2).

For some strange reason, the updated value is only refreshed when I put in an 'alert' message. I have tested and proved that by putting in 2 consecutive 'alert' messages.


You may find it strange that I am using two separate javascripts to do this validation. This is why.

I am using remote scripting to pass inputted values from javascript (chk1) to an asp page (chktbl). The asp page is openned using "window.open(url + query strings)" command.
It executes SQL statements with query string values passed to check whether entry exists in SQL table. It updates the a form value using "opener.document.form.field.value" command.

The 2nd javascript makes reference to the updated value and pops up alert message only if error is found.

I try using <% Response.Expires=0 %> and still does work.
Have anyone encounter similar problem and have a good solution or alternatives ?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top