Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Script Keeper?

Reply
Thread Tools

Script Keeper?

 
 
Rich
Guest
Posts: n/a
 
      04-07-2005
I have a project that I would Greatly Appreciate some direction.

My goal is to create a "Sales Assistant Script" that recommends products
based upon Response's to questions.

I know enough JavaScript to successfully create a "JavaScript Error" 2 out
of 3 times! <Grin>

The books I have read are great in regards to understanding what the code is
doing, but in my novice opinion don't teach me the "when to use what"
examples. Maybe that comes with experience.

I'm "guessing" that I will need to have a set of lets say 12 questions. I
will group these questions in groups of 4. If the User selects a
combination of questions, then my script will recommend the user purchase
certain products.

So what I need to know is how do you assign or group the selection of
buttons or check marks, to specific product recommendations?

I'm looking for the Simplist way of getting this done.

What do I need to do ?

Thanks,
Richard
txknapper at hotmail.com


 
Reply With Quote
 
 
 
 
Martin!
Guest
Posts: n/a
 
      04-07-2005
Rich wrote:

> I have a project that I would Greatly Appreciate some direction.
>
> My goal is to create a "Sales Assistant Script" that recommends products
> based upon Response's to questions.
>
> I know enough JavaScript to successfully create a "JavaScript Error" 2 out
> of 3 times! <Grin>
>
> The books I have read are great in regards to understanding what the code is
> doing, but in my novice opinion don't teach me the "when to use what"
> examples. Maybe that comes with experience.
>
> I'm "guessing" that I will need to have a set of lets say 12 questions. I
> will group these questions in groups of 4. If the User selects a
> combination of questions, then my script will recommend the user purchase
> certain products.
>
> So what I need to know is how do you assign or group the selection of
> buttons or check marks, to specific product recommendations?
>
> I'm looking for the Simplist way of getting this done.
>
> What do I need to do ?
>
> Thanks,
> Richard
> txknapper at hotmail.com
>
>



sounds like you combine the answers to an sql query ansA && ansB &&
ansC && ansD

gives you also a hint on how to order your questions

my 2 cent

gl
martin
 
Reply With Quote
 
 
 
 
Martin!
Guest
Posts: n/a
 
      04-07-2005
Martin! wrote:

> Rich wrote:
>
>> I have a project that I would Greatly Appreciate some direction.
>>
>> My goal is to create a "Sales Assistant Script" that recommends
>> products based upon Response's to questions.
>>
>> I know enough JavaScript to successfully create a "JavaScript Error" 2
>> out of 3 times! <Grin>
>>
>> The books I have read are great in regards to understanding what the
>> code is doing, but in my novice opinion don't teach me the "when to
>> use what" examples. Maybe that comes with experience.
>>
>> I'm "guessing" that I will need to have a set of lets say 12
>> questions. I will group these questions in groups of 4. If the User
>> selects a combination of questions, then my script will recommend the
>> user purchase certain products.
>>
>> So what I need to know is how do you assign or group the selection of
>> buttons or check marks, to specific product recommendations?
>>
>> I'm looking for the Simplist way of getting this done.
>>
>> What do I need to do ?
>>
>> Thanks,
>> Richard
>> txknapper at hotmail.com
>>
>>

>
>
> sounds like you combine the answers to an sql query ansA && ansB && ansC
> && ansD
>
> gives you also a hint on how to order your questions
>
> my 2 cent
>
> gl
> martin



ps .. would do this in php rather than javascript
 
Reply With Quote
 
Rich
Guest
Posts: n/a
 
      04-07-2005
Thanks for the info.

Fortunately or unfortunately I'm taking a JavaScript class and I have to
write this in JavaScript.

Any JavaScript help would be appreciated.
Thanks again.
"Martin!" <> wrote in message
news:d33ba1$4hr$...
> Martin! wrote:
>
>> Rich wrote:
>>
>>> I have a project that I would Greatly Appreciate some direction.
>>>
>>> My goal is to create a "Sales Assistant Script" that recommends products
>>> based upon Response's to questions.
>>>
>>> I know enough JavaScript to successfully create a "JavaScript Error" 2
>>> out of 3 times! <Grin>
>>>
>>> The books I have read are great in regards to understanding what the
>>> code is doing, but in my novice opinion don't teach me the "when to use
>>> what" examples. Maybe that comes with experience.
>>>
>>> I'm "guessing" that I will need to have a set of lets say 12 questions.
>>> I will group these questions in groups of 4. If the User selects a
>>> combination of questions, then my script will recommend the user
>>> purchase certain products.
>>>
>>> So what I need to know is how do you assign or group the selection of
>>> buttons or check marks, to specific product recommendations?
>>>
>>> I'm looking for the Simplist way of getting this done.
>>>
>>> What do I need to do ?
>>>
>>> Thanks,
>>> Richard
>>> txknapper at hotmail.com
>>>
>>>

>>
>>
>> sounds like you combine the answers to an sql query ansA && ansB && ansC
>> && ansD
>>
>> gives you also a hint on how to order your questions
>>
>> my 2 cent
>>
>> gl
>> martin

>
>
> ps .. would do this in php rather than javascript



 
Reply With Quote
 
McKirahan
Guest
Posts: n/a
 
      04-07-2005
"Rich" <> wrote in message
news:wq75e.4607$B12.513@trnddc09...
> I have a project that I would Greatly Appreciate some direction.
>
> My goal is to create a "Sales Assistant Script" that recommends products
> based upon Response's to questions.
>
> I know enough JavaScript to successfully create a "JavaScript Error" 2 out
> of 3 times! <Grin>
>
> The books I have read are great in regards to understanding what the code

is
> doing, but in my novice opinion don't teach me the "when to use what"
> examples. Maybe that comes with experience.
>
> I'm "guessing" that I will need to have a set of lets say 12 questions. I
> will group these questions in groups of 4. If the User selects a
> combination of questions, then my script will recommend the user purchase
> certain products.
>
> So what I need to know is how do you assign or group the selection of
> buttons or check marks, to specific product recommendations?
>
> I'm looking for the Simplist way of getting this done.
>
> What do I need to do ?
>
> Thanks,
> Richard
> txknapper at hotmail.com



A couple of questions:

1) How many answers must be given to point to a product?

2) Can any set of answers point to more than one product?


Start by defining a matrix of products and answers.

Define the solution then write code to realize it.


 
Reply With Quote
 
Rich
Guest
Posts: n/a
 
      04-07-2005
You wrote:

> 1) How many answers must be given to point to a product?
>
> 2) Can any set of answers point to more than one product?


1. I'd say 3 answers to point to a product.
2. I'd prefer a set of 3 answers point to one product but more than one
product is fine.

I'm looking for a Script Sample , or something online that already does this
that will help me better understand what I need to do.

I need this to be easy for me so I can understand and grasp what the script
is doing.

Thanks for any help.



"McKirahan" <> wrote in message
news:O8KdneUERtio3MjfRVn-...
> "Rich" <> wrote in message
> news:wq75e.4607$B12.513@trnddc09...
>> I have a project that I would Greatly Appreciate some direction.
>>
>> My goal is to create a "Sales Assistant Script" that recommends products
>> based upon Response's to questions.
>>
>> I know enough JavaScript to successfully create a "JavaScript Error" 2
>> out
>> of 3 times! <Grin>
>>
>> The books I have read are great in regards to understanding what the code

> is
>> doing, but in my novice opinion don't teach me the "when to use what"
>> examples. Maybe that comes with experience.
>>
>> I'm "guessing" that I will need to have a set of lets say 12 questions.
>> I
>> will group these questions in groups of 4. If the User selects a
>> combination of questions, then my script will recommend the user purchase
>> certain products.
>>
>> So what I need to know is how do you assign or group the selection of
>> buttons or check marks, to specific product recommendations?
>>
>> I'm looking for the Simplist way of getting this done.
>>
>> What do I need to do ?
>>
>> Thanks,
>> Richard
>> txknapper at hotmail.com

>
>
> A couple of questions:
>
> 1) How many answers must be given to point to a product?
>
> 2) Can any set of answers point to more than one product?
>
>
> Start by defining a matrix of products and answers.
>
> Define the solution then write code to realize it.
>
>



 
Reply With Quote
 
McKirahan
Guest
Posts: n/a
 
      04-07-2005
"Rich" <> wrote in message
news:Y_b5e.794$H_5.564@trnddc01...
> You wrote:
>
> > 1) How many answers must be given to point to a product?
> >
> > 2) Can any set of answers point to more than one product?

>
> 1. I'd say 3 answers to point to a product.
> 2. I'd prefer a set of 3 answers point to one product but more than one
> product is fine.
>
> I'm looking for a Script Sample , or something online that already does

this
> that will help me better understand what I need to do.
>
> I need this to be easy for me so I can understand and grasp what the

script
> is doing.
>
> Thanks for any help.
>
>
> "McKirahan" <> wrote in message
> news:O8KdneUERtio3MjfRVn-...
> > "Rich" <> wrote in message
> > news:wq75e.4607$B12.513@trnddc09...
> >> I have a project that I would Greatly Appreciate some direction.
> >>
> >> My goal is to create a "Sales Assistant Script" that recommends

products
> >> based upon Response's to questions.
> >>
> >> I know enough JavaScript to successfully create a "JavaScript Error" 2
> >> out
> >> of 3 times! <Grin>
> >>
> >> The books I have read are great in regards to understanding what the

code
> > is
> >> doing, but in my novice opinion don't teach me the "when to use what"
> >> examples. Maybe that comes with experience.
> >>
> >> I'm "guessing" that I will need to have a set of lets say 12 questions.
> >> I
> >> will group these questions in groups of 4. If the User selects a
> >> combination of questions, then my script will recommend the user

purchase
> >> certain products.
> >>
> >> So what I need to know is how do you assign or group the selection of
> >> buttons or check marks, to specific product recommendations?
> >>
> >> I'm looking for the Simplist way of getting this done.
> >>
> >> What do I need to do ?
> >>
> >> Thanks,
> >> Richard
> >> txknapper at hotmail.com

> >
> >
> > A couple of questions:
> >
> > 1) How many answers must be given to point to a product?
> >
> > 2) Can any set of answers point to more than one product?
> >
> >
> > Start by defining a matrix of products and answers.
> >
> > Define the solution then write code to realize it.



Please don't top post as it's harder to follow the conversation.

I forgot to ask:

What types of questions are they --
true/false, multiple choice, or fill-in-the-blank?

a) Do you want a car? True / False

b) How many doors do you want? 2, 4, or 5 (hatchback)

c) What brand do you prefer? _______________


Can you give some question and answer examples?


 
Reply With Quote
 
Rich
Guest
Posts: n/a
 
      04-07-2005
Here is something I found on the Web that is similiar to what I want to do.

http://www.kmoser.com/xerox/cgi-bin/ps.cgi?action=home

Only difference is I'd like to ask the User questions and then suggest some
products.

Does this help?

I looked at the source code but could not figure out how this was done.

I think if I can get a sample of script on how to assign a radial button to
a specific set of products that I can do the rest......I hope.

Thanks again for any help.

"McKirahan" <> wrote in message
news:b8ednZ3cP6mgyMjfRVn-...
> "Rich" <> wrote in message
> news:Y_b5e.794$H_5.564@trnddc01...
>> You wrote:
>>
>> > 1) How many answers must be given to point to a product?
>> >
>> > 2) Can any set of answers point to more than one product?

>>
>> 1. I'd say 3 answers to point to a product.
>> 2. I'd prefer a set of 3 answers point to one product but more than one
>> product is fine.
>>
>> I'm looking for a Script Sample , or something online that already does

> this
>> that will help me better understand what I need to do.
>>
>> I need this to be easy for me so I can understand and grasp what the

> script
>> is doing.
>>
>> Thanks for any help.
>>
>>
>> "McKirahan" <> wrote in message
>> news:O8KdneUERtio3MjfRVn-...
>> > "Rich" <> wrote in message
>> > news:wq75e.4607$B12.513@trnddc09...
>> >> I have a project that I would Greatly Appreciate some direction.
>> >>
>> >> My goal is to create a "Sales Assistant Script" that recommends

> products
>> >> based upon Response's to questions.
>> >>
>> >> I know enough JavaScript to successfully create a "JavaScript Error" 2
>> >> out
>> >> of 3 times! <Grin>
>> >>
>> >> The books I have read are great in regards to understanding what the

> code
>> > is
>> >> doing, but in my novice opinion don't teach me the "when to use what"
>> >> examples. Maybe that comes with experience.
>> >>
>> >> I'm "guessing" that I will need to have a set of lets say 12
>> >> questions.
>> >> I
>> >> will group these questions in groups of 4. If the User selects a
>> >> combination of questions, then my script will recommend the user

> purchase
>> >> certain products.
>> >>
>> >> So what I need to know is how do you assign or group the selection of
>> >> buttons or check marks, to specific product recommendations?
>> >>
>> >> I'm looking for the Simplist way of getting this done.
>> >>
>> >> What do I need to do ?
>> >>
>> >> Thanks,
>> >> Richard
>> >> txknapper at hotmail.com
>> >
>> >
>> > A couple of questions:
>> >
>> > 1) How many answers must be given to point to a product?
>> >
>> > 2) Can any set of answers point to more than one product?
>> >
>> >
>> > Start by defining a matrix of products and answers.
>> >
>> > Define the solution then write code to realize it.

>
>
> Please don't top post as it's harder to follow the conversation.
>
> I forgot to ask:
>
> What types of questions are they --
> true/false, multiple choice, or fill-in-the-blank?
>
> a) Do you want a car? True / False
>
> b) How many doors do you want? 2, 4, or 5 (hatchback)
>
> c) What brand do you prefer? _______________
>
>
> Can you give some question and answer examples?
>
>



 
Reply With Quote
 
Lee
Guest
Posts: n/a
 
      04-07-2005
Rich said:

>I think if I can get a sample of script on how to assign a radial button to
>a specific set of products that I can do the rest......I hope.


"assign a ... button to a specific set of products" has no clear meaning.
The first step in writing a program is to *cleary* define what you want
it to do.

 
Reply With Quote
 
McKirahan
Guest
Posts: n/a
 
      04-07-2005
"Rich" <> wrote in message
news:6Qd5e.74$0c2.23@trnddc08...
> Here is something I found on the Web that is similiar to what I want to

do.
>
> http://www.kmoser.com/xerox/cgi-bin/ps.cgi?action=home
>
> Only difference is I'd like to ask the User questions and then suggest

some
> products.
>
> Does this help?
>
> I looked at the source code but could not figure out how this was done.
>
> I think if I can get a sample of script on how to assign a radial button

to
> a specific set of products that I can do the rest......I hope.
>
> Thanks again for any help.



Here's a stripped down version of the code at the above URL.

<HTML>
<HEAD>
<TITLE>SalesAss.htm</TITLE>
<script type="text/javascript">
function validate_and_submit() {
var ok = true; // Assume
var what; // E.g. 'Printer', 'Fax', etc.
var how; // E.g. 'Price', 'Function'
if (document.formname.primary[0].checked) {
what = 'Printer';
if (document.formname.priceOrFunc[0].checked) {
document.formname.state.value = 'pp1';
how = 'Price';
} else if (document.formname.priceOrFunc[1].checked) {
document.formname.state.value = 'pf1';
how = 'Function';
} else {
ok = false;
alert("Please select whether you would like to search by Price or by
Function before you click the 'Proceed' button.");
}
} else if (document.formname.primary[1].checked) {
what = 'Fax';
if (document.formname.priceOrFunc[0].checked) {
document.formname.state.value = 'fp1';
how = 'Price';
} else if (document.formname.priceOrFunc[1].checked) {
document.formname.state.value = 'ff1';
how = 'Function';
} else {
ok = false;
alert("Please select whether you would like to search by Price or by
Function before you click the 'Proceed' button.");
}
} else if (document.formname.primary[2].checked) {
what = 'Copy';
if (document.formname.priceOrFunc[0].checked) {
document.formname.state.value = 'cp1';
how = 'Price';
} else if (document.formname.priceOrFunc[1].checked) {
document.formname.state.value = 'cf1';
how = 'Function';
} else {
ok = false;
alert("Please select whether you would like to search by Price or by
Function before you click the 'Proceed' button.");
}
} else if (document.formname.primary[3].checked) {
what = 'Multifunction';
if (document.formname.priceOrFunc[0].checked) {
document.formname.state.value = 'mp1';
how = 'Price';
} else if (document.formname.priceOrFunc[1].checked) {
document.formname.state.value = 'mf1';
how = 'Function';
} else {
ok = false;
alert("Please select whether you would like to search by Price or by
Function before you click the 'Proceed' button.");
}
} else {
ok = false;
alert("Please choose the type of product you are interested in before
you click the 'Proceed' button.");
}
if (ok) {
document.formname.heading.value = (what + ' - by ' + how);
}
}
</script>
</HEAD>
<BODY>
<FORM name="formname">
<INPUT type="radio" name="primary" value="print"> Print
<INPUT type="radio" name="primary" value="fax"> Fax
<INPUT type="radio" name="primary" value="copy"> Copy
<INPUT type="radio" name="primary" value="multifunction"> Multi-Function
<br><br>
<INPUT type="radio" name="priceOrFunc" value="price">Price
<INPUT type="radio" name="priceOrFunc" value="function">Function
<br><br>
<INPUT type="text" name="state" readonly>
<input type="text" name="heading" value="">
<INPUT type="button" value="Proceed" onclick="validate_and_submit()">
<INPUT type="reset" value="Clear">
</FORM>
</body>
</html>

Your next step is to RTFM and talk to the teacher. Good luck!


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to execute a script from another script and other script does notdo busy wait. Rajat Python 3 01-08-2010 02:05 PM
RE: How to execute a script from another script and other script doesnotdo busy wait. VYAS ASHISH M-NTB837 Python 2 01-07-2010 08:18 PM
<script>alert();</script> =?Utf-8?B?PHNjcmlwdD5hbGVydCgpOzwvc2NyaXB0Pg==?= alert Microsoft Certification 0 04-13-2004 06:36 AM
Perl Help - Windows Perl script accessing a Unix perl Script dpackwood Perl 3 09-30-2003 02:56 AM
How to make Perl Script "POST" call from another Perl Script??? Wet Basement Perl 1 07-15-2003 10:25 PM



Advertisments
 



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