Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

DNN Form in the text/HTML module

Posted on 2008-06-15
1
Medium Priority
?
650 Views
Last Modified: 2012-06-27
Hi,

I am trying to run a form in the text/html module. On a basic HTML page it works just fine. How do I change it so it runs in the module.

I believe I have to change the

<input type="button" value="  Calculate  " onClick="mmcalculate(this.form)">

to something that ASP.NET can understand.

Thanks

Stephan
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function calculate(form) {
brgdiam =eval(form.bearing_diam.value)
breadth =eval(form.breadth.value)
form.mmbearing_diam.value=brgdiam * 25.40005
form.mmbreadth.value =breadth * 25.40005
c = (brgdiam * breadth * 1.29)/7
form.result.value = c
form.mmresult.value =c
}
 
function mmcalculate(form) {
mmbrgdiam =eval(form.mmbearing_diam.value)
mmbreadth =eval(form.mmbreadth.value)
form.bearing_diam.value=mmbrgdiam * 0.03937
form.breadth.value =mmbreadth * 0.03937
mmc = ((mmbrgdiam * 0.03937) * (mmbreadth * 0.03937) * 1.29) / 7
form.result.value =mmc
form.mmresult.value = mmc
}
// End -->
 
</SCRIPT>
<form method="post" action="" name="form1">
<table width="100%" border="0" cellpadding="3" cellspacing="0" bgcolor="#ffffff">
  <tr> 
    <td width="43%" align="right"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Bearing 
    <b>outside</b> diameter :</font></td>
    <td width="27%"> 
    <input type="text" name="mmbearing_diam" size="6">
    <font face="Verdana, Arial, Helvetica, sans-serif" size="2">mm</font> 
    </td>
    <td width="30%"> <font face="Verdana, Arial, Helvetica, sans-serif" size="2"> 
    <input type="text" name="bearing_diam" size="6" maxlength="6">   inch(es) </font></td>
  </tr>
  <tr> 
     <td width="43%" align="right"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Breadth :</font></td>
     <td width="27%"> 
     <input type="text" name="mmbreadth" size="6">
     <font face="Verdana, Arial, Helvetica, sans-serif" size="2">mm 
     </font></td>
     <td width="30%"> <font face="Verdana, Arial, Helvetica, sans-serif" size="2"> 
     <input type="text" name="breadth" size="6" maxlength="6">inch(es)</font></td>
   </tr>
   <tr> 
      <td width="43%" align="right"><font size="2" color="#660000">..</font></td>
      <td width="27%"> 
      <input type="button" value="  Calculate  " onClick="mmcalculate(this.form)">
      </td>
      <td width="30%"> <font face="Verdana, Arial, Helvetica, sans-serif" size="2"> 
      <input type="button" value="  Calculate  " onClick="calculate(this.form)">
      </font></td>
   </tr>
   <tr> 
      <td width="43%" align="right"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Result: </font></td>
      <td width="57%" colspan="2"> 
      <div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> 
      <input type="text" name="result" maxlength="12" size="12" READONLY>cc per day</font></div>
      </td>
   </tr>
</table>
</form>

Open in new window

0
Comment
Question by:sdeby
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 29

Accepted Solution

by:
David H.H.Lee earned 2000 total points
ID: 21795319
Dear sdeby,

I noticed there are missing 2 controls here: result and mmresult.
Perhaps these controls is textbox? Please check first.
0

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question