Prev: 如何找到未儲存的msn 對話?
Next: Expression web V Dreamwever
From: 116 on 18 Jan 2010 11:16 I have been using this piece of script in forms, and just tweaking it when needed. I have created an edit.asp page. This being database results, not quite sure how to tweak. <script type="text/javascript"> function calcinc() { with (document.FrontPage_Form1) { DashNumber.value = +DashNumber.value + +"1"; if (DashNumber.value < 10) DashNumber.value = '0' + DashNumber.value; else if (DashNumber.value >= 10) DashNumber.value = '' + DashNumber.value; } /* Note the extra + operators. */ } </script> Any assist would be appreciaited. David
From: Stefan B Rusynko on 19 Jan 2010 04:45 Explain how you are using the Client side script you posted - which adds 1 to all values of form fields named DashNumber, then adds a leading 0 if the value is less then 10 ASP uses server side script to process form fields - but you can still use the same client side script to update user entries before you send the form -- _____________________________________________ SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ] "Warning - Using the F1 Key will not break anything!" (-; _____________________________________________ "116" <116(a)discussions.microsoft.com> wrote in message news:A63D87C4-69EC-4C61-9DCC-9754A2E4C351(a)microsoft.com... I have been using this piece of script in forms, and just tweaking it when needed. I have created an edit.asp page. This being database results, not quite sure how to tweak. <script type="text/javascript"> function calcinc() { with (document.FrontPage_Form1) { DashNumber.value = +DashNumber.value + +"1"; if (DashNumber.value < 10) DashNumber.value = '0' + DashNumber.value; else if (DashNumber.value >= 10) DashNumber.value = '' + DashNumber.value; } /* Note the extra + operators. */ } </script> Any assist would be appreciaited. David
From: 116 on 19 Jan 2010 07:39 There is a button on the form 'Increment' that is for the user. "Stefan B Rusynko" wrote: > Explain how you are using the Client side script you posted > - which adds 1 to all values of form fields named DashNumber, then adds a leading 0 if the value is less then 10 > > ASP uses server side script to process form fields > - but you can still use the same client side script to update user entries before you send the form > > -- > > _____________________________________________ > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ] > "Warning - Using the F1 Key will not break anything!" (-; > _____________________________________________ > > > "116" <116(a)discussions.microsoft.com> wrote in message news:A63D87C4-69EC-4C61-9DCC-9754A2E4C351(a)microsoft.com... > I have been using this piece of script in forms, and just tweaking it when > needed. I have created an edit.asp page. This being database results, not > quite sure how to tweak. > > <script type="text/javascript"> > function calcinc() > { > with (document.FrontPage_Form1) > { DashNumber.value = +DashNumber.value + +"1"; > if (DashNumber.value < 10) > DashNumber.value = '0' + DashNumber.value; > else if (DashNumber.value >= 10) > DashNumber.value = '' + DashNumber.value; > } > /* Note the extra + operators. */ > } > </script> > > Any assist would be appreciaited. > > David > > > . >
From: Stefan B Rusynko on 20 Jan 2010 04:22 Post a URL to the page using it -- _____________________________________________ SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ] "Warning - Using the F1 Key will not break anything!" (-; _____________________________________________ "116" <116(a)discussions.microsoft.com> wrote in message news:45AEEBC2-A58C-40F0-8027-4996F41EB761(a)microsoft.com... There is a button on the form 'Increment' that is for the user. "Stefan B Rusynko" wrote: > Explain how you are using the Client side script you posted > - which adds 1 to all values of form fields named DashNumber, then adds a leading 0 if the value is less then 10 > > ASP uses server side script to process form fields > - but you can still use the same client side script to update user entries before you send the form > > -- > > _____________________________________________ > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ] > "Warning - Using the F1 Key will not break anything!" (-; > _____________________________________________ > > > "116" <116(a)discussions.microsoft.com> wrote in message news:A63D87C4-69EC-4C61-9DCC-9754A2E4C351(a)microsoft.com... > I have been using this piece of script in forms, and just tweaking it when > needed. I have created an edit.asp page. This being database results, not > quite sure how to tweak. > > <script type="text/javascript"> > function calcinc() > { > with (document.FrontPage_Form1) > { DashNumber.value = +DashNumber.value + +"1"; > if (DashNumber.value < 10) > DashNumber.value = '0' + DashNumber.value; > else if (DashNumber.value >= 10) > DashNumber.value = '' + DashNumber.value; > } > /* Note the extra + operators. */ > } > </script> > > Any assist would be appreciaited. > > David > > > . >
From: 116 on 22 Jan 2010 14:48 Stefan...thanks for the assist. I found that the issue was that my form name was not being retained after saving the page. Reason unknown. I changed the script to document.forms[#]. works fine now. David "Stefan B Rusynko" wrote: > Post a URL to the page using it > > -- > > _____________________________________________ > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ] > "Warning - Using the F1 Key will not break anything!" (-; > _____________________________________________ > > > "116" <116(a)discussions.microsoft.com> wrote in message news:45AEEBC2-A58C-40F0-8027-4996F41EB761(a)microsoft.com... > There is a button on the form 'Increment' that is for the user. > > "Stefan B Rusynko" wrote: > > > Explain how you are using the Client side script you posted > > - which adds 1 to all values of form fields named DashNumber, then adds a leading 0 if the value is less then 10 > > > > ASP uses server side script to process form fields > > - but you can still use the same client side script to update user entries before you send the form > > > > -- > > > > _____________________________________________ > > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ] > > "Warning - Using the F1 Key will not break anything!" (-; > > _____________________________________________ > > > > > > "116" <116(a)discussions.microsoft.com> wrote in message news:A63D87C4-69EC-4C61-9DCC-9754A2E4C351(a)microsoft.com... > > I have been using this piece of script in forms, and just tweaking it when > > needed. I have created an edit.asp page. This being database results, not > > quite sure how to tweak. > > > > <script type="text/javascript"> > > function calcinc() > > { > > with (document.FrontPage_Form1) > > { DashNumber.value = +DashNumber.value + +"1"; > > if (DashNumber.value < 10) > > DashNumber.value = '0' + DashNumber.value; > > else if (DashNumber.value >= 10) > > DashNumber.value = '' + DashNumber.value; > > } > > /* Note the extra + operators. */ > > } > > </script> > > > > Any assist would be appreciaited. > > > > David > > > > > > . > > > > > . >
|
Pages: 1 Prev: 如何找到未儲存的msn 對話? Next: Expression web V Dreamwever |