Author Topic: Javascript..multiple functions  (Read 846 times)

Offline ZadoAsh

  • Level 10
  • *
  • Posts: 62
  • Reputation: +0/-0
    • View Profile
    • Families of New York
Javascript..multiple functions
« on: June 24, 2008, 07:42:23 AM »
I'm trying to call multiple  functions at the same time and I seem to be getting an annoying error.

I've tried:
This:
<a href=\"#\" onclick=\"videosContent('all');  headerMiddle('all', 'videos');\">All</a>
This:
<a href=\"#\" onclick=\"return videosContent('all');return headerMiddle('all', 'videos');\">All</a>
And This:
<a href=\"#\" onclick=\"videosContent('all');return headerMiddle('all', 'videos');\">All</a>

And it's not doing what it's meant to do. I know the functions work as well! Rather annoying.

Any help would be appreciated.
« Last Edit: June 24, 2008, 07:49:44 AM by ZadoAsh »

Offline ZadoAsh

  • Level 10
  • *
  • Posts: 62
  • Reputation: +0/-0
    • View Profile
    • Families of New York
Re: Javascript..multiple functions
« Reply #1 on: June 24, 2008, 07:49:20 AM »
Just for extra knowledge.

The two functions change the content on the page. It uses XMLHTTP Request, and both functions share my xmlhttp function.

I don't know if that makes any difference that I'm requesting two XMLHTTP requests at the same time. If that is the problem them I can simply start the page over and make the whole page content change rather than two individual pieces

Offline mobeamer

  • Level 13
  • *
  • Posts: 93
  • Reputation: +0/-0
    • View Profile
    • Untouchable Games
Re: Javascript..multiple functions
« Reply #2 on: June 24, 2008, 03:18:55 PM »
You'll definitely need to use two different xmlHTTP objects.

This happens when you make a nearly synchronized call to Ajax objects.




I build games
My Blog

Offline ZadoAsh

  • Level 10
  • *
  • Posts: 62
  • Reputation: +0/-0
    • View Profile
    • Families of New York
Re: Javascript..multiple functions
« Reply #3 on: June 25, 2008, 04:11:13 AM »
ahh, ok cheers.

Thanks a lot =]

 


SimplePortal 2.3.3 © 2008-2010, SimplePortal