Link to home
Start Free TrialLog in
Avatar of psarun85
psarun85

asked on

how to know is setHomepage is success or not in IE.

using this code we can set the home page as http://www.searchmore.in. but my question is it is asking for do set as home page or not.  how to detect the result given by user as yes or not.  because for my code. i need to continue only if the user accepts to set that page as home page.

kindly help me in this issue please.
document.body.style.behavior='url(#default#homepage)';
   document.body.setHomePage('http://www.searchmore.in');

Open in new window

Avatar of sh0e
sh0e


try{
document.body.style.behavior='url(#default#homepage)';
   document.body.setHomePage('http://www.searchmore.in');
   }
   catch(e){
   alert(e);
   }
}

Open in new window

Avatar of psarun85

ASKER

hi sh0e,
thanks for commenting my question. but.......
do you thing  this will be answer, how did you thing like this..

its a simple fact , catch will be executed only when some exception arises, but it the try statement it asks for to set as home page or not.. then how come the exception will arise. only two possiblities.. yes or no.

experts kindly  help me. please
If there is an error, such as lack of permissions, try catch would catch it.

alert(document.body.isHomePage('http://searchmore.in'));
thanks
but again the problem..

this function always returns false only.



even though the homepage is searchmore.in.. but its not returning the positive reply...

always negative.. kindly  analyse this.
ASKER CERTIFIED SOLUTION
Avatar of sh0e
sh0e

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial