Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > beginners question

Reply
Thread Tools

beginners question

 
 
dirk
Guest
Posts: n/a
 
      09-09-2005
Hello,
i gave made some code in VBA for Excel.
i want to make a webpage with the same examples as my excel file, so i think
i will need javascript (serverside?)
how do i begin?
are there some good sites?
thanks.


 
Reply With Quote
 
 
 
 
Dag Sunde
Guest
Posts: n/a
 
      09-09-2005
"dirk" <dd> wrote in message
news:4321410e$0$10956$...
> Hello,
> i gave made some code in VBA for Excel.
> i want to make a webpage with the same examples as my excel file, so i
> think
> i will need javascript (serverside?)
> how do i begin?
> are there some good sites?


Are we to understand that you want a web page that shows/execute
som mathematical calculations based on some user input?

You can do this serverside in any language supported by your
webserver by posting the form with the input-values back to
your server-script, let it do the calculations and generate
the result page back to the browser.

If you do it serverside I suggest using IIS, since you obviously
are familiar with VBA witch are very close to VBScript. ASP pages
can be coded in VB-Script.

Or... You can choos to write all your calculations in JavaScript
as functions in the web-page itself, and do all of the work in
the users browser (clientside).

If you choose the last alternative (I would), then this is the
right NG to ask.

--
Dag.


 
Reply With Quote
 
 
 
 
dirk
Guest
Posts: n/a
 
      09-12-2005
so yes,
i want to do it by using javascript (client side)
what do you mean by "the right NG to ask"?

can you give me some examples for writing an inputbox and a commandbutton on
a html page,
then returning the value of this inputbox by deviding it by 3 for example?

are there some good sites where i can study this?
thank you
"Dag Sunde" <> wrote in message
news:cIbUe.5329$...
> "dirk" <dd> wrote in message
> news:4321410e$0$10956$...
> > Hello,
> > i gave made some code in VBA for Excel.
> > i want to make a webpage with the same examples as my excel file, so i
> > think
> > i will need javascript (serverside?)
> > how do i begin?
> > are there some good sites?

>
> Are we to understand that you want a web page that shows/execute
> som mathematical calculations based on some user input?
>
> You can do this serverside in any language supported by your
> webserver by posting the form with the input-values back to
> your server-script, let it do the calculations and generate
> the result page back to the browser.
>
> If you do it serverside I suggest using IIS, since you obviously
> are familiar with VBA witch are very close to VBScript. ASP pages
> can be coded in VB-Script.
>
> Or... You can choos to write all your calculations in JavaScript
> as functions in the web-page itself, and do all of the work in
> the users browser (clientside).
>
> If you choose the last alternative (I would), then this is the
> right NG to ask.
>
> --
> Dag.
>
>



 
Reply With Quote
 
Dag Sunde
Guest
Posts: n/a
 
      09-12-2005
"dirk" <dd> wrote in message
news:43255b99$0$29294$...
> "Dag Sunde" <> wrote in message
> news:cIbUe.5329$...
>> "dirk" <dd> wrote in message
>> news:4321410e$0$10956$...
>> > Hello,
>> > i gave made some code in VBA for Excel.
>> > i want to make a webpage with the same examples as my excel file, so i
>> > think
>> > i will need javascript (serverside?)
>> > how do i begin?
>> > are there some good sites?

>>
>> Are we to understand that you want a web page that shows/execute
>> som mathematical calculations based on some user input?
>>
>> You can do this serverside in any language supported by your
>> webserver by posting the form with the input-values back to
>> your server-script, let it do the calculations and generate
>> the result page back to the browser.
>>
>> If you do it serverside I suggest using IIS, since you obviously
>> are familiar with VBA witch are very close to VBScript. ASP pages
>> can be coded in VB-Script.
>>
>> Or... You can choos to write all your calculations in JavaScript
>> as functions in the web-page itself, and do all of the work in
>> the users browser (clientside).
>>
>> If you choose the last alternative (I would), then this is the
>> right NG to ask.
>>


> so yes,
> i want to do it by using javascript (client side)
> what do you mean by "the right NG to ask"?
>
> can you give me some examples for writing an inputbox and a commandbutton
> on
> a html page,
> then returning the value of this inputbox by deviding it by 3 for example?
>
> are there some good sites where i can study this?
> thank you


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Divide</title>
<script type="text/javascript">
function divideBy3() {
var myNum = document.getElementById("myNumber").value;
var myResult = document.getElementById("result");
myResult.value = myNum / 3;
return true
}
</script>
</head>

<body>
<label>Number to divide: </label>
<input type="text" id="myNumber" value="" />&nbsp;
<input type="button" id="cmdDivide" value="Divide by 3"
onclick="divideBy3();"/><br />
<label>Result: </label>
<input type="text" id="result" value="" />
</body>

</html>

--
Dag.


 
Reply With Quote
 
ASM
Guest
Posts: n/a
 
      09-12-2005
dirk wrote:
>
> can you give me some examples for writing an inputbox and a commandbutton on
> a html page,
> then returning the value of this inputbox by deviding it by 3 for example?


<html>
<form name="form_1">
<p>Enter a number here :
<input type=text onchange="result.value=this.value/3">
and click outside (on page)
<input type=text name="result">
<hr>
<p>number 1 :
<input type=text name="num1" size=5>
<select name="choiss">
<option>Operator
<option> +
<option> -
<option> :
<option> x
</select>
number 2 :
<input type=text name="num2" size=5>
<input type=button value="calcul" onclick="calc()">
<input type=text name="total" size=6>
</form>
<script type="text/javascript">
function calc() {
var f = document.forms['form_1'];
var n1 = f.num1.value;
var n2 = f.num2.value;
var op = new Array('','+','-','/','*');
var i = f.choiss.selectedIndex;
if(i==0) alert('you din\'t select an operator');
else
f.total.value= eval(n1+op[i]+n2);
}
</script>
</html>

> are there some good sites where i can study this?
> thank you
> "Dag Sunde" <> wrote in message
> news:cIbUe.5329$...
>
>>"dirk" <dd> wrote in message
>>news:4321410e$0$10956$. ..
>>
>>>Hello,
>>>i gave made some code in VBA for Excel.
>>>i want to make a webpage with the same examples as my excel file, so i
>>>think
>>>i will need javascript (serverside?)
>>>how do i begin?
>>>are there some good sites?

>>
>>Are we to understand that you want a web page that shows/execute
>>som mathematical calculations based on some user input?
>>
>>You can do this serverside in any language supported by your
>>webserver by posting the form with the input-values back to
>>your server-script, let it do the calculations and generate
>>the result page back to the browser.
>>
>>If you do it serverside I suggest using IIS, since you obviously
>>are familiar with VBA witch are very close to VBScript. ASP pages
>>can be coded in VB-Script.
>>
>>Or... You can choos to write all your calculations in JavaScript
>>as functions in the web-page itself, and do all of the work in
>>the users browser (clientside).
>>
>>If you choose the last alternative (I would), then this is the
>>right NG to ask.
>>
>>--
>>Dag.
>>
>>

>
>
>



--
Stephane Moriaux et son [moins] vieux Mac
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Beginners Question CHAZDG Wireless Networking 2 11-10-2005 12:29 AM
Beginners Question Regarding Static Web Pages Roger stevenson ASP .Net 8 07-01-2005 04:05 AM
Stupid beginners question: Windows Username Child ASP .Net 2 06-01-2005 08:03 PM
web service beginners question Mike P ASP .Net 3 09-21-2004 01:50 PM
Beginners question about DataGrid and page selection Alex ASP .Net 1 04-19-2004 08:36 PM



Advertisments
 



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 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57