473,587 Members | 2,412 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Script Keeper?

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
Jul 23 '05 #1
14 1516
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
Jul 23 '05 #2
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
Jul 23 '05 #3
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!" <m.*******@gmai l.comcomcommer> wrote in message
news:d3******** **@news.hispeed .ch...
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

Jul 23 '05 #4
"Rich" <no************ @verizon.net> wrote in message
news:wq75e.4607 $B12.513@trnddc 09...
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.
Jul 23 '05 #5
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" <Ne**@McKirahan .com> wrote in message
news:O8******** ************@co mcast.com... "Rich" <no************ @verizon.net> wrote in message
news:wq75e.4607 $B12.513@trnddc 09...
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.

Jul 23 '05 #6
"Rich" <no************ @verizon.net> wrote in message
news:Y_b5e.794$ H_5.564@trnddc0 1...
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" <Ne**@McKirahan .com> wrote in message
news:O8******** ************@co mcast.com...
"Rich" <no************ @verizon.net> wrote in message
news:wq75e.4607 $B12.513@trnddc 09...
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?
Jul 23 '05 #7
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" <Ne**@McKirahan .com> wrote in message
news:b8******** ************@co mcast.com...
"Rich" <no************ @verizon.net> wrote in message
news:Y_b5e.794$ H_5.564@trnddc0 1...
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" <Ne**@McKirahan .com> wrote in message
news:O8******** ************@co mcast.com...
> "Rich" <no************ @verizon.net> wrote in message
> news:wq75e.4607 $B12.513@trnddc 09...
>> 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?

Jul 23 '05 #8
Lee
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.

Jul 23 '05 #9
"Rich" <no************ @verizon.net> wrote in message
news:6Qd5e.74$0 c2.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_su bmit() {
var ok = true; // Assume
var what; // E.g. 'Printer', 'Fax', etc.
var how; // E.g. 'Price', 'Function'
if (document.formn ame.primary[0].checked) {
what = 'Printer';
if (document.formn ame.priceOrFunc[0].checked) {
document.formna me.state.value = 'pp1';
how = 'Price';
} else if (document.formn ame.priceOrFunc[1].checked) {
document.formna me.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.formn ame.primary[1].checked) {
what = 'Fax';
if (document.formn ame.priceOrFunc[0].checked) {
document.formna me.state.value = 'fp1';
how = 'Price';
} else if (document.formn ame.priceOrFunc[1].checked) {
document.formna me.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.formn ame.primary[2].checked) {
what = 'Copy';
if (document.formn ame.priceOrFunc[0].checked) {
document.formna me.state.value = 'cp1';
how = 'Price';
} else if (document.formn ame.priceOrFunc[1].checked) {
document.formna me.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.formn ame.primary[3].checked) {
what = 'Multifunction' ;
if (document.formn ame.priceOrFunc[0].checked) {
document.formna me.state.value = 'mp1';
how = 'Price';
} else if (document.formn ame.priceOrFunc[1].checked) {
document.formna me.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.formna me.heading.valu e = (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="multifun ction"> Multi-Function
<br><br>
<INPUT type="radio" name="priceOrFu nc" value="price">P rice
<INPUT type="radio" name="priceOrFu nc" value="function ">Function
<br><br>
<INPUT type="text" name="state" readonly>
<input type="text" name="heading" value="">
<INPUT type="button" value="Proceed" onclick="valida te_and_submit() ">
<INPUT type="reset" value="Clear">
</FORM>
</body>
</html>

Your next step is to RTFM and talk to the teacher. Good luck!
Jul 23 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
3311
by: Sticks | last post by:
ok... im not quite sure how to describe my problem. i have a php script that runs through my entire php site and writes the resulting output to html files. this is necessary as the nature of the hosting available to me for this particular page prohibits me from using php/mysql as i would like. my script works simply by using output buffers...
6
12969
by: Mike Daniel | last post by:
I am attempting to use document.write(pageVar) that displays a new html page within a pop-up window and the popup is failing. Also note that pageVar is a complete HTML page containing other java scripts. Being a javascript newbie and after significant testing, I suspect that the document.write fails after finding a </script> within pageVar....
3
2955
by: Water Cooler v2 | last post by:
Questions: 1. Can there be more than a single script block in a given HEAD tag? 2. Can there be more than a single script block in a given BODY tag? To test, I tried the following code. None of the script gets executed. Can someone please give me a direction as to what I may be missing? Thanks.
2
2961
by: bilaribilari | last post by:
Hi all, I am using Tidy (C) for parsing html pages. I encountered a page that has some script as follows: <script> .... var abc = "<script>some stuff here</" + "script>"; .... </script>
19
3816
by: thisis | last post by:
Hi All, i have this.asp page: <script type="text/vbscript"> Function myFunc(val1ok, val2ok) ' do something ok myFunc = " return something ok" End Function </script>
3
2480
by: rsteph | last post by:
I have a script that shows the time and date. It's been working on my site for quite a while now. Suddenly it stops showing up, after getting my drop down menu to work. If I put text between the <div id="datetime"></div> tags, the text shows up, but the javascript output being sent to those some divs doesn't seem to want to work. It should be...
3
3665
by: Angus | last post by:
I have a web page with a toolbar containing a Save button. The Save button can change contextually to be a Search button in some cases. Hence the button name searchsavechanges. The snippet of html is: <a class="searchsavechanges btn btn3d tbbtn" href="javascript:" style="position:static"> <div id="TBsearchsavechanges">Search</div> </a>
7
3603
by: imtmub | last post by:
I have a page, Head tag Contains many Scripts and style sheet for Menu and Page. This code working fine and displaying menus and page as i wanted. Check this page for reference. http://www.marco.com.cn/web-content/marco_re10.html -------------------------------------------------------------- <head> <!-- InstanceBeginEditable...
1
47430
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Many websites have a form or a link you can use to download a file. You click a form button or click on a link and after a moment or two a file download dialog box pops-up in your web browser and prompts you for some instructions, such as “open” or...
0
7843
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7967
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8220
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5713
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5392
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3875
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2353
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1452
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1185
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.