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

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top