Jump to content

Multiple functions from one event handler


ridley1012

Recommended Posts

Hi everyone, I'm fairly new to ajax and currently still trying to get my head a round the logic, I've just managed to create my frst bit of ajax and would like to start on the second. the problem I am having is that I wish the second function to run at the same time as the first, in this case, I want both functions to be called with an 'onchange' event. Is this possible and if so how? Thanks for any help in advance  :D

Link to comment
Share on other sites

Besides AJAX, Javascript runs linearly (as opposed to in parallel with other operations, or what would be called single threaded in other cases), so you can fireoff two functions in an onchange, but they won't execute at the same time.

 

 

onchange="Func1(); Func2();"

Link to comment
Share on other sites

hi corbin, thanks for the reply, I don't need them to run at eaxctly the same time but will they but still work from the same 'onchange'. As what i want is, is to retrieve data from 2 separate places but display it at the same time. I'm finding it hard to explain myself so this is what i have so far, I also want team statistics to be shown below once a team has been selected www.cfc.gemmacollard.com/leagueTeams.php

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.