ulthane — 2011-12-27T15:00:26-05:00 — #1
i want to have on my page a div where content changes when ppl click on certain links without a full page reload
when searching i've popped up on many similar examples (one of them is this: http://www.willmaster.com/library/web-development/replace-div-content.php
however i find it hard to manage because the content that being replaced is dynamic, big and may have many speical symbols like " or ' which makes the script stop working immediately
Does any1 got any good solution to this?
system — 2011-12-27T15:20:54-05:00 — #2
If the content is dynamic, then depending on how it is generated you could use ajax.
paul_wilkins — 2011-12-27T19:25:22-05:00 — #3
If you want to load the content from separate html pages, the People code examples from Bulletproof Ajax do a nice job of things.
Similar techniques can be applied if you want to retrieve the content via a php page, so that it can customize or or retrieve the content from your database.
ulthane — 2011-12-28T03:35:38-05:00 — #4
i'm not loading the content from different pages its loaded directly from db
i need something small (and simple) like the thing i've posted in the first post, but something that will not cause problems when symbols are used (specially " or ') because the content is dynamic and i dont know when and where such symbols will be used, so i need a script that will take care of that.
thanks for the help.