Jump to content

Function not working on onFocus but works in <a href... Why?


StefanRSA

Recommended Posts

I have a function:

<script type="text/javascript">
function viewcalendar() {
kalendarik = window.open("/member/php_calendar/calendar.php", "kalendarik" , "location=0, menubar=0, scrollbars=0, status=0, titlebar=0, toolbar=0, directories=0, resizable=1, width=200, height=240, top=50, left=250");
  kalendarik.resizeTo(200, 240);
  kalendarik.moveTo(250, 50);
}
</script>

I have a text field that is READONLY. Next to the field is a <a href to call the function and it is working correctly:

<input name="fname" id="fid" READONLY value="" type="text" ><a href="javascript:viewcalendar()"> Click Here</a>

 

I also want the onFocus to be called when a user click on the field but it is not working??? Why not?

<input name="fname" id="fid" READONLY value="" type="text" onClick="viewcalendar();"> 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.