dcsimg
i want to have the correct syntax of this expression. if(!history.back()){window.close()}.
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Ali_Hadji
Posted On:   Friday, November 28, 2003 08:28 AM

what is the return value of the method history.back();
thanks for help.

Re: i want to have the correct syntax of this expression. if(!history.back()){window.close()}.

Posted By:   Firat_Tiryaki  
Posted On:   Sunday, November 30, 2003 03:02 PM

An interesting question and has a long answer, but shortly the back() method of history is void, it doesn't return a value, but if you use in a condition with not ("!"), the browser bypasses the method and the condition always returns true even if you didn't go back while navigating. So it's not logical to use it as a conditional statement. Tell us what you want to do and get a more efficient help. Also history has a property of length, use it if it works in your situation. That is ->(history.length).
About | Sitemap | Contact