Advertisement

08.29.2008 at 09:50AM PDT, ID: 23689426
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.1

Form copy javascript function goes undefined due to dynamic asp content

Asked by crosstf in JScript, Active Server Pages (ASP), Firefox Web Browser

Tags:

I have a free form copy javascript script which when you click a check box, copies the data from form fields to other form fields, specifically for billing info and shipping info.  I have included the javascript and the form item which calls the function in the code below. It works fine, except that this is an .asp/ vbscript page which dynamically loads shipping data from a sql database recordset. So the value of each of the shipping items might say something like <input type="text" name="fax" size="11" Value="<%= infax %>">. If I remove the asp recordset code, and the form reads the value as a string literal, the javascript works fine. So that rules out that I entered a variable incorrectly. But with the asp in place I get this error in Mozilla: ShipToBillPerson is not defined. Obviously I need to define these asp variables, but where and how?Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
<SCRIPT LANGUAGE="JavaScript">
 
var strShipFirst = "";
var strContactship = "";
var strshipEmail = "";
var strShipAddress1 = "";
var strShipAddress2 = "";
var strShipCity = "";
var strShipState = "";
var strShipPostalCode = "";
var strShipCountry= "";
var strShipPhone = "";
 
function InitSaveVariables(form) {
strShipFirst = form.strShipFirst.value;
ShipLast = form.strContactship.value;
ShipshipEmail = form.strshipEmail.value;
strShipAddress1 = form.strShipAddress1.value;
strShipAddress2 = form.strShipAddress2.value;
strShipCity = form.strShipCity.value;
strShipState = form.strShipState.value;
strShipPostalCode = form.strShipPostalCode.value;
ShipstrShipCountry = form.strShipCountry.value;
strShipPhone = form.strShipPhone.value;
}
 
function ShipToBillPerson(form) {
if (form.copy.checked) {
InitSaveVariables(form);
form.strShipFirst.value = form.strName.value;
form.strContactship.value = form.strContact.value;
form.strshipEmail.value = form.strEmail.value;
form.strShipAddress1.value = form.strAddress1.value;
form.strShipAddress2.value = form.strAddress2.value;
form.strShipCity.value = form.strCity.value;
form.strShipState.value = form.strState.value;
form.strShipPostalCode.value = form.strPostalCode.value;
form.strShipCountry.value = form.strCountry.value;
form.strShipPhone.value = form.strPhone.value;
}
else {
form.ShipFirst.value = strShipFirst;
form.ShipLast.value = strContactship;
form.ShipEmail.value = strshipEmail;
form.ShipAddress1.value = strShipAddress1;
form.ShipAddress2.value = strShipAddress2;
form.ShipCity.value = strShipCity;
form.ShipState.value = strShipState;
form.strShipPostalCode.value = strShipPostalCode; 
form.strShipCountry.value = strShipCountry;
form.strShipPhone.value = strShipPhone;
   }
}
 
</script>
 
 
 
<input type="checkbox" name="copy"
OnClick="javascript:ShipToBillPerson(this.form);" value="checkbox">
[+][-]08.29.2008 at 03:18PM PDT, ID: 22349676

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]08.29.2008 at 04:22PM PDT, ID: 22349859

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.29.2008 at 06:47PM PDT, ID: 22350222

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]08.30.2008 at 04:32PM PDT, ID: 22353558

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.30.2008 at 04:43PM PDT, ID: 22353587

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.31.2008 at 09:46PM PDT, ID: 22357551

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: JScript, Active Server Pages (ASP), Firefox Web Browser
Tags: Javascript, ASP w/ VBScript
Sign Up Now!
Solution Provided By: b0lsc0tt
Participating Experts: 2
Solution Grade: A
 
 
[+][-]08.31.2008 at 09:49PM PDT, ID: 22357559

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]09.03.2008 at 09:52AM PDT, ID: 22379191

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628