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. 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. 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 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> 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. There's a lot of other ways to do it, but this should give you a start. kind regards, bill "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