Jump to content

onclick() functions


freddixon

Recommended Posts

Hi,

Quick question for anone who knows more about PHP / Javascript than me.

I have a line of code as below in one of my PHP files:

echo "<select name='left' id='left' size='1' onChange='get-flag_middle(left.value)'>";

Can I add a second / third action to this line so that I have got onChange='xxxx' onChange='yyy' etc?

If not how can I do it?

Thanks a lot.
Link to comment
Share on other sites

[!--quoteo(post=352126:date=Mar 6 2006, 01:00 PM:name=kenrbnsn)--][div class=\'quotetop\']QUOTE(kenrbnsn @ Mar 6 2006, 01:00 PM) [snapback]352126[/snapback][/div][div class=\'quotemain\'][!--quotec--]
This has nothing to do with PHP and everything to do with Javascript. Please ask it in the Javascript forum.

Ken
[/quote]

moving this to the javascript forum...

to answer your question, though, all you'd have to do is treat the action within the onclick call as normal code:
[code]
<a href="whatever" onclick="function1(); function2(); function3();">whatever</a>
[/code]

hope this helps
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.