Return problem

V

vinodkus

Dear Sir/Madam
I have strange type of problem
<script type="text/javascript" language="javascript">
var x =4;
if(fun1())
{
alert('ok')
}
else
{
alert('Not ok')
}
function fun1()
{
return 'x == 5';
}

</script>

in if condtinon I have to use x==5 but not simple way I have to use
function
please help me
Thanks in advance
 
G

Gregor Kofler

(e-mail address removed) meinte:
Dear Sir/Madam
I have strange type of problem
<script type="text/javascript" language="javascript">
var x =4;
if(fun1())
{
alert('ok')
}
else
{
alert('Not ok')
}
function fun1()
{
return 'x == 5';
}

return x == 5;

Gregor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,151
Latest member
JaclynMarl
Top