User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 429,841 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,831 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 703 | Replies: 3
Reply
Join Date: Oct 2007
Posts: 6
Reputation: priyapratheep is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
priyapratheep priyapratheep is offline Offline
Newbie Poster

getElementById

  #1  
May 14th, 2008
Hello friends

In my form I am using two AJAX functions..

Both are working fine...

Problem is both are displying in one place..I want to display it in different locations...

I used
  1. <div id="txtHintGrade"></div>
  2. <div id="txtHint"></div>


txtHindGrade for first
  1. document.getElementById("txtHindGrade").innerHTML=xmlHttp.responseText;
  2. <span id=\"txtHindGrade\"></span>

and

txtHint for the second
  1. document.getElementById("txtHint").innerHTML=xmlHttp.responseText;
  2. <span id=\"txtHint\"></span>


Both are displaying in one place where txtHint is given

please help

thanks
Last edited by peter_budo : May 15th, 2008 at 4:16 am. Reason: Keep It Organized - please use [code] tags
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Mar 2008
Posts: 117
Reputation: Thirusha is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 13
Thirusha Thirusha is offline Offline
Junior Poster

Re: getElementById

  #2  
May 15th, 2008
Are u calling the two in the same ajax call, if u are the last one always gets fired.

can u provide some more code.
Reply With Quote  
Join Date: Aug 2006
Location: Noida, India
Posts: 158
Reputation: Luckychap is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 17
Luckychap's Avatar
Luckychap Luckychap is offline Offline
Junior Poster

Re: getElementById

  #3  
May 15th, 2008
check if u have added any CSS class in which u have set property like position: absolute; for the two divs.

check it out
Last edited by Luckychap : May 15th, 2008 at 8:15 am.
Reply With Quote  
Join Date: Jan 2007
Posts: 2,556
Reputation: MidiMagic is on a distinguished road 
Rep Power: 7
Solved Threads: 115
MidiMagic's Avatar
MidiMagic MidiMagic is offline Offline
Posting Maven

Re: getElementById

  #4  
May 16th, 2008
You don't have anything between the opening and closing span tags. This causes the tag to fail to render at all.
Daylight-saving time uses more gasoline
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb JavaScript / DHTML / AJAX Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum

All times are GMT -4. The time now is 6:28 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC