Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HomePage Function and 'what.keyCode'

Status
Not open for further replies.

CuriousGuy

Programmer
Nov 29, 2002
17
0
0
US
Hi,
I have a small window that has four prompts :
Code:
[ul]
[li] Set page as Homepage [/li]
[li] Set BookMark [/li]
[li] Do both of the above [/li]
[li] Neither/None [/li]
[/ul]

In which case, Neither, would close the window.
And 'Both' would launch a funtion where in an if loop, does both the homepage and bookmark function.
Now all the above functions work perfectly, but I have incorporated an OnKey thing, whereby if the user presses H or h, it will launch the Homepage function() and so forth.

Heres where im stuck,
I can set as bookmark & close window upon a key press, yet i can't launch the HomePage function upon a key press.
All i get is a javascript error.

Now since the Homepage function needs a value passed and returned, im thinking that this is a security function to prevent programmers to setting Homepage upon an Onload().

Can anybody help me?

The window and code is available at
Any help at all would be much appreciated
 
I think it is a security function, as i have tried myself and nothing happened.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top