2 Replies Latest reply on Dec 2, 2013 9:00 AM by Steve Sommers

    onChange vs. onclick

    kt03 Level 1

      this code is worked fine with onchange event.  Instead of onchange, i want to have the link below(<a id="myLink" href="##" onclick="whatsUp();">link text</a>) and work the same as onchange, meaning when i
      click on the link text , i need to get the url.t_item?


      <script type="text/javascript">
      function whatsUp() {
      function show() {

      <cfif isDefined("form.t_item")>

      <cfdump var="#form#"><br />

      <cfform name="medform" action="#cgi.SCRIPT_NAME#">
      Item name: <cfinput autosuggest="cfc:cfc.gg.lookupArt({cfautosuggestvalue})" type="text" name="t_item" size="50" typeahead="yes"  onChange="whatsUp()">

      <a id="myLink" href="##" onclick="whatsUp();">link text</a>