Im Trying to Change these Key Values to Function

Results 1 to 2 of 2

Thread: Im Trying to Change these Key Values to Function

  1. #1
    Kyle Blair Guest

    Default Im Trying to Change these Key Values to Function

    this is my code that i have that works<BR>but what i have to do is make the x,y,z keys to F7, F8, F9<BR>its kinda important thanks<BR><BR>function showDate2()<BR>{<BR> var cSearchValue=showModalDialog("calendar1.asp",0,"di alogwidth=298px;dialogheight=275px");<BR> <BR> if (cSearchValue != -1 && cSearchValue != null && cSearchValue != "")<BR> { <BR> <BR> document.all.Date.value = cSearchValue<BR> }<BR> <BR>}<BR><BR><BR>var NS = (window.Event) ? 1 : 0;<BR><BR><BR>function checkKey(e)<BR>{ <BR> var code = (NS) ? e.which : event.keyCode;<BR> var key = String.fromCharCode(code);<BR> <BR> {<BR> <BR> if (key == &#039;x&#039;) showDate2();<BR> <BR> if (key == &#039;y&#039;);calculator.asp&#039;,&#039;Calcu lator&#039;,&#039;width=290, height=270, toolbar=no, statusbar=no,resizeable=no&#039;);<BR> <BR> if (key == &#039;z&#039;) document.Expense_Form.submit() <BR> }<BR>}<BR><BR>function hotKey(key) <BR>{<BR> this.key = key;<BR>}<BR><BR>if (NS) document.captureEvents(Event.KEYPRESS)<BR>document .onkeypress = checkKey;<BR><BR>var ar = new Array();<BR>ar[ar.length] = new hotKey(&#039;x&#039;);<BR>ar[ar.length] = new hotKey(&#039;y&#039;);<BR>ar[ar.length] = new hotKey(&#039;z&#039;);<BR>

  2. #2
    Join Date
    Dec 1969

    Default DON'T CROSS POST

    it&#039;s very impolite.<BR><BR>and you can&#039;t grab F keys anyway

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts