javascript - Ajax onchange disables second ajax call onclick -


i have situation have following code:

<input type="text" onchange="javascript:ajax01()"> <a href="javascript:ajax02()">text</a> 

both ajax-functions work - except when have text-field active , click on link. ajax01 executed, not ajax02.

if have textfield active, click outside textbox, ajax01 fires, , click link , ajax02 fires. both successfully.

but how ajax02 fire simultaneously ajax01 if click link directly being active in f

try (notice removed javascript: input element. in experience, needed when used in links href attribute. also, there no need force javascript href attribute. should located withing on...() function.

<input type="text" onchange="ajax01();"> <a href="javascript:void(0)" onclick="ajax02();">text</a> 

Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -