Bill, I have posted this same question in one other spot, and so far you are the first one to reply. I thank you for that. Maybe there is hope after all!
I'm currently not using any GET's at all -- I'm not passing anything in the URL at this time; I'm currently using only $_SESSION variables. The left frame is populated by resource_left.php, and the right frame is populated by resource_right.php. The current code for resource_left.php is shown below as an example (both are the same, just focusing on a different side of the total frame): <? include('application.php'); init(); include('./db.php'); session_start(); $current_said=$session_set_array[$session_curr_array_member]; $server_path="[snipped out]"; $resource_path="DISSERTATION_PILOT_STUDY/docs/"; //find out additional information about the resource $query="SELECT nameid_left,docid_left FROM diss_set_assign WHERE said='$current_said'"; $result=mysql_db_query("$db","$query") or die(query_fail("$query")); $data=mysql_fetch_array($result); $resource_nameid_left=$data['nameid_left']; $resource_docid_left=$data['docid_left']; $resource_idselector_left = "#ID".$resource_nameid_left; $query="SELECT docalpha,resource_name FROM diss_docinfo WHERE docid='$resource_docid_left'"; $result=mysql_db_query("$db","$query") or die(query_fail("$query")); $data=mysql_fetch_array($result); $resource_alpha=$data['docalpha']; $resource_name=$data['resource_name']; //build & include URL $resource_url=$server_path.$resource_path.$resource_alpha."/".$resource_name."#".$resource_nameid_left; //highlight desired person name -- don't know how to do this yet header("location: $resource_url"); ?> Bill wrote: > > Long description, so I'm not sure exactly what you're doing, so I'll restate my > understanding. > > You have a frameset with multiple pages. Pages are called via PHP. Each page > may be the same but may need to highlight a different name. You want to > highlight using CSS and IDs. So, far, your understanding is correct -- unless there is another option for highlighting dynamically that doesn't involve CSS and ID Selectors. > > At heart, here's my recommendation. > > Each page in the frame is called via php, let's call it get_page.php > > Each page has a different highlight, somehow php must get to know that, maybe as > a result of a survey, etc. For convenience, let's say your surveys want to > highlight 1234 on the first page, and 5678 on the second. That's the general idea, but not as the result of the survey. Pointing out the two person names is the entire basis for doing the survey -- to gather judgments about the two names by comparing them and their surrounding contexts. > > Don't know your survey mechanism, so we'll use a "Get" request as an example. > So, the first page will be get_page.php?id=1234 and the second page will be > get_page.php?id=5678 I'm using mysql to determine the specific ID's, as I explained in my message, and as shown in my code above. > > Then, in the get_page.php we have the normal css code and we'll add some php to > it: > > At the top of get_page.php somewhere we have: > > <?php > $id=$_GET["id"]; > // filter this any other way we want, too > ?> > > Then later, > > <STYLE TYPE="text/css"> > //<!-- > ... > a { letter-spacing: 0.3em } > <?php > if ($id) { > echo "a#$id { letter-spacing: 0.5em }\n"; > } > ?> > ... > //--> > </STYLE> How would I get this code, or something like it, to connect up to the actual HTML page, which has already been created elsewhere, and has no specific mention of a CSS at all? Can I push in a CSS after the fact to an already created HTML page? Or do I need to rethink how I am creating the HTML pages to start with? Perhaps instead of pre-adding the <HTML> <HEAD>, etc. tags in the 14,000+ pre-prepared HTML documents (which I am creating myself), I should include only the actual body text in the pre-generated documents, then generate everything outside the <BODY>...</BODY> tags on the fly, and then somehow connect that generated/dynamic header to the static body? The dynamically generated header tags could be set up with code similar to what you have shown above, but instead changing the text at that ID value in terms of color and boldface. That would probably require a different mechanism than a simple redirection for actually displaying the page....I'll have to think about that..... Alternatively, perhaps I could re-generate each of the 14,000+ HTML documents with a static pointer to an external .css file, and just constantly dynamically change the contents of that external .css file to rewrite the actual ID value. -- that is, if that can be done simultaneously for the right and left frames with a different value for each...... > > Note the extra php code in the CSS. Normal anchor tags (<a>) will have .3em > while the anchor tag with id from the GET request should have .5em. If there is > no highlight the extra "a" line won't be printed in the CSS. I gather that if I'm not using a GET, this shouldn't matter, right? > > There's a lot of other ways to do it, but this should give you a start. > > kind regards, > > bill Thanks again for your reply; I was beginning to think my question had scared everybody away. -- Mary Taffet [EMAIL PROTECTED] > > "Mary D. Taffet" wrote: > > > While I am technically capable, having worked with COBOL and perl > > extensively (but not at the same time <g>!), I am a newbie to PHP. > > > > I have the basics for a survey application up and running, but need to > > be able to highlight one specific piece of text in each of the two main > > frame windows, and I'm not entirely sure how to accomplish this with > > PHP. > > > > Both frame windows are pulling in HTML documents from a pool of over > > 14,000 pre-prepared documents, all of which have specific ID values > > incorporated as part of the NAME anchor element, for example: > > > > <A NAME="J145-37" ID="IDJ145-37">Thomas Jefferson</A> > > > > <A NAME="W169-157" ID="IDW169-157">George Washington</A> > > > > I have a mysql table that I am using to tell me, at any one point in > > time, which specific NAME value should be pointed to in each frame. > > They may or may not be within the same physical HTML document. > > > > If it were the case that I were pointing to Thomas Jefferson in the left > > frame and George Washington in the right frame, I would like to be able > > to highlight each name so that it is immediately visible within the > > surrounding document context. I would like to minimally use a different > > color for the specific name in each frame that I am pointing to. > > > > Because each document is filled with multiple NAME values, each with > > it's own separate ID value, theoretically it should be possible to > > highlight only the one speicific NAME value I am interested in at a > > particular point -- leaving all the other NAME values the same color as > > the surrounding text. Hopefully this is even possible when I am pulling > > in the same physical document twice, once in each frame (using separate > > PHP programs for the left and right frames). If the two snippets of > > text above were found in the same sentence in the same physical HTML > > document, I would want one highlighted in the left frame and the other > > highlighted in the right frame. > > > > The mysql table will tell me at any one point which specific ID value > > should be highlighted in each frame, but only through a variable name (I > > am currently using $resource_nameid_left and $resource_nameid_right for > > these two values). I am already incorporating these values in the URL > > pulled into each frame as each URL points to the specified NAME anchor > > specifically. > > > > But I also need to be able to use the ID Selector property of CSS > > through PHP, pointing to a variable name. This is the part that I don't > > have any examples for. Can I do this easily? Will it require the use > > of Javascript? > > > > If anybody has some sample code that will do this, or can point me to > > sample code that does this, I would appreciate it very much. > > > > If I have not explained fully what I am seeking, please let me know and > > I can elaborate further. > > > > -- Thanks, > > Mary D. Taffet > > Syracuse University > > Ph.D. Student/School of Information Studies > > E-mail: [EMAIL PROTECTED] > > Web: http://web.syr.edu/~mdtaffet/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php