<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1002847" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1002847</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/form-calculator#comment-1012567</link>
    <description> &lt;p&gt;Vinny,&lt;/p&gt;
&lt;p&gt;    That orderform at Grassblade is definitely the idea.  There&#039;s a long one at:&lt;br /&gt;
 &lt;a href=&quot;http://www.coolnerds.com/jscript/ofinfo.htm&quot; class=&quot;bb-url&quot;&gt;http://www.coolnerds.com/jscript/ofinfo.htm&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;[This message has been edited by syaegerii (edited 31 January 2000).]&lt;/p&gt;
 </description>
     <pubDate>Tue, 01 Feb 2000 04:53:00 +0000</pubDate>
 <dc:creator>syaegerii</dc:creator>
 <guid isPermaLink="false">comment 1012567 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/form-calculator#comment-1012566</link>
    <description> &lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;&amp;gt;This javascript is making more sense.&lt;/p&gt;
&lt;p&gt;Or as j,p,g&amp;amp;r said: &quot;Things are getting better all the time&quot;&lt;/p&gt;
&lt;p&gt;vinny&lt;/p&gt;
 </description>
     <pubDate>Sat, 29 Jan 2000 01:52:00 +0000</pubDate>
 <dc:creator>Vincent Puglia</dc:creator>
 <guid isPermaLink="false">comment 1012566 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/form-calculator#comment-1012565</link>
    <description> &lt;p&gt;Thanks guys.&lt;/p&gt;
&lt;p&gt;    I seen your order form, Vincent.  I&#039;m messing around with the code and Megs&#039;s code. This javascript is making more sense.&lt;/p&gt;
 </description>
     <pubDate>Fri, 28 Jan 2000 05:21:00 +0000</pubDate>
 <dc:creator>syaegerii</dc:creator>
 <guid isPermaLink="false">comment 1012565 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/form-calculator#comment-1012564</link>
    <description> &lt;p&gt;Hi Yaeger,&lt;/p&gt;
&lt;p&gt;   You might want to see the &quot;Orderform&quot; script at my site; it uses arrays for the &#039;products&#039; and the &quot;with&quot; command for that easy-on-the-fingers effect.  Also comes with explanations.&lt;/p&gt;
&lt;p&gt;Vinny &lt;a href=&quot;http://members.aol.com/grassblad&quot; class=&quot;bb-url&quot;&gt; GrassBlade: cut&amp;amp;paste javascript &lt;/a&gt;&lt;/p&gt;
 </description>
     <pubDate>Fri, 28 Jan 2000 00:48:00 +0000</pubDate>
 <dc:creator>Vincent Puglia</dc:creator>
 <guid isPermaLink="false">comment 1012564 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/form-calculator#comment-1012563</link>
    <description> &lt;p&gt;It works with and without the eval.&lt;/p&gt;
&lt;p&gt;You only have to eval() an expression if it contains a string which is supposed to executed as an expression.&lt;/p&gt;
&lt;p&gt;Malte&lt;/p&gt;
 </description>
     <pubDate>Thu, 27 Jan 2000 23:20:00 +0000</pubDate>
 <dc:creator>Malte</dc:creator>
 <guid isPermaLink="false">comment 1012563 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/form-calculator#comment-1012562</link>
    <description> &lt;p&gt;Thanks Megs and Malte!&lt;/p&gt;
&lt;p&gt;    I don&#039;t have it down exactly yet, but I&#039;ll get it.  I&#039;ve only been coding in HTML a few weeks now.  JAVASCRIPT is next, I think. I made the practice form below until I get it right.&lt;/p&gt;
&lt;p&gt;    Malte, when you said &quot;eval&quot; is obsolete, does that mean that browsers are going to stop recognizing it?  It works on my version of Netscape (4 or 5?).&lt;/p&gt;
&lt;p&gt;    Thanks again.&lt;/p&gt;
&lt;p&gt;&amp;lt;form name=&quot;example&quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;CENTER&amp;gt;&lt;br /&gt;
                  WIDGET&amp;lt;INPUT TYPE=&quot;checkbox&quot; NAME=&quot;WIDGET&quot; VALUE=&quot;YES&quot;&amp;gt;&lt;br /&gt;
                  Qty.&amp;lt;INPUT TYPE=&quot;text&quot; NAME=&quot;Qty.&quot; SIZE=1MAXLENGTH=1&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
                  WIDGET&amp;lt;INPUT TYPE=&quot;checkbox&quot; NAME=&quot;WIDGET&quot; VALUE=&quot;YES&quot;&amp;gt;&lt;br /&gt;
                  Qty.&amp;lt;INPUT TYPE=&quot;text&quot; NAME=&quot;Qty.&quot; SIZE=1 MAXLENGTH=1&amp;gt;&lt;br /&gt;
&amp;lt;BR&amp;gt;&amp;lt;BR&amp;gt;&amp;lt;BR&amp;gt;&amp;lt;BR&amp;gt;&lt;/p&gt;
&lt;p&gt;                  &amp;lt;input type=&quot;text&quot; size=&quot;20&quot; name=&quot;calculator&quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;                  &amp;lt;input type=&quot;button&quot; name=&quot;B1&quot; value=&quot;Calculate&quot;&lt;br /&gt;
                  onclick=&quot;cal()&quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;                  &amp;lt;input type=&quot;reset&quot; name=&quot;B2&quot; value=&quot;Reset&quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;                  Answer:&amp;lt;input type=&quot;text&quot; size=&quot;20&quot; name=&quot;answer&quot;&amp;gt;&lt;br /&gt;
                  &amp;lt;/form&amp;gt;&lt;/p&gt;
&lt;p&gt;                  &amp;lt;script&amp;gt;&lt;br /&gt;
                  function cal()&lt;br /&gt;
                  {&lt;br /&gt;
                  document.example.answer.value=&lt;br /&gt;
                  eval(document.example.calculator.value)&lt;br /&gt;
                  }&lt;br /&gt;
                  &amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/CENTER&amp;gt;&lt;/p&gt;
 </description>
     <pubDate>Thu, 27 Jan 2000 19:36:00 +0000</pubDate>
 <dc:creator>syaegerii</dc:creator>
 <guid isPermaLink="false">comment 1012562 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/form-calculator#comment-1012561</link>
    <description> &lt;p&gt;The eval is obsolete.&lt;/p&gt;
&lt;p&gt;Malte&lt;/p&gt;
&lt;p&gt;------------------&lt;br /&gt;
&lt;strong&gt;Malte Ubl - &lt;a href=&quot;http://www.Boardzilla.org&quot; class=&quot;bb-url&quot;&gt;www.Boardzilla.org&lt;/a&gt;&lt;/strong&gt;&lt;br /&gt;
Communication:  public&amp;lt;-&amp;gt;programmers&lt;br /&gt;
of the &lt;strong&gt;Boardzilla BB&lt;/strong&gt;&lt;/p&gt;
 </description>
     <pubDate>Tue, 25 Jan 2000 19:36:00 +0000</pubDate>
 <dc:creator>Malte</dc:creator>
 <guid isPermaLink="false">comment 1012561 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/form-calculator#comment-1012560</link>
    <description> &lt;p&gt;Just use Javascript to access the quantity text fields assign them to varialbes, add them up, and output ther result in a blank text field labelled &quot;total.&quot;  It would look something like this:&lt;/p&gt;
&lt;p&gt;(I&#039;m using qty1 and qty2 to separate the two widgets in the calculations, so for this to work your form fields would have to be labelled accordingly)&lt;/p&gt;
&lt;p&gt;function calculate() {&lt;/p&gt;
&lt;p&gt;var widget1= eval(document.form.qty1.value);&lt;br /&gt;
var widget2= eval(document.form.qty2.value);&lt;/p&gt;
&lt;p&gt;var total = (widget1*25) + (widget2*25);&lt;/p&gt;
&lt;p&gt;document.form.total.value = total;&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;Just call the function from onSubmit in the submit button.  I hope this works for you.  I&#039;m not a Javascript guru by any means, but I&#039;ve been working on something similar to this recently and it works!! (yeah, I&#039;m proud)&lt;/p&gt;
&lt;p&gt;Here&#039;s an article about accessing and validating forms - it might help&lt;br /&gt;
 &lt;a href=&quot;http://wsabstract.com/javatutors/form5.shtml&quot; class=&quot;bb-url&quot;&gt;http://wsabstract.com/javatutors/form5.shtml&lt;/a&gt;&lt;/p&gt;
 </description>
     <pubDate>Tue, 25 Jan 2000 19:14:00 +0000</pubDate>
 <dc:creator>Megan</dc:creator>
 <guid isPermaLink="false">comment 1012560 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
