![]() Using it via onClick() instead of onLoad()Īn example could be provided in the Sample_Dynamic_Frame.zip for your inspection, but didn't find a means to attach it To be resolved: calling updateContent() with a filename and Notice:- use single quotes in the outer javascript and ONLY double quotes in the dynamic php data.and we drop in/outof PHP as necessary to access the dynamic data.the javascript to use the dynamic data must be in this same file.the php data MUST contain its own css styling (if content is in a frame).the first thing in that file MUST be the.the webpage to be modified MUST be a phtml or some php file.Now our javascripts can get to the PHP globals like this: $textMsgPHP = returnContent('dummy_frame_data_1.txt') $msg2 = returnContent('dummy_frame_data_0.txt') $msg1 = returnContent('dummy_frame_data.txt') preload the dynamic contents now for use later in the javascript (somewhere) Into globals for later access - like this: Error opening source file :(\n' # $filename!\n" ![]() To the content: **foo.html becomes foo.phtml**Īnd we add to the top of that page. We change the webpage in question into a PHTML type to allow the server side PHP access Golly gee we don't need PHP to do that now do we! But that creates a structure for Then we can alter the display with a simple Y.="#00ee00" // visual confirmation that the updateContent() was effectiveĪssuming we have an html file with the ID="frameContent" somewhere, create a default, simplistic alteration usinga fixed string. ![]() Y.="red" // demonstration of failure to alter the display Var frameObj = document.getElementById("frameContent") The objective is to get some dynamic info (say server configuration items) from the server into the Javascript environment so it can be used when needed - typically this implies DHTML modification to the presentation.įirst, to clarify the DHTML usage I'll cite this DHTML example: CLEARLY the two just cant interact.īut - good news it can be made to work and here's how. ![]() We all grew up knowing that Javascript ran on the Client Side (ie the browser)Īnd PHP was a server side tool (ie the Server side). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |