Jump to content

[SOLVED] Problem with my script


winmastergames

Recommended Posts

Im not to sure i should add this to my other thread but its DIFFERENT SO HERE WE GO:

Well ive got some help from someone to make this script I have been trying to implement it into what im doing I thought i knew what i was doing but there is a problem with it this is my Script

<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,Entry3,Entry4,Entry5,Entry6,place2go,var1,var2,var3,var4,var5,var6)
{
var first = document.getElementById(Entry).value;
var second = document.getElementById(Entry2).value;
var third = document.getElementById(Entry3).value;
var forth = document.getElementById(Entry4).value;
var fith = document.getElementById(Entry5).value;
var sixth = document.getElementById(Entry6).value;
document.getElementById(place2go).value = "index.php?" + var1 + "=" + first + "&" + var2 + "=" + second + "&" + var3 + "=" + third + "&" + var4 + "=" + forth + "&" + var5 + "=" + fith + "&" + var6 + "=" + sixth;
}
</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','hide3','hide4','hide5','hide6','text1','title','slogan','para-1','para-1sec1body',para-1sec2body',para-1sec3body')">
<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">
<input type="hidden" id="hide3">
<input type="hidden" id="hide4">
<input type="hidden" id="hide5">
<input type="hidden" id="hide6">
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>

Can some nice person please find the problem and explain what i was doing wrong then ill know when i do the rest of this script

 

THE PROBLEM: When i click the button Submit to Page 1 its surpose to get the data from These Fields

Title, Slogan, Paragraph 1 Title, Paragraph 1 Section 1 Body, Paragraph 1 Section 2 Body, Paragraph 1 Section 3 Body

THATS the names they have with the textbox beside them not the Names/IDS of the textboxes

 

Thanks In Advance

Link to comment
https://forums.phpfreaks.com/topic/86885-solved-problem-with-my-script/
Share on other sites

I cant edit the first post :) ohwell here we go

Well heres a bit more info on what i want done well have a look at the script above Can someone please either find out what ive done wrong in the script or can some *Please* Make the script so all the textboxs above the 4 Submit data to Page # buttons so they all work propely Cause i didnt do it right heres the diagram *old*

examplelt0.jpg

If you can understand that :P

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.