/    Sign up×
Community /Pin to ProfileBookmark

moving the script to head section

Hi I am trying to move the following scripts to the head section not sure on how the onclick will work once moved to the head

<logic:iterate id=”element” name=”accountSuggestions”>
<a href=”#” onclick=”javascript:selectNodeName()</a><br />
</logic:iterate>

thanks
pankaj

to post a comment
JavaScript

4 Comments(s)

Copy linkTweet thisAlerts:
@KorMar 04.2008 — correct syntax:
<i>
</i>&lt;a href="#" onclick="selectNodeName();return false"&gt;click me&lt;/a&gt;

Should work the same, no matter where the function selectNodeName() in it's script code is written.
Copy linkTweet thisAlerts:
@Pankaj_Sharma11authorMar 04.2008 — I am actually trying to write a function which will bw called for each item in the collection not sure of how to write one please help
Copy linkTweet thisAlerts:
@KorMar 04.2008 — post the code.
Copy linkTweet thisAlerts:
@Pankaj_Sharma11authorMar 05.2008 — <div class="copy col_width3 col_left">

<strong>choose one of these:</strong><br /><br />

<logic:iterate id="element" name="accountSuggestions">

<!--<a href="#" onclick="javascript:selectNodeName('<bean:write name="element" property="userPart" />','<bean:write name="element" property="nodeName" />','<bean:write name="element" property="vendorDomain" />');" class="link" id="<bean:write name='element' property='nodeName' />"><bean:write name="element" property="userPart" />@<bean:write name="element" property="nodeName" />.<bean:write name="element" property="vendorDomain" /></a><br />-->

<a href="#" id="<bean:write name='element' property='nodeName' />" class="link" ><bean:write name="element" property="userPart" />@<bean:write name="element" property="nodeName" />.<bean:write name="element" property="vendorDomain" /></a><br />

</logic:iterate>

<br /><br />

</div>
×

Success!

Help @Pankaj_Sharma11 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.7,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...