Jump to content
MakeWebGames

Updating an area with new text inputed by user?


Sim

Recommended Posts

Re: Updating an area with new text inputed by user?

Check out my AJAX preferences, I did exactly what your looking for with the all of it, but namely the User Signatures - which will probably help you most.

* Keep in mind I use the Dojo Toolkit for the AJAX calls here.

http://criminalexistence.com/ceforums/h ... 85#p121985

If you need more help, you know where to catch me, I'm always in IRC...

Link to comment
Share on other sites

Re: Updating an area with new text inputed by user?

Copied and pasted with permission to preserve the continuity of the thread.

[20:58] <floydian> what's confusing ya about what I said in the forum?

[20:58] <Sim> I dunno. what I do with innerHtml?

[20:59] <floydian> first, you need to "get" the element you're putting the response into

[20:59] <floydian> have you done that?

[20:59] <Sim> hmm No. I don't know where to even begin with ajax. I downloaded an ajax chat example to try to learn from but it doesn't use mySQL. it uses a txt file.

[21:00] <floydian> (and to make the thread make sense, I'll post what's said here so it closes up that thread nicely)

[21:00] <Sim> Sounds good to me.

[21:00] <floydian> it sounds like you need to study some ajax examples then

[21:01] <floydian> there's lots of them out there

[21:01] <Sim> http://ce.pastebin.com/m26c7883c

[21:02] <Sim> I can figure out how to write to mySQL file without refreshing page.

[21:02] <Sim> just not read from and update from mySQL

[21:03] <Sim> Is it as simple as echoing? ;]

[21:03] <floydian> #

[21:03] <floydian> function ajax_read(url) {

[21:03] <floydian> when you do that function call

[21:03] <floydian> the URL you put in there

[21:03] <floydian> will be executed as a normal page would

[21:03] <floydian> and yes, anything you echo from that file that is executed

[21:04] <floydian> would be placed into the web page

[21:04] <floydian> by

[21:04] <floydian> document.getElementById("chatwindow").innerHTML = xmlhttp.responseText;

Link to comment
Share on other sites

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.   Paste as plain text instead

  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...