Welcome to Discuss Everything Forums...

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed.


 

Tags for this Thread

+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    patabugen
    patabugen's Avatar
    Guest

    When I make an ajax call and put the returned HTML (includes a <form> into a <div>...

    ...it's all invisible. Why? I have a table and I'd like to replace one of the rows with updated information, each row contains a <Form> for submitting the new data.

    I can submit the form fine, and receive the new HTML fine and Firebug reckons it's been put into the <td> properly. But all you see is the existing contents disappearing.

    I've tried document.getElementById('id').style.visibility = visible; which I seem to remember I had to do last time I played with ajax a while back - but it doesn't seem to work. Any thoughts?
    The problem is not that the object isn't there, it's that it's invisible. IE dosen't update it's local source file with Ajax, and FireBug is saying it's there. Also if I do someObject.innerHMTL = "<form>Hello World</form>"; it is invisible and I cant seem to make the form and it's contents visible!

  2. #2
    Chris C
    Chris C's Avatar
    Guest
    Post the section of code that is updating the table, and we can probably help you better. Or of course point us to a web page, which we can see the AJAX code.

    Personally, I remember believing this was true, but I realized that I had to delete the child node and re-add it to get it to work in IE and Firefox. And I found that my AJAX was on the incorrect node when it was trying.

    Here's some example code of updating a DIV with the current date/time.
    <html>

    <HEAD>
    <script language="Javascript">

    function dateupd() {
    //alert(document.getElementById("myText").style.colo r);
    curDate = new Date();
    dateStr = "Today is " + curDate.getDay() + "/" + curDate.getMonth() + "/" + curDate.getFullYear();

    // NOTE: You can remove this line, since it is only displaying the time in addition to the date
    dateStr = dateStr + " " + curDate.getHours() + ":" + curDate.getMinutes() + ":" + curDate.getSeconds();

    document.getElementById("myDate").innerHTML = dateStr;
    //document.write(colours[index]);
    ref2=window.setTimeout("dateupd()",1000);
    }
    </script>
    </HEAD>
    <body onload="dateupd();">
    <h3 id="myDate" style="text-align: right;">00/00/0000</h3>
    </body>
    </html>

  3. #3
    cjconnor24
    cjconnor24's Avatar
    Guest
    What i would do is check the source code in internet explore or firefox once the update is done.

    if the updated data does appear in the source code, it's definetly your CSS somewhere.

    Otherwise go back and double check your javascript and ajax call.

    hope you get it

 

 

Quick Reply Quick Reply

Click here to log in


In what corner do we have Search box?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Does it make sense? html question about <div></div>?
    By NumNoum in forum Discuss HTML
    Replies: 0
    Last Post: 02-13-2011, 04:24 AM
  2. Replies: 0
    Last Post: 01-18-2011, 04:09 AM
  3. How to have HTML Form information returned?
    By TJK in forum Discuss HTML
    Replies: 0
    Last Post: 07-05-2009, 05:12 PM
  4. what is the full form/name of (HTML) div tag ?
    By Negi in forum Discuss HTML
    Replies: 1
    Last Post: 06-18-2009, 11:48 AM
  5. Replies: 0
    Last Post: 03-22-2009, 02:15 AM

Bookmarks

Posting Permissions

  • You may post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts
  •