anarkie Posted July 27, 2007 Share Posted July 27, 2007 Hello, I have a html page with tables and cells. 9 cells with text in them with "onclick=MM_setTextOfLayer" for each name in the cell/tables. And I need to make an php form that will change the name in one of the 9 designated cells/tables (by choice) and the value of the onclick in the src code. And over write the old stuff. Im new to php and I need to get this done in 72hr.... Any direction would be much appreciated. Quote Link to comment Share on other sites More sharing options...
tibberous Posted July 27, 2007 Share Posted July 27, 2007 Not sure I get you. You have a table with 9 cells. And the cells have onclick events. Do you got any code so far? Quote Link to comment Share on other sites More sharing options...
GingerRobot Posted July 27, 2007 Share Posted July 27, 2007 If i understand you correctly, you want to create a form which will have a text area for you to put existing HTML code of a page into it. You will then use php to parse that HTML code, make some changes, and then give you the modified code? If so, you'll need to look into using regular expressions to search your HTML code for the various information. The preg_relace() function will probably be what you're looking for. Quote Link to comment Share on other sites More sharing options...
anarkie Posted July 27, 2007 Author Share Posted July 27, 2007 Its an obituaries page on a funeral home website. And I want to make a form that will change the name on the page and the Obitcell. So I dont have to do it with a html editor everytime. The form has to have a name box, drop down list to check which obit I want to change and a text field for the obit. Right now when you click on the name it shows the obit below in a table I gave an id. (I know this is sloppy dw code) the page: ################################################### <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Parker-Ashworth.com 972-</title> <style type="text/css"> <!-- a:link { color: #000000; text-decoration: none; } a:visited { text-decoration: none; } a:hover { text-decoration: none; } a:active { text-decoration: none; } --> </style> <script type="text/javascript"> <!-- function MM_setTextOfLayer(objId,x,newText) { //v9.0 with (document) if (getElementById && ((obj=getElementById(objId))!=null)) with (obj) innerHTML = unescape(newText); } //--> </script> </head> <body> <center><table width="718" border="0" cellpadding="0" cellspacing="0"> <!--DWLayoutTable--> <tr> <td height="40" colspan="3" valign="top"><img src="images/p2_01.jpg" width="718" height="40" /></td> </tr> <tr> <td height="35" colspan="3" valign="top"><img src="images/p2_02.jpg" width="718" height="35" /></td> </tr> <tr> <td height="39" colspan="3" valign="top"><img src="images/p2_03.jpg" width="718" height="39" /></td> </tr> <tr> <td width="200" height="41" valign="top"><img src="images/p2_04.jpg" width="200" height="41" /></td> <td colspan="2" valign="top"><img src="images/p2_05.jpg" width="518" height="41" border="0" usemap="#Map" /></td> </tr> <tr> <td height="130" width="200" valign="middle" background="images/winbg.jpg" id=flashwin><div align="justify"></div></td> <td colspan="2" valign="top"><img src="images/p2_07.jpg" width="518" height="130" border="0" usemap="#Map2" onbeforeunload="MM_setTextOfLayer('flashwin','','<center>View our wide selection of various types of gravestones</center>');MM_setTextOfLayer('flashwin','','<center>Have any questions? Email us or give us a call. Also driving directions from Dallas with a map.</center>')" /></td> </tr> <tr> <td height="19" colspan="3" valign="top"><!--DWLayoughfghfghtEmptyCell--> </td> </tr> <tr> <td height="19" colspan="2" align="left" valign="top"><a href="#"><strong onclick="MM_setTextOfLayer('bitcell','','Hunter Mason Browning was born in Dallas, Texas on July 24, 1998 to Art and Cheryl Vetter Browning. Hunter passed away in a Dallas, Texas hospital on July 19, 2007. Hunter lived a short time in Combine, Texas before moving to Scurry last year. He attended Scurry – Rosser Elementary School. Hunter is survived by his parents: Art and Cheryl Browning of Scurry, brothers: Mat Browning of Combine and Austin Browning of Scurry, grandparents: Ida Browning of Dallas and Ted and Joan Vetter of Arlington, great-grandmother: Viola Moody of St. Petersburg, Florida, aunts, uncles and many other relatives and friends. Funeral services were held Tuesday, July 24, 2007 at 11:00 A.M. at Victory Baptist Church in Scurry with Rev. Steve Rhodes and Rev. Todd Peavy officiating. Interment followed in Wilson Chapel Cemetery. Funeral arrangements were under the direction of Parker-Ashworth Funeral Home of ')">Hunter Mason Browning</strong></a></td> <td width="259" valign="top">Sign Visitation book</td> </tr> <tr> <td height="19" colspan="2" align="left" valign="top" bgcolor="#EBECED"><a href="#"><strong onclick="MM_setTextOfLayer('bitcell','','Faye Maxine Barrett was born in Wills Point, Texas on July 4, 1925 to Roosevelt and Lillie Parker Kyser. Faye passed away in Atlanta, Georgia on July 9, 2007. Faye was raised in the Hiram Community and later moved to Dallas where she lived most of her life. She moved to Kaufman in 2000 and then to Atlanta, Georgia in 2005. Faye was preceded in death by her husband Herman in 2001 and by a son Vince T. Hayman. She is survived by her daughter: Dianne M. Brown and her husband Allen of Atlanta, Georgia and Sandura Ann Cohen of Dallas, sisters: Mary Lou Kyser of Terrell and Dorothy Von Bose of Mansfield, brothers: Milton H. Kyser of Canton and Dickie Kyser of Terrell, grandchildren: Holly M. Hayman, Jennifer Cotton Scott, Mimbi Ann Robertson and Todd Plumber, three great-grandchildren and many other relatives and friends. Funeral services were held Friday, July 13, 2007 at 10:00 A.M. at Parker-Ashworth Funeral Home with interment following in Kyser Cemetery. Funeral arrangements were under the direction of Parker-Ashworth Funeral Home of Kaufman.')">Faye Maxine Barrett</strong></a></td> <td valign="top" bgcolor="#EBECED">Sign Visitation book</td> </tr> <tr> <td height="19" colspan="2" align="left" valign="top"><strong onclick="MM_setTextOfLayer('bitcell','','Jenner Evon Harper was born in Eustace, Texas on March 20, 1931 to John and Benettie Weaver Harper. Jenner passed away in a Kaufman hospital on July 12, 2007. Jenner attended the Eustace Schools and later joined the U. S. air Force during the Korean Conflict. After the service he graduated from the University of Texas in Austin. Jenner lived in Kaufman for forty- one years. He retired from Texas Instruments after twenty-eight years. Jenner was a member of the Grace Christian Church in Kaufman. On July 28, 1956 Jenner married Patricia Monroe in Eustace. He is survived by his wife: Patricia of Kaufman, son: Steve Harper of Kaufman, daughter: Laura Harper of Sparks, Nevada, five grandchildren and many other relatives and friends. Funeral services were held Sunday, July 15, 2007 at 2:00 P.M. at Parker-Ashworth Funeral Home in Kaufman. Interment followed in Moorehead-Melton Cemetery in Eustace. Funeral arrangements were under the direction of Parker-Ashworth Funeral Home of Kaufman.')"><a href="#">Jenner Evon Harper</a></strong></td> <td valign="top">Sign Visitation book</td> </tr> <tr> <td height="19" colspan="2" align="left" valign="top" bgcolor="#EBECED"><strong onclick="MM_setTextOfLayer('bitcell','','Roy Coleman Rogers was born in Dallas, Texas on November 2, 1918 and passed away in Arlington, Texas on July 10, 2007. Roy was raised in Dallas where he lived most of his life. During World War II he served in the U. S. Army. Roy attended the University of Texas and was an aircraft design engineer for several local aircraft manufacturing companies. Roy married Gloria Worley in 1974 in Dallas, Texas. He is survived by his wife: Gloria of Fort Worth, sons: Roy Rogers Jr. of Colorado Springs, Colorado and Don Rogers of Gainesville, Texas, daughter: Suzanne McDonald of Denton, Texas, four grandchildren and many other relatives and friends.')"><a href="#">Roy Coleman Rogers</a></strong></td> <td valign="top" bgcolor="#EBECED">Sign Visitation book</td> </tr> <tr> <td height="19" colspan="2" align="left" valign="top"><a href="#"><strong onclick="MM_setTextOfLayer('bitcell','','Billy Gene Barnes was born in Cumberland, Oklahoma on July 23, 1930 to Cecil and Letha Kennedy Barnes. Billy passed away at his home in Scurry on July 10, 2007. Billy was raised in Oklahoma and moved to Texas in 1977. He moved to the Scurry Community in 1981. Billy worked for Post Properties in Addison, Texas as a project manager. He was a member of the Lively Missionary Baptist Church where he served as a deacon. Billy married Dorothy Robertson in Durant, Oklahoma in 1951. He was preceded in death by a granddaughter, Tiffany. Billy is survived by his wife: Dorothy of Scurry, sons: Billy Barnes of Tishomingo, Oklahoma, Kenneth Barnes of Scurry, Gary Barnes of Ada, Oklahoma and Andrew Lynch of Scurry, daughters: Donna Wolverton of Scurry, Gayle Wooldridge of Scurry, Kathy Baty of Phalba, Ann Lively of Scurry, Phyllis Barnes of Scurry and Tracy Nowaski of Scurry, sisters: Jackie Powers of Lewisville, Fern Decker of Athens and Elnora Wix of Mesa, Arizona, twenty-four grandchildren, twelve great-grandchildren and many other relatives and friends. Funeral services were held Saturday, July 14, 2007 at 10:00 a.m. at Parker-Ashworth Funeral Home with interment following in Mount Olive Cemetery in Scurry. Funeral arrangements were under the direction of Parker-Ashworth Funeral Home of Kaufman')">Billy Gene Barnes</strong></a></td> <td valign="top">Sign Visitation book</td> </tr> <tr> <td height="19" colspan="2" align="left" valign="top" bgcolor="#EBECED"><strong onclick="MM_setTextOfLayer('bitcell','','Guy “Bud” Howell was born in the Rand Community on June 21, 1924 to Willie and Sarah Morris Howell. Guy passed away at his home in Kaufman on July 6, 2007. Bud was raised in the Rand Community and lived there most of his life. During World War II Bud served in the U. S. Army 36th Division serving in Italy, France and Germany. When he returned from the War he married Faye Floyd in Terrell on October 12, 1946. Bud worked for the Dr. Pepper Company in Kaufman and Terrell for twenty-four years and retired also from Howell Sand & Gravel. He was a member of the Church of Christ. Bud was a loving father and husband whose quick wit and humor remained with him throughout his long illness. His sincerity and concern for his friends was surpassed only by his love for his family. Bud was preceded in death by his wife Faye on January 11, 1974 and by his daughters Sharon Kay and Pat and a grandson Matthew Brent Courtney in 1991. Guy is survived by his daughters: Donna Courtney and her husband Ron of Terrell, Mary Ann Reeder and her husband Charles of Terrell and Cindy Howell of Kaufman, sisters: Margaret Evans, Jimmie Turner and Frances Busby all of Kaufman, brothers: Gayle Howell and Gerald Howell both of Kaufman, grandchildren: Brian and Brandon Courtney and Cristi Reeder, great-grandchild: Jaycie Jackson and a very special friend Hurley Miller and many other relatives and friends. Funeral services were held Monday, July 9, 2007 at 2:00 P.M. at the Parker-Ashworth Funeral Home with interment following in Kaufman Cemetery. Funeral arrangements were under the direction of Parker-Ashworth Funeral Home of Kaufman.')"><a href="#">Guy “BUD” G. Howell</a></strong></td> <td valign="top" bgcolor="#EBECED">Sign Visitation book</td> </tr> <tr> <td height="19" colspan="2" align="left" valign="top"><strong onclick="MM_setTextOfLayer('bitcell','','John Edwin Hoffmeyer was born in Lakewood, Ohio on April 22, 1920 to Paul and Victoria Schwan Hoffmeyer. John passed away in Dallas on July 4, 2007. John was raised in Lakewood, Ohio and moved to Dallas in 1944. He worked as a manager for Sherwin Williams Paint Company for forty-one years. John moved to Kaufman in 1984 where he owned Kaufman Brick Supply from 1986 to 2007. He was a member of the Kaufman Lions Club, Salvation Army and Zion Lutheran Church of Dallas. John married Majorie Nehrenz on Dec. 18, 1943 in Lakewood, Ohio. John was preceded in death by his wife Majorie on June 23, 2004 and a grandson John Hoffmeyer. John is survived by his son: Paul Hoffmeyer and his wife Christine of Kaufman, daughter: Paula Feisel and her husband Gary of Dallas, grandchildren: Laura Fischer, Paul Hoffmeyer and Greg Hoffmeyer. Memorial services will be Saturday, July 28, 2007 at 11:00 a.m. at Zion Lutheran Church of Dallas. In lieu of flowers family has requested memorials be to Zion Lutheran Church of Dallas, 6121 E. Lovers LN. Dallas, TX 75214. Funeral arrangements were under the direction of Parker-Ashworth Funeral Home of Kaufman.\n\n<center><img src="images/p2_01.jpg""/></center>')"><a href="#">John Edwin Hoffmeyer</a></strong><strong onclick="MM_setTextOfLayer('bitcell','','Mary Lee Paul Lewis, a long time resident of Kaufman, TX, was called to her eternal home on Friday, June 8, 2007 after spending the last few years at a personal care home in Sugar Land, Texas. Born on September 5, 1926, at Old Union, Union County near El Dorado, Arkansas to Archie Lee Paul and Alma Nix Paul, Mary was welcomed home by her husband, Jack H. Lewis, grandson Matthew Dolezal and a host of family and friends. Mary is survived by her daughter, Mary Ann Dolezal, son-in-law Phil and grandson Jimmy of Sugar Land, TX; son, Jack H. Lewis Jr. and daughter-in-law Kelly of Arlington, TX; brother, James Franklin Paul of Euless, TX; nephews Mike Paul (Donna) of Bedford, TX, Jeff Paul of Houston, TX and Tony Paul (Karen) of Acworth, Georgia. Mary received her teaching degrees in Business Administration and Music Education from East Texas State University in 1948. It was there she met her beloved husband, Jack. They lived in Corsicana, Henrietta and Dallas where she taught school, before making Kaufman their home in 1956. Mary was a dedicated wife determined to take care of her husband who was diagnosed with Amyotrophic Lateral Sclerosis (Lou Gehrig’s disease) in 1957. She supported Jack’s efforts as the Kaufman County Agricultural Agent and later, in his real estate brokerage until his death in 1976. A talented pianist, Mary enjoyed playing for the Kaufman Lions Club programs for many years. A gifted singer, Mary sang in the choir as a member of First Baptist Church of Kaufman. Her best memories include the years spent as a Kaufman Elementary School music teacher under principal Bill Monday. She loved to put on school programs and cherished the students in her choirs. Mary taught several generations of Kaufman elementary students from 1956 until her retirement in 1986. She was a member of The Delta Kappa Gamma Society International, a professional honorary society of women educators. She will be remembered as a devoted wife and mother, a loving teacher, a faithful friend and a gifted musician. Precious memories include Mary’s special home recitals, her sense of humor and her sayings, “Stay in there and pitch!” and “ you have all eternity to rest.” Thanks to our merciful Lord, she is at rest and now sings in a heavenly choir. She fought the good fight. Well done, good and faithful servant. Memorials can be made in Mary’s memory to the Kaufman Scholarship Fund c/o Kaufman Independent School District, 1000 S. Houston St., Kaufman, TX 75142. Funeral services where held June 11, 2007 at 10:00 at Parker-Ashworth Funeral home with interment following in Kaufman Cemetery. Funeral arrangements were under the direction of Parker-Ashworth Funeral Home of Kaufman. ')"><a href="#"></a></strong><strong onclick="MM_setTextOfLayer('bitcell','','Maria Antonia Antuna was born in San Antonio, Texas on June 13, 1934 to Luis and Victoria Vasquez Tijerina. Maria passed away in Kaufman, Texas on June 6, 2007. Maria was raised in San Antonio and later moved to Poth, Texas for twenty years. She moved to Kaufman in 1972. Her husband Jose Antuna preceded Maria in death on August 5, 1989. Maria is survived by her sons: Joe Antuna Jr. of Kaufman, Hector Antuna of Kaufman, Anselmo Antuna of Mesquite and Ruben Antuna of Kaufman, daughters: Linda Parker of The Woodlands and Edna Cruz of Kaufman, sisters: Margaret Segurat of Rosenberg and Frances Mora of San Antonio, thirteen grandchildren, ten great grandchildren, nieces, nephews and other relatives and friends. Funeral services were held Friday, June 8, 2007 at 1:00 P.M. at the First Assembly of God Church of Kaufman with Rev. Alfredo Becerra officiating. Interment followed in Roselawn Memorial Park. Funeral arrangements were under the direction of Parker-Ashworth Funeral Home of Kaufman. Funeral arrangements were under the direction of Parker-Ashworth Funeral Home of Kaufman. ')"><a href="#"></a></strong></td> <td valign="top">Sign Visitation book</td> </tr> <tr> <td height="19" colspan="2" align="left" valign="top" bgcolor="#EBECED"><strong onclick="MM_setTextOfLayer('bitcell','','Sylvia Jane Marlar was born in Honolulu, Hawaii on September 29, 1940 to Clarence and Margie Jeffcoat Ackles. Sylvia passed away in a Dallas hospital on May 14, 2007. Sylvia was raised in Dallas and later moved to Scurry in 1969. She owned an employment agency for twenty years and later was a Real Estate Agent for Caldwell Banker for fifteen years. Sylvia was a member of the Church of Christ. On November 3, 1956 Sylvia married Dwayne Marlar in Dallas. She is survived by her husband: Dwayne Marlar of Scurry, son: Phillip Marlar and his wife Teresa of Scurry, daughter: Tina Marlar Lawson and her husband Tim of Scurry, father: Clarence Ackles of Malakoff, sister: Diane Ackles of Gun Barrel, grandchildren: Taylor Marlar, Tanner Marlar, Kendall Perkins, Christan Lawson and Alyssa Lawson. Funeral services will be Thursday, May 17, 2007 at 10:00 a.m. at Parker-Ashworth Funeral Home with Rev. Denny Mackey officiating. Interment will be Mt. Olive Cemetery in Scurry. Funeral arrangements are under the direction of Parker-Ashworth Funeral Home of Kaufman. Funeral arrangements were under the direction of Parker-Ashworth Funeral Home of Kaufman. ')"><a href="#">Sylvia Jane Marlar</a></strong></td> <td valign="top" bgcolor="#EBECED">Sign Visitation book</td> </tr> <tr> <td height="19" colspan="2" align="left" valign="top"><!--DWLayoutEmptyCell--> </td> <td valign="top"><!--DWLayoutEmptyCell--> </td> </tr> <tr> <td width="718" height="256" colspan="3" align="left" valign="top" bgcolor="#F7F7F7" id=bitcell><!--DWLayoutEmptyCell--> </td> </tr> <tr> <td height="20" colspan="3" valign="top"><img src="images/botpic.jpg" width="718" height="20" /></td> </tr> <tr> <td height="1"></td> <td width="259"></td> <td></td> </tr> </table> </center> <map name="Map" id="Map"><area shape="rect" coords="69,15,119,39" href="index.html" onmouseover="MM_setTextOfLayer('flashwin','','<center>Back to our home page.</center>')" /> </map> <map name="Map2" id="Map2"><area shape="rect" coords="7,26,139,54" href="mtf.htm" onmouseover="MM_setTextOfLayer('flashwin','','<center>Learn more about our family and why we believe we can render you better service.</center>')" /> <area shape="rect" coords="130,75,202,95" href="obit.htm" onmouseover="MM_setTextOfLayer('flashwin','','<center>Read our current funeral notices and leave the family a kind message in their visitaion book.</center>')" /> <area shape="rect" coords="210,94,309,117" href="fs.htm" onmouseover="MM_setTextOfLayer('flashwin','','<center>Here you can find some local flower shops we recommend.</center> ')" /> <area shape="rect" coords="314,109,403,150" href="mont.htm" onmouseover="MM_setTextOfLayer('flashwin','','<center>View our wide selection of various types of monuments.</center>')" /> <area shape="rect" coords="413,103,502,125" href="cont.htm" onmouseover="MM_setTextOfLayer('flashwin','','<center>Have any questions? Give us a call, send us an e-mail. Also driving directions with a map.</center>')" /> </map></body> </html> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.