|
Posted by Randy Webb on 01/22/06 13:02
one man army said the following on 1/22/2006 12:03 AM:
> In article <tfudnd0VXYeTaU3eRVn-uw@comcast.com>,
> Randy Webb <HikksNotAtHome@aol.com> wrote STUFF
>
>> how to quote
> [yeah, I did not quote 'cause every news reader shows the thread easily,
> anyway.
Who told you that? They were wrong. My newsreader only shows me messages
that I have not already read or choose to mark as unread. And that is
the default configuration.
And as has been pointed out about comp.lang.php, the results typically
are the same in comp.lang.javascript where not quoting or top-posting is
very seriously frowned up.
> Why waste lines? - I tried to write Randy back via email but the
> email addr doesn't go. So I post again. ]
That is because I use Mail Controls to prevent unwanted email from
Spammers (not implying you though). As a result, the address I post with
doesn't recieve email from non-AOL members.
> I pulled off the JS->PHP document.body.appendChild() hack, only to find
> that after setting an element in the page to the result of the PHP mySQL
> Query, I read the element with Javascript and it is "not yet changed".
> Some kind of latency problem ( guessing). In other lives I have
> initiated an event (chaining) and then handled the response in the
> subsequent event. I do not know how to do that in this
> HTML/Javascript/PHP combo.
If I am understanding you, after the script gets loaded the page won't
tell you its been changed.
The way I have always gotten around the timing issue with that is to
load data in the .js file and then have the .js file call a function in
the main page.
sample.js:
//js code here
//....
someFunctionToDealWithTheData();
Then, the function will only get called *after* the data has loaded.
> TO make progress I have reverted to a simple form action o nthe intro
> page, with the SQL in a target PHP file, then redirect to the main page
> upon success.
>
> Now I face coding the main page, where I DO want dynamic updates (using
> "dynamically loaded scripts" apparently). I have a simple version
> already, using Javascript only. Simple meaning 500 lines of js. I now
> need the MySQL because the real db engine has deeper requirements than
> my JS demo handles.
Take a look at this page:
<URL: http://members.aol.com/justhikk/ >
It is by no means a complete example and about half the sub-menus don't
work but you can look at the source code and the .js files and see how
it works. It has been so long since I worked on that page that it uses
language= in the script tag. Yikes! But the code does work.
If you have any questions about the code in that page. Why it's the way
it is or any other questions, post back and I will email you from an
email address you can reply to.
--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Navigation:
[Reply to this message]
|