Set homepage script throwing error

A

arbpen

I find it superfluous to have a 'Make Us Your Homepage' link/script,
but there it is, I have boss who wants it.

Anyway, this is the snippet that is throwing an error:

<li style="border:0"><a href="#st=100&amp;zip=18&amp;cities=18,19"
onclick="this.style.behavior=\'url(#default#homepage)\';this.setHomePage(\'http://www.nextblock.com\');">Make
nextBlock! my homepage</a></li>

IE6 is reporting an error on line 426 character 21, invalid character.

The URL is
<http://atlas.nextblock.com/files/beta2/test.asp?zip=18&st=100&cities=18,19>

Any help would be greatly appreciated. TIA
 
W

web.dev

arbpen said:
<li style="border:0"><a href="#st=100&amp;zip=18&amp;cities=18,19"
onclick="this.style.behavior=\'url(#default#homepage)\';this.setHomePage(\'http://www.nextblock.com\');">Make
nextBlock! my homepage</a></li>

1. There's no need to escape the single quotes.
2. The 'this' keyword used in this context refers to your anchor
element, which in turn does not have a setHomePage method.
Any help would be greatly appreciated. TIA

Why not check with microsoft's documentation on how to use it? They
even have an example:

http://msdn.microsoft.com/library/d...r/behaviors/reference/methods/sethomepage.asp

And finally, I don't suppose your boss cares that this is a propietary
method, therefore "setting the home page" this way will only work for
IE.
 
A

Adrienne Boswell

web.dev wote:
1. There's no need to escape the single quotes.
2. The 'this' keyword used in this context refers to your anchor
element, which in turn does not have a setHomePage method.

Yup, that did the trick.
Why not check with microsoft's documentation on how to use it? They
even have an example:

http://msdn.microsoft.com/library/d...r/behaviors/reference/methods/sethomepage.asp

And finally, I don't suppose your boss cares that this is a propietary
method, therefore "setting the home page" this way will only work for
IE.

She also doesn't care that opening a new window breaks the back button,
that users already have HOME/END buttons, and that not everyone has the
same screen size she does.

Thank you for your help. Hope you have a great weekend.
 

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

Staff online

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,071
Latest member
MetabolicSolutionsKeto

Latest Threads

Top