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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Online price quote script help

Status
Not open for further replies.

marinpa

Technical User
Feb 12, 2001
19
CA
Hi there,

I have this script "I was trying, to no avail, to change the drop-down box list to a checkbox by the example in the same page.

Thank you anticipated for any help

Marinpa
 
And your problem is what?

You say you want to have checkboxes, and you've got checkboxes... so unless you tell us what is wrong with them, there's not much we can help you with.

Dan


[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Hi Dan,

Thanks for answering my question.
I would like the user to see the segments of the package and to be able to check (tick) either the whole package or just one or two segments of his like from the package.

When the whole package is checked, automatically all the segments are checking (ticked)


Thank you anticipated


Marinpa
 
Do you want them to only be able to select segments from one package per order, do you want the segments they select to be selected for each package they selected, or do you want them to be able to select segments from each package indempendently, and on one form?

I hope that wasn't too confusing a qestion.



I hope this helps;
Rob Hercules
 
Hi Rob,

Yes, I want the user to be able to select either the whole package or just segments from each package indenpendently.
Please see the updated example file:


Thank you!
 
Try adding this to your JavaScript in the [tt]<head>[/tt] of your page:
Code:
<script language=JavaScript>
<!--
var P_1;
P_1[0] = document.form1.Package1;
P_1[1] = document.form1.Package1.1;
P_1[2] = document.form1.Package1.2;
P_2[3] = document.form1.Package1.3;
P_1[4] = document.form1.Package1.4;
P_1[5] = document.form1.Package1.5;

function ProcessParentCheck(GrouP)
{
 if(GrouP[0].checked == true)
 {
  for(i=1;i<GrouP.length;i++)
  {
   GrouP[i].checked = true;
  };
 };
};
//-->
</script>
...and replacing your html code for you checkboxes with something like this:
Code:
    <form method="POST" action="--WEBBOT-SELF--" name="form1"><p>
      <input type="checkbox" name="Package1" value="Check All Boxes" onClick="ProcessParentCheck(P_1);"> Set 1
      <b><font size="2" color="#000080">$10</font></b><br>
&nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="Package1.1" value="1">Segment 1.1<b><font size="2" color="#000080"> 
      $</font></b><font size="2" color="#000080"><b>2</b></font><br>

&nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="Package1.2" value="2">Segment 1.2<b><font size="2" color="#000080"> 
      $</font></b><font size="2" color="#000080"><b>2</b></font><br>
&nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="Package1.3" value="3">Segment 1.3<b><font size="2" color="#000080"> 
      $</font></b><font size="2" color="#000080"><b>2</b></font><br>
&nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="Package1.4" value="4">Segment 1.4<b><font size="2" color="#000080"> 
      $</font></b><font size="2" color="#000080"><b>2</b></font><br>
&nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="Package1.5" value="5">Segment 1.5<b><font size="2" color="#000080"> 
      $</font></b><font size="2" color="#000080"><b>2</b></font><br>

      <br>
&nbsp;</p>

NOTE: Each package will have to have it's own name (I.E. P_1, P_2, P_3 & Package1, Package2, Package3) and will have to be defined as an array individually, but I think this should do what you're wanting.



I hope this helps;
Rob Hercules
 
Hi Rob,

Thank you for your answer. Very appreciate your time and effort.

I was trying to follow the instructions and place the presented code into place, but for some reasons does not work.

I am assuming that the second part, the form, ends with a </form> tag and I implemented that, to no avail though.


Please let me know if I am doing something wrong.



With best wishes,

Marinpa
 
Hi Rob,

Please see this page to better understand what I would like to accomplish:
Implement the second script functions in the first one.
Namely, when I check Set1 all the segments boxes from the SET1 to get automatically checked so that they can be added.
Yet when I uncheck one of the segments box, the SET1 box will uncheck.


See here: Thanks
 
marinpa-

Sorry about the dalay there, but sometimes I have several days when I don't get a chance to access the Tek-Tips site...Army seems to find it to be their right to pre-empt such things....

Anywise, I have copied & printed out your (10 page) source code, along with a copy of your current version of your page. I wil go over & edit it for you as time permits, but I cannot make any guarantees as to when I will be able to complete a re-write of it.


Everyone Else-

If you would like to take on this project, by all means don't let me stand in your way. The object here is to help each other, competition is for the outside world. :)



I hope this helps;
Rob Hercules
 
Thanks Rob,

Any help, at any time, is(will be) much appreciated


Regards,

Marin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top