<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1018469" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1018469</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/small-java-script-question#comment-1108736</link>
    <description> &lt;p&gt;Great! No probs. Looks great in action!&lt;br /&gt;
-dk&lt;/p&gt;
 </description>
     <pubDate>Sat, 11 May 2002 17:16:41 +0000</pubDate>
 <dc:creator>dk01</dc:creator>
 <guid isPermaLink="false">comment 1108736 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/small-java-script-question#comment-1108707</link>
    <description> &lt;p&gt;Well it worked!! &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.centrepointstation.net/css/index3.htm&quot; class=&quot;bb-url&quot;&gt;http://www.centrepointstation.net/css/index3.htm&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Services &amp;gt; Ship Prices&lt;/p&gt;
&lt;p&gt;Figured you&#039;d helped so much you deserved to be shown the final product. Thanks for all yer help mate.&lt;/p&gt;
 </description>
     <pubDate>Fri, 10 May 2002 18:30:41 +0000</pubDate>
 <dc:creator>Warlord Khan</dc:creator>
 <guid isPermaLink="false">comment 1108707 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/small-java-script-question#comment-1108651</link>
    <description> &lt;p&gt;Hope that worked. I am away until this Saturday night. Just don&#039;t want you to think I&#039;m ignoring you &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/tongue.png&quot; title=&quot;Sticking out tongue&quot; alt=&quot;Sticking out tongue&quot; class=&quot;smiley-content&quot; /&gt;&lt;br /&gt;
-dk&lt;/p&gt;
 </description>
     <pubDate>Thu, 09 May 2002 22:19:33 +0000</pubDate>
 <dc:creator>dk01</dc:creator>
 <guid isPermaLink="false">comment 1108651 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/small-java-script-question#comment-1108626</link>
    <description> &lt;p&gt;Ugh this is getting frustrating:&lt;/p&gt;
&lt;p&gt;Try this:&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;function do_discount() &lt;br /&gt;{ &lt;br /&gt;var total_ordered = parseFloat(document.get_data.number_ordered.value); &lt;br /&gt;alert(total_ordered);&lt;br /&gt;if(total_ordered &amp;gt;= 0 &amp;amp;&amp;amp; total_ordered &amp;lt; 24) &lt;br /&gt;{ &lt;br /&gt;unitprice = 545000; &lt;br /&gt;} &lt;br /&gt;else if(total_ordered &amp;gt;= 24 &amp;amp;&amp;amp; total_ordered &amp;lt; 48) &lt;br /&gt;{ &lt;br /&gt;unitprice = 540000;&lt;br /&gt;} &lt;br /&gt;else if(total_ordered &amp;gt;= 48 &amp;amp;&amp;amp; total_ordered &amp;lt; 72) &lt;br /&gt;{ &lt;br /&gt;unitprice = 535000;&lt;br /&gt;} &lt;br /&gt;else if(total_ordered &amp;gt;= 72 &amp;amp;&amp;amp; total_ordered &amp;lt; 200) &lt;br /&gt;{ &lt;br /&gt;unitprice = 530000;&lt;br /&gt;} &lt;br /&gt;total_price = unitprice * total_ordered;&lt;br /&gt;document.get_data.answer.value=total_price; &lt;br /&gt;} &lt;/code&gt;&lt;/div&gt;&#039;&lt;br /&gt;
-dk&lt;/p&gt;
 </description>
     <pubDate>Thu, 09 May 2002 16:09:55 +0000</pubDate>
 <dc:creator>dk01</dc:creator>
 <guid isPermaLink="false">comment 1108626 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/small-java-script-question#comment-1108605</link>
    <description> &lt;p&gt;hmm it seems to me that the new code you posted does:&lt;/p&gt;
&lt;p&gt;Quantity * Base Price - X&lt;/p&gt;
&lt;p&gt;instead of &lt;/p&gt;
&lt;p&gt;Quantity * Base Price - X * Quantity&lt;/p&gt;
 </description>
     <pubDate>Thu, 09 May 2002 14:11:04 +0000</pubDate>
 <dc:creator>Warlord_Khan</dc:creator>
 <guid isPermaLink="false">comment 1108605 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/small-java-script-question#comment-1108596</link>
    <description> &lt;p&gt;ok then you should do this:&lt;br /&gt;
function do_discount()&lt;br /&gt;
{ &lt;/p&gt;
&lt;p&gt;var total_ordered = parseFloat(document.get_data.number_ordered.value);&lt;br /&gt;
var cost = parseFloat(document.get_data.cost.value);&lt;br /&gt;
var total_cost = total_ordered * cost; &lt;/p&gt;
&lt;p&gt;if(total_ordered&amp;gt;=0 &amp;amp;&amp;amp; total_ordered &amp;lt;23)&lt;br /&gt;
{&lt;br /&gt;
total_cost=total_cost-0;&lt;br /&gt;
}&lt;br /&gt;
else if(total_ordered&amp;gt;=24 &amp;amp;&amp;amp; total_ordered &amp;lt;47)&lt;br /&gt;
{&lt;br /&gt;
total_cost=total_cost-5000;&lt;br /&gt;
}&lt;br /&gt;
else if(total_ordered&amp;gt;=48 &amp;amp;&amp;amp; total_ordered &amp;lt;71)&lt;br /&gt;
{&lt;br /&gt;
total_cost=total_cost-10000);&lt;br /&gt;
}&lt;br /&gt;
else if(total_ordered&amp;gt;=72 &amp;amp;&amp;amp; total_ordered &amp;lt;200)&lt;br /&gt;
{&lt;br /&gt;
total_cost=total_cost-15000;&lt;br /&gt;
}&lt;br /&gt;
document.get_data.answer.value=total_cost;&lt;br /&gt;
} &lt;/p&gt;
&lt;p&gt;-dk&lt;/p&gt;
 </description>
     <pubDate>Thu, 09 May 2002 12:08:35 +0000</pubDate>
 <dc:creator>dk01</dc:creator>
 <guid isPermaLink="false">comment 1108596 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/small-java-script-question#comment-1108595</link>
    <description> &lt;p&gt;But I want the base cost to be 545000.&lt;/p&gt;
&lt;p&gt;&amp;lt; 23 Price = 545000&lt;br /&gt;
24 &amp;lt; 47 Price = 540000&lt;br /&gt;
48 &amp;lt; 71 Price = 535000&lt;br /&gt;
72 &amp;gt; Price = 530000&lt;/p&gt;
&lt;p&gt;See?&lt;/p&gt;
 </description>
     <pubDate>Thu, 09 May 2002 11:04:25 +0000</pubDate>
 <dc:creator>Warlord Khan</dc:creator>
 <guid isPermaLink="false">comment 1108595 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/small-java-script-question#comment-1108593</link>
    <description> &lt;p&gt;Yes I can see that.  But according to your code that is the correct answer because you have the cost (The value of the hidden feild cost) actually set to 545000. If you go to your html code and find the hidden feild called &#039;cost&#039; you will see its value is 545000. If you change this yo 540000 then you should get the right answer.&lt;br /&gt;
-dk&lt;/p&gt;
 </description>
     <pubDate>Thu, 09 May 2002 10:14:13 +0000</pubDate>
 <dc:creator>dk01</dc:creator>
 <guid isPermaLink="false">comment 1108593 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/small-java-script-question#comment-1108582</link>
    <description> &lt;p&gt;I meant per ship.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.centrepointstation.net/test/test.htm&quot; class=&quot;bb-url&quot;&gt;http://www.centrepointstation.net/test/test.htm&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Type in 47 and you&#039;ll see that you get 2561500 which is 47*545000 not 47*540000&lt;/p&gt;
 </description>
     <pubDate>Thu, 09 May 2002 07:11:37 +0000</pubDate>
 <dc:creator>Warlord Khan</dc:creator>
 <guid isPermaLink="false">comment 1108582 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/small-java-script-question#comment-1108527</link>
    <description> &lt;p&gt;Ok I am not sure which of the promblems you are experiencing but depending on what you are trying to do it could be either of them. &lt;/p&gt;
&lt;p&gt;Either:&lt;/p&gt;
&lt;p&gt;You possibly typed in the wrong cost. If you look at your cost feild in the html you will see that its value is set to 545000.&lt;/p&gt;
&lt;p&gt;or:&lt;/p&gt;
&lt;p&gt;You are possibly looking at the code wrong. Lets look at this section:&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;else if(total_ordered&amp;gt;=24 &amp;amp;&amp;amp; total_ordered &amp;lt;47) &lt;br /&gt;{ &lt;br /&gt;total_cost=total_cost-(5000*total_ordered); &lt;br /&gt;} &lt;/code&gt;&lt;/div&gt;&#039;This code says &#039;if the order quantity is between 24 and 47 then multiply the quantity by 5000 and subtract it from the original cost of the order [ total_cost = 25615000-(5000*47) ].&lt;br /&gt;
The reason I wrote that was because in you original post you said you wanted to subtract 5000 &lt;strong&gt;per&lt;/strong&gt; ship that was purchased. Is this what you meant or did you mean that it would just be a 5000 discount on the total price?&lt;br /&gt;
-dk&lt;/p&gt;
 </description>
     <pubDate>Wed, 08 May 2002 19:04:01 +0000</pubDate>
 <dc:creator>dk01</dc:creator>
 <guid isPermaLink="false">comment 1108527 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
