Question : Add two numbers from dropdown menu then take square root of the result, need help.

Hi all Experts,
I try to add two numbers and take a square root of that result and I use the Math.sqrt () and got errors somewhere, please assist me where the errors have happened. Thank you very much in advance.
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
<html>

<head>
<title></title>
</head>

<body>

<select id="N1">
   <option value="1">1</option>
   <option value="2">2</option>
</select>

<select id="N2">
   <option value="1">1</option>
   <option value="2">2</option>
</select>

<script type="text/javascript">
function add()
{
   var N1 = document.getElementById('N1');
   var N2 = document.getElementById('N2');
   document.getElementById('Total').value = parseInt(N1.options[N1.options.selectedIndex].value) + parseInt(N2.options[N2.options.selectedIndex].value);
   result=sqrt(Total);
}
</script>

<button onclick="add()">Calculate</button>

<input type="text" id='Result' />

</body>

</html>

Answer : Add two numbers from dropdown menu then take square root of the result, need help.

You also might want to check out some of the Server System Variables.

http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html

Some of these may limit your query, depending on your requirements.

max_allowed_packet       
max_binlog_cache_size       
max_binlog_size       
max_connect_errors       
max_connections       
max_delayed_threads       
max_error_count       
max_heap_table_size       
max_insert_delayed_threads                       
max_join_size
max_length_for_sort_data       
max_prepared_stmt_count       
max_relay_log_size       
max_seeks_for_key       
max_sort_length       
max_tmp_tables       
max_user_connections
max_write_lock_count       

To view these variables on the command line use the show variables command.

Example: You can also run this command to get the max_table_heap_size.

1:
show variables like 'max_heap_table_size';
Random Solutions  
 
programming4us programming4us