winmastergames Posted January 29, 2008 Share Posted January 29, 2008 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 [email protected] 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 - [email protected] --> <!-- 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 Link to comment https://forums.phpfreaks.com/topic/88306-i-really-need-help-with-my-script-im-really-confused/ Share on other sites More sharing options...
phpQuestioner Posted January 29, 2008 Share Posted January 29, 2008 winmastergames, when I wrote that javascript; I set it up to only pull the data from two fields/variables values and turn it into a string; which is the way your asking for it to be done; but some how your thinking that you want it to pull more than two form fields/variables values and turn it into a string. that is not the way I designed the script; because you were only asking for the title and the slogan variables to be converted into a string. are you wanting more then two variable turned into a string? are you wanting all the variables in each specific form turned into a string? Link to comment https://forums.phpfreaks.com/topic/88306-i-really-need-help-with-my-script-im-really-confused/#findComment-451910 Share on other sites More sharing options...
winmastergames Posted January 29, 2008 Author Share Posted January 29, 2008 Oh i said 2 fields as an example i actually want it to do all Fields Sorry didnt explain it to well its kind of confusing Link to comment https://forums.phpfreaks.com/topic/88306-i-really-need-help-with-my-script-im-really-confused/#findComment-451927 Share on other sites More sharing options...
phpQuestioner Posted January 29, 2008 Share Posted January 29, 2008 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. Link to comment https://forums.phpfreaks.com/topic/88306-i-really-need-help-with-my-script-im-really-confused/#findComment-451968 Share on other sites More sharing options...
winmastergames Posted January 29, 2008 Author Share Posted January 29, 2008 Oh well in PHP help someone said that you can only do this in Javascript? ill try posting this in PHP or AJAX section Link to comment https://forums.phpfreaks.com/topic/88306-i-really-need-help-with-my-script-im-really-confused/#findComment-452043 Share on other sites More sharing options...
hamza Posted January 29, 2008 Share Posted January 29, 2008 ??? ??? ??? Please explain little bit more about you question what exactly you need ................................ Link to comment https://forums.phpfreaks.com/topic/88306-i-really-need-help-with-my-script-im-really-confused/#findComment-452124 Share on other sites More sharing options...
winmastergames Posted January 31, 2008 Author Share Posted January 31, 2008 Well umm all it does is take the form data like (index.php?example=hello&example2=jim) and when you click Button 1 it inserts it into URL 1 if you click button 2 it inserts it into URL 2 and so on for numder 3 and 4 Link to comment https://forums.phpfreaks.com/topic/88306-i-really-need-help-with-my-script-im-really-confused/#findComment-454146 Share on other sites More sharing options...
phpQuestioner Posted January 31, 2008 Share Posted January 31, 2008 Just use PHP to send your form results (for which ever form that was submitted) back to the the URL textbox (for which ever form you are collecting the string for). This is the easiest way to do this. Link to comment https://forums.phpfreaks.com/topic/88306-i-really-need-help-with-my-script-im-really-confused/#findComment-454835 Share on other sites More sharing options...
winmastergames Posted February 4, 2008 Author Share Posted February 4, 2008 and how do i do that? Link to comment https://forums.phpfreaks.com/topic/88306-i-really-need-help-with-my-script-im-really-confused/#findComment-457422 Share on other sites More sharing options...
phpQuestioner Posted February 4, 2008 Share Posted February 4, 2008 and how do i do that? PHP Link to comment https://forums.phpfreaks.com/topic/88306-i-really-need-help-with-my-script-im-really-confused/#findComment-457436 Share on other sites More sharing options...
winmastergames Posted February 5, 2008 Author Share Posted February 5, 2008 Do you have a example script i can use thanks Link to comment https://forums.phpfreaks.com/topic/88306-i-really-need-help-with-my-script-im-really-confused/#findComment-459022 Share on other sites More sharing options...
phpQuestioner Posted February 5, 2008 Share Posted February 5, 2008 <input type="text" value="<?php if (isset($_POST['submit1'])) { echo "index.php?para-1sec1body=". $_POST['para-1sec1body'] ."¶-1sec2body=". $_POST['para-1sec2body'] ."¶-1sec3body=". $_POST['para-1sec3body'] .""; } ?>" name="url1"> <br/><br/> <input type="button" name="submit1" value="Submit to Page 1" onclick="document.secondformsnamehere.submit()"> PS: You know this is not a PHP forum - right ??? - You can find that forum here: http://www.phpfreaks.com/forums/index.php/board,1.0.html Link to comment https://forums.phpfreaks.com/topic/88306-i-really-need-help-with-my-script-im-really-confused/#findComment-459189 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.