Web Design and Development Forums

[SOLVED] Javascript Ajax problem

This is a discussion on "[SOLVED] Javascript Ajax problem" within the JavaScript Forum section. This forum, and the thread "[SOLVED] Javascript Ajax problem are both part of the Program Your Website category.


Go Back   Webforumz.com > Program Your Website > JavaScript Forum

Welcome to Webforumz.com.
Register Now Register now!

Closed Thread
 
LinkBack Thread Tools Rate Thread
Old Oct 1st, 2007, 06:14   #1 (permalink)
New Member
 
Join Date: Oct 2007
Location: Woerden
Age: 15
Posts: 2
Unhappy [SOLVED] Javascript Ajax problem

I have got the following problem:
I send a Ajax request to a php file. If that returns it has to be put inside a div. Problem is, it's not the same div all the time. Now I giva a variable with the right div's id. The variable does get in the function. But nothing changes. The rule: document.getElementById(idVanTeBewerkenObject).inn erHTML = xmlHttp.responseText;
isn't executed. You can find the whole code here: http://www.excelsior-woerden.nl/speeldozen/SpryAssets/HermanTabbedPanels.js

If I replace idVanTeBewerkenObject by 'mainContent' (the id of a div) it works.

Help please,
Herman
Hermanusbanken is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Old Oct 1st, 2007, 13:49   #2 (permalink)
Elite Veteran
 
karinne's Avatar
 
Join Date: Jan 2007
Location: You know where
Age: 30
Posts: 4,883
Re: Javascript Ajax problem

Moved to Javascript forum.
__________________
a web design portfolio | web non-sense
karinne is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Old Oct 2nd, 2007, 11:22   #3 (permalink)
 
Rakuli's Avatar
 
Join Date: Sep 2007
Location: Australia
Age: 24
Posts: 980
Blog Entries: 2
Re: Javascript Ajax problem

Hi there Hermanisbanken welcome to Webforumz

Having a look at your code, I think that javascript is getting lost in the scope of your variables.

You declare idVanTeBerwerkenObject as a global variable at the top of your page but never actually treat it as such, you use the variable name to pass around in your functions.

Try taking this line

var idVanTeBewerkenObject;

Out of the script entirely and trying again.

Cheers,
__________________
Rakuli

Helping you expand your epiphanies:

pen Source of pen Thoughts
Rakuli is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Old Oct 2nd, 2007, 14:22   #4 (permalink)
New Member
 
Join Date: Oct 2007
Location: Woerden
Age: 15
Posts: 2
Smile Re: Javascript Ajax problem

Yes the variables where the problem. It's fixed now. On http://phphulp.nl/forum/showtopic.ph...=38633&replies you can see how we fixed it.

Anyway tnx.
Herman
Hermanusbanken is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Closed Thread

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Javascript problem Popje JavaScript Forum 2 Jan 24th, 2008 02:51
[SOLVED] AJAX slideshow marSoul JavaScript Forum 2 Jan 9th, 2008 15:19
[For Hire] Expert in Php, Mysql, AJAX, JavaScript, HTML, XML, Smarty , API shaileshgajjar Job Opportunities 0 Jul 13th, 2007 06:10



Latest Updates

All Points SEO Security Advisory - CHECK YOUR SITE NOW!

Creative Coding :: February 2008

Webforumz is sponsored by: WESH UK Web Hosting
All times are GMT. The time now is 17:24.

Sleep Study Scoring :: Free Bet :: Website Templates :: Online Betting :: Bookmakers :: Funny Quotes :: Internet Recruitment Software :: Microsoft CRM Experts :: Online Casino :: Decorated Christmas Trees :: Midwife Forums :: Football Betting :: Ecommerce Software :: Web Hosting :: Football Stats :: Dry Cleaning Collection :: xtreme wales - extreme clothing :: Apuestas :: Sharepoint Consultants :: Website Optimisation :: Office Clearance London :: Sharepoint Experts :: Sports Betting :: Casino :: Website Templates :: Web Design Development India :: Online Gambling

Powered by: vBulletin Version 3.7, Copyright ©2000 - 2008, Jelsoft Enterprises Limited.
© 2003-2008 Webforumz.com : All Rights Reserved
Search Engine Friendly URLs by vBSEO 3.2.0 RC6


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59