Click to See Complete Forum and Search --> : set homepage? AARRGGHHH!!


azz
07-11-2003, 09:09 AM
ok, what is up with this!

I'm trying to set a page as a homepage in
IE 6 using the javascript fn:

function setHome(homepage){

if (document.all){
homepage.style.behaviour='url(#default#homepage)' ;
homepage.setHomePage("http://www.tntmagazine.com/uk/");
alert('DONE! Thank you!');
return false; }

}

and calling it from a simple onClick:

<a style="font-size: 8pt;" href="#" onClick="return setHome(this);" id="buttons" >Set Homepage</a>

but MAN, can I get it to work??? NO!!

keep getting an error message saying 'Object does not support this property or method' on the following line:

homepage.setHomePage("http://www.tntmagazine.com/uk/");

and I can't for the life of me see why! (double quotes recent addition, doesn't work with single quotes either)

any ideas?

Cheers

azz

Khalid Ali
07-11-2003, 09:29 AM
Take a look at this link and see what yu have wrong..

http://68.145.35.86/skills/javascripts/MakeItYourHomePage.html

azz
07-11-2003, 09:32 AM
dunno, dude - looks exactly the same to me xpt you're passing the URL as a varible into the fn.

I'll give that a go, but don't think it's my problem....

cheers, tho

azz

azz
07-11-2003, 09:48 AM
Nope.

Gave it a go, but didn't make any difference.

any other ideas?

azz

Khalid Ali
07-11-2003, 09:57 AM
I am using IE 6 as well, are you sure that JavaScript is even enabled in your browser..:D

azz
07-11-2003, 09:59 AM
:D

nice try!!

yeah - it is...

ok check this out and see if it works for you.

http://www.tntmagazine.com/uk/newHomePageSet/default_withclassies.asp

cheers dude!

azz...

Khalid Ali
07-11-2003, 10:05 AM
Interesting...it does not work for me as well..try losing

href="#" # from href, leave it empty I am thinking this will do it.

azz
07-11-2003, 10:14 AM
alrighty - gave that a try, but it links then to my original default.asp page...

url reads:

http://www.tntmagazine.com/uk/newHomePageSet/default_withclassies.asp

but with an empty href in the link it jumps to

http://www.tntmagazine.com/uk/newHomePageSet/

which has a different page as the default.asp...

hence no go... THIS IS SO WIERD!!!

azz

:confused: :confused: :confused:

azz
07-11-2003, 10:17 AM
ok, and have tried putting the full URL of the current page in the HREF as well, but no go either!

wierdy wierdy azz

azz
07-11-2003, 10:22 AM
wouldn't have anything to do with the fact that it's in an include file, would it.

would't think so, as both link and script are in same include file and, well, they get served up in one big chunk to the browser anyway.

azz rambling ... sorry ;)

azz
07-11-2003, 10:44 AM
yeah ok figured it out

TRANSATLANTIC SPELLIN OF BEHAVIOUR (BEHAVIOR)!!!

GRRRRR!!!!!

:rolleyes:

anyway

thanks for all your help anyway!!

nice one!

azz