By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,600 Members | 1,887 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,600 IT Pros & Developers. It's quick & easy.

Assimilate function

P: n/a
Hello,
I want to call a function. But this should only be possible when a
value is reached. For example k=3 function is true, then loading the
other function or my first idea another side, or either would be
interesting without to take any button.

Many thanks
Jul 20 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
Was hoping to help you but your question was not clear. Can you rephrase and
include an example if possible.

--
Elias
http://lgwm.org/

"BjoernJackschina" <ja*******@hotmail.com> wrote in message
news:a2*************************@posting.google.co m...
Hello,
I want to call a function. But this should only be possible when a
value is reached. For example k=3 function is true, then loading the
other function or my first idea another side, or either would be
interesting without to take any button.

Many thanks

Jul 20 '05 #2

P: n/a
BjoernJackschina wrote:
I want to call a function. But this should only be possible when a
value is reached. For example k=3 function is true, then loading the
other function
Are you looking for this?

if (k() == 3)
otherFunction();
or my first idea another side,
You mean either `site', `page' or better -- `document'.
or either would be interesting without to take any button.


Due to your improvable use of the English language, I can hardly
understand what you are writing about.[1] Are you looking for
some kind of redirection?
PointedEars
___________
[1] As for me, feel free to post/mail in German if this helps.
I would post a summary in English.
Jul 20 '05 #3

P: n/a
Hello,
here is an example:
function count(f){
var co=0;
for(var i=0;i<f.elements.lenght;i++){
if(f.elements.type == "radiobutton"){
co++;}
}
if (co >= 3){
--> here should be calling the other function
}
....

<input type="button" value="co" onclick="count(this.form)">

Thank you
Jul 20 '05 #4

P: n/a
Hello,
it means redirection another page or calling another function.
Jul 20 '05 #5

P: n/a
BjoernJackschina wrote:
here is an example:
function count(f){
var co=0;
for(var i=0;i<f.elements.lenght;i++){
if(f.elements.type == "radiobutton"){
co++;}
}
if (co >= 3){
--> here should be calling the other function
}
....

<input type="button" value="co" onclick="count(this.form)">


I can still only guess what you are trying to accomplish.

I understand that you want to retrieve the number of radio buttons
in a form and if that exceeds a specific value you want to call a function:

// var f = document.forms[...];
var co = 0;

for (var i = 0; i < f.elements.length; i++)
{
co += (f.elements[i].type == "radio"); // false ~ 0, true ~ 1
}

if (co > 2)
{
otherFunction();
}

What about users without client-side JavaScript support?
PointedEars
Jul 20 '05 #6

P: n/a
Thomas 'Ingrid' Lahn wrote:
BjoernJackschina wrote:
I want to call a function. But this should only be possible when a
value is reached. For example k=3 function is true, then loading the
other function

[...]
___________
[1] As for me, feel free to post/mail in German if this helps.
I would post a summary in English.


Björn mailed me then and AIUI he only wanted to know how you can
call a function and pass arguments to it, wondering especially
about the use of quote characters in arguments. Since he did not
replied to my explanation until today, I guess it was sufficient
and gave him a lot of material to read on :)
PointedEars
Jul 20 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.