winmastergames Posted January 29, 2008 Share Posted January 29, 2008 Well I had a problem with a script it didnt work to well heres a quote from the previous Thread Hi Guys Well Ive been getting some help from people here but im really confused now would someone please help me heres a little diagram of what i want it to do Well what i need done is see where it has all the form above the 4 Buttons i need the that form data you know like ?title=here&slogan=welcome that inserted into where it has Url 1, 2, 3, 4 But i also need the form data from Url 1, 2, 3, 4 Title and the Url its kind of confusing Any Questions please ask Heres my Code: <html> <head> <script language="javascript"> function updateField1(Entry, ReEntry) { document.getElementById(Entry).value = ReEntry; } function updateField2(Entry, ReEntry) { document.getElementById(Entry).value = ReEntry; } function putIt2gether(Entry,Entry2,place2go,var1,var2) { var first = document.getElementById(Entry).value; var second = document.getElementById(Entry2).value; document.getElementById(place2go).value = "index.php?" + var1 + "=" + first + "&" + var2 + "=" + second; } </script> <script language="javascript"> function updateField1(Entry, ReEntry) { document.getElementById(Entry).value = ReEntry; } function updateField2(Entry, ReEntry) { document.getElementById(Entry).value = ReEntry; } function putIt2gether2(Entry,Entry2,place2go,var1,var2) { var first = document.getElementById(Entry).value; var second = document.getElementById(Entry2).value; document.getElementById(place2go).value = "index.php?" + var1 + "=" + first + "&" + var2 + "=" + second; } </script> <script language="javascript"> function updateField1(Entry, ReEntry) { document.getElementById(Entry).value = ReEntry; } function updateField2(Entry, ReEntry) { document.getElementById(Entry).value = ReEntry; } function putIt2gether3(Entry,Entry2,place2go,var1,var2) { var first = document.getElementById(Entry).value; var second = document.getElementById(Entry2).value; document.getElementById(place2go).value = "index.php?" + var1 + "=" + first + "&" + var2 + "=" + second; } </script> <script language="javascript"> function updateField1(Entry, ReEntry) { document.getElementById(Entry).value = ReEntry; } function updateField2(Entry, ReEntry) { document.getElementById(Entry).value = ReEntry; } function putIt2gether4(Entry,Entry2,place2go,var1,var2) { var first = document.getElementById(Entry).value; var second = document.getElementById(Entry2).value; document.getElementById(place2go).value = "index.php?" + var1 + "=" + first + "&" + var2 + "=" + second; } </script> </head> <body> <form action="index.php" method="get"> Title: <input type="text" name="title" onkeyup="updateField1('hide1',this.value)" /><br> slogan: <input type="text" name="slogan" onkeyup="updateField2('hide2',this.value)" /><br> <hr> Paragraph 1 Title: <input type="text" name="para-1" onkeyup="updateField1('hide3',this.value)" /><br> Paragraph 1 Section 1 Body: <input type="text" name="para-1sec1body" onkeyup="updateField1('hide4',this.value)" /><br> Paragraph 1 Section 2 Body: <input type="text" name="para-1sec2body" onkeyup="updateField1('hide5',this.value)" /><br> Paragraph 1 Section 3 Body: <input type="text" name="para-1sec3body" onkeyup="updateField1('hide6',this.value)" /><br> <hr> Paragraph 2 Title: <input type="text" name="para-2" /><br> Paragraph 2 Section 1 Body: <input type="text" name="para-2sec1body" /><br> Paragraph 2 Section 2 Body: <input type="text" name="para-2sec2body" /><br> <br> Sidebar 1 Title: <input type="text" name="sidebar1title" /><br> Sidebar 1 Body: <input type="text" name="sidebar1body" /><br> <br> Sidebar 2 Title: <input type="text" name="sidebar2title" /><br> Sidebar 2 Body: <input type="text" name="sidebar2body" /><br> <hr> Sidebar 3 Title: <input type="text" name="sidebar3title" /><br> Sidebar 3 Body: <input type="text" name="sidebar3body" /><br> <hr> <input type="button" value="Submit to Page 1" onclick="putIt2gether('hide1','hide2','text1','title','slogan')"> <input type="button" value="Submit to Page 2" onclick="putIt2gether2('hide1','hide2','text2','title','slogan')"> <input type="button" value="Submit to Page 3" onclick="putIt2gether3('hide1','hide2','text3','title','slogan')"> <input type="button" value="Submit to Page 4" onclick="putIt2gether4('hide1','hide2','text4','title','slogan')"> <hr> <input type="hidden" id="hide1"> <input type="hidden" id="hide2"> Link 1 Text: <input type="text" name="link1text" /><br> Link 1 Url: <input type="text" id="text1" name="link1url" id="1" /><br> Link 2 Text: <input type="text" name="link2text"/><br> Link 1 Url: <input type="text" id="text2" name="link1url" id="1" /><br> Link 3 Text: <input type="text" name="link3text" /><br> Link 1 Url: <input type="text" id="text3" name="link1url" id="1" /><br> Link 4 Text: <input type="text" name="link4text" /><br> Link 1 Url: <input type="text" id="text4" name="link1url" id="1" /><br> <hr> <input type="submit" /> </form> <form> <input type="text" id="txt"> </form> </body> </html> And as you can see it uses index.php to do stuff here is that in case you want more info Its just got some PHP scripting Note Copyrighted to another company: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title><?php echo $_GET["title"]; ?> - <?php echo $_GET["slogan"]; ?></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link href="style.css" rel="stylesheet" type="text/css" /> <style type="text/css"> <!-- .style1 {color: #A53512} --> </style> </head> <body> <!-- COPYRIGHT INFORMATION -+-+-+-+-+-+-+-+-+-+- If you wish to use this template for a non-profit organisation, such as state funded schools & colleges, charities, blogs etc, then you are free to do with the copyright information as you wish. I would appreciate a link back, but it isn't neccessary. For all other users of this template, please leave the copyright info in the footer intact. I made this template in my own time, and all I ask is you leave the copyright info intact so that others can find the oswd site and me! If you wish to remove the copyright information, I can not stop you, but a donation would be appreciated. To get in touch email me at info@now-design.co.uk or simply paypal to that same address. Good luck, if you are struggling with the modification, do get in touch as I am available for paid work. Thanks! Tjobbe Andrews - NOW:design - info@now-design.co.uk --> <!-- This design is part of the [in] business template downloaded from the oswd.org site The stylesheet and template where made by Tjobbe Andrews from NOW:design www.now-design.co.uk --> <div class="all"> <div class="box"> <!-- The menu, tabs --> <div class="menu"><a href="<?php echo $_GET["link1url"]; ?>"><?php echo $_GET["link1text"]; ?></a><a href="<?php echo $_GET["link2url"]; ?>"><?php echo $_GET["link2text"]; ?></a><a href="<?php echo $_GET["link3url"]; ?>"><?php echo $_GET["link3text"]; ?></a><a href="<?php echo $_GET["link4url"]; ?>"><?php echo $_GET["link4text"]; ?></a></div> <!-- The header --> <div class="header"><img alt="" style="float:right; " src="images/www.jpg" width="225" height="95" /> <h1><?php echo $_GET["title"]; ?></h1> <div class="clearfix"></div> </div> <!-- the news bar, or right hand column --> <div class="newsbar"> <h1><?php echo $_GET["sidebar1title"]; ?></h1> <div class="p2"><?php echo $_GET["sidebar1body"]; ?></div> <h1><?php echo $_GET["sidebar2title"]; ?></h1> <div class="p2"> <p><?php echo $_GET["sidebar2body"]; ?></p> </div> <h1><?php echo $_GET["sidebar3title"]; ?></h1> <div class="p2"> <p><?php echo $_GET["sidebar3body"]; ?></p> </div> </div> <!-- main content area--> <div class="content"> <h1><?php echo $_GET["para-1"]; ?></h1> <p><?php echo $_GET["para-1sec1body"]; ?></p> <p><?php echo $_GET["para-1sec2body"]; ?></p> <div class="p1"><?php echo $_GET["para-1sec3body"]; ?></div> <h1><strong><?php echo $_GET["para-2"]; ?></strong></h1> <p><?php echo $_GET["para-2sec1body"]; ?></p> <p><?php echo $_GET["para-2sec2body"]; ?></p> </div> <div class="clearfix"></div> <!-- footer, copyright area - please do not remove!--> <div class="footer"><?php echo $_GET["title"]; ?> © 2008 | Template from <a href="http://www.oswd.org/">oswd.org</a></div> </div> </div> </body> </html> Can someone please explain what the top script does and how to add more things to it Please Help even though what i want is Really Confusing phpQuestioner Said that i could do this in PHP or Ajax an easier way to do this would be to use php or ajax to submit each form value back to each specific field's value. 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.