Click here to Skip to main content
15,887,676 members
Home / Discussions / Web Development
   

Web Development

 
GeneralRe: Using Javascript to Change Image Title Attribute Pin
Shog928-Feb-09 8:59
sitebuilderShog928-Feb-09 8:59 
QuestionInternet Explorer 7 Tabs Pin
Brendan Vogt27-Feb-09 21:49
Brendan Vogt27-Feb-09 21:49 
QuestionISAPI + Apache Pin
Bram van Kampen27-Feb-09 14:22
Bram van Kampen27-Feb-09 14:22 
AnswerRe: ISAPI + Apache Pin
Curtis Schlak.27-Feb-09 19:09
Curtis Schlak.27-Feb-09 19:09 
GeneralRe: ISAPI + Apache Pin
Bram van Kampen1-Mar-09 15:45
Bram van Kampen1-Mar-09 15:45 
QuestionBHO with cookies Pin
tsahiB27-Feb-09 7:42
tsahiB27-Feb-09 7:42 
NewsProfessional Outsource Website Design & Development company Pin
petermechele27-Feb-09 6:27
petermechele27-Feb-09 6:27 
QuestionJS and PHP but only one object definition Pin
sortegrip27-Feb-09 5:38
sortegrip27-Feb-09 5:38 
I have a JS that sends a request to a PHP script:
getBlog(alias,numPosts);
The PHP script will create a custom object called $blog, and call the SQL database to get the last posts of the blog.
The blog posts will then be added to the $blog object which will be json encoded and returned to the JS:
echo 'handleResponse('.json_encode($blog).');';
Back in the JS I eval the object and then I have to loop through it and create its JS counterpart.
This is done because the blog object in JS has some member functions I wanna be able to use (like creating styleable DOM nodes filled with member strings).

One of the problems with this is that whenever I remodel the $blog object I must remember to remodel its JS counterpart.

I was thinking that maybe I should only create the object in PHP and then loop through it and echo it as a string.
The string would be formatted for javascript syntaxing.
Then I could use that document as a script src and thus retrieve the JS object definition automatically.
That way I would only have to keep track of the PHP object and of course the SQL.

Have I missed something that would be of use in this situation to more
easily have an object flow from SQL through PHP to JS and back?

Ideally I would want a custom object that only contains the member variables and values (JSON object).
That object would then be equipped with member functions to do DOM stuff when it is in JS,
and it could be equipped with funtions to do SQL stuff when in PHP.
Questionondrop event Pin
cooltoad12327-Feb-09 2:36
cooltoad12327-Feb-09 2:36 
AnswerRe: ondrop event Pin
Curtis Schlak.27-Feb-09 4:20
Curtis Schlak.27-Feb-09 4:20 
GeneralRe: ondrop event Pin
cooltoad12327-Feb-09 4:36
cooltoad12327-Feb-09 4:36 
GeneralRe: ondrop event Pin
Curtis Schlak.27-Feb-09 4:47
Curtis Schlak.27-Feb-09 4:47 
QuestionHow to Create web widgets with ASP.net ? Pin
rok_00726-Feb-09 14:41
rok_00726-Feb-09 14:41 
AnswerRe: How to Create web widgets with ASP.net ? Pin
Expert Coming26-Feb-09 20:59
Expert Coming26-Feb-09 20:59 
QuestionAddressing the *Home* folder - javascript [modified], Yes question revamped. Pin
Smith#26-Feb-09 6:17
Smith#26-Feb-09 6:17 
AnswerRe: Addressing the Root folder - javascript Pin
Johnny ²26-Feb-09 20:44
Johnny ²26-Feb-09 20:44 
QuestionRe: Addressing the Root folder - javascript Pin
Smith#26-Feb-09 22:58
Smith#26-Feb-09 22:58 
AnswerRe: Addressing the Root folder - javascript Pin
Johnny ²27-Feb-09 21:34
Johnny ²27-Feb-09 21:34 
QuestionCan I insert image & button on the right-side of a table? Pin
THA200026-Feb-09 2:33
THA200026-Feb-09 2:33 
AnswerRe: Can I insert image & button on the right-side of a table? Pin
led mike26-Feb-09 4:39
led mike26-Feb-09 4:39 
AnswerRe: Can I insert image & button on the right-side of a table? Pin
Smith#26-Feb-09 6:25
Smith#26-Feb-09 6:25 
GeneralRe: Can I insert image & button on the right-side of a table? Pin
THA200026-Feb-09 10:09
THA200026-Feb-09 10:09 
GeneralRe: Can I insert image & button on the right-side of a table? Pin
Smith#26-Feb-09 23:02
Smith#26-Feb-09 23:02 
GeneralRe: Can I insert image & button on the right-side of a table? Pin
THA200027-Feb-09 3:06
THA200027-Feb-09 3:06 
GeneralRe: Can I insert image & button on the right-side of a table? Pin
Smith#27-Feb-09 4:03
Smith#27-Feb-09 4:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.