Quantcast
Channel: Adobe Community : Discussion List - ColdFusion
Viewing all articles
Browse latest Browse all 6243

onChange vs. onclick

$
0
0

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() {
document.medform.t_item.value)
}
function show() {
alert(document.medform.t_item.value)
}
</script>

<cfif isDefined("form.t_item")>

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

</cfif>
   
<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>

</cfform>


Viewing all articles
Browse latest Browse all 6243

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>