Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data NOT transfering to the Second Form

Status
Not open for further replies.

Vem786

Technical User
Dec 2, 2003
52
US
I have designed two HTML pages, docs_duplicate.html & links_duplicate.html. The functionality that I want to achieve is -
When I enter the required data in the docs_duplicate.html & hit enter, links_duplicate.html will get all the data. I achieved it EXCEPT for the RADIOBUTTON. I'm enclosing the code of bothe docs_duplicate.html & links_duplicate.html respectively.

Please help!!!
-------------------
docs_duplicate.html
-------------------
<HTML>
<head>
<title>Docs_Duplicate Page</title>
</head>

<body TOPMARGIN=&quot;0&quot; LEFTMARGIN=&quot;50&quot;>
<form Action=&quot;links_duplicate.html&quot;>
<CENTER>
<table border='0' cellspacing=1 cellpadding=1 width=500 style=&quot;table-layout:fixed&quot;>
<col width=150>
<col width=150>
<col width=150>
<col width=150>
<TR><TR>
<TR><TR>
<TR><TR>
<TR>
<TD align=&quot;right&quot; valign=&quot;middle&quot;><font size=2><b>LASTMODF</b>
<TD align=&quot;left&quot;><input type = text name=&quot;lastmod&quot; size=15>
<TD align=&quot;right&quot; valign=&quot;middle&quot;><font size=2><b>DESCOPEPCR ID</b>
<TD align=&quot;left&quot;><input type = text name=&quot;descopepcrid&quot; size=15>
<TR>
<TD align=&quot;right&quot; valign=&quot;middle&quot;><font size=2><b>TSD DESC</b>
<TD align=&quot;left&quot;><textarea name=&quot;tsddesc&quot; rows=5 cols=12></textarea>
<TD align=&quot;right&quot; valign=&quot;middle&quot;><font size=2><b>ACTV TEST SCRT</b>
<TD align=&quot;left&quot;><input type = radio name=&quot;activetestscr&quot; value=&quot;0&quot; onClick=&quot;0&quot;><font size=2><b>YES<b>
<input type = radio name=&quot;activetestscr&quot; value=&quot;1&quot; onClick=&quot;1&quot;><font size=2><b>NO</b>
</table>
<TABLE>
<TD>
<TH align=center><input type = submit Value = &quot;SUBMIT&quot; size=&quot;10&quot;> <input type = submit Value = &quot;CLEAR&quot; size=&quot;10&quot;>
</TABLE>
</CENTER>
</form>
</body>
</html>
--------------------------------
--------------------
links_duplicate.html
--------------------
<html>
<head>
<title>Links_Duplicate Page</title>
</head>
<body TOPMARGIN=&quot;0&quot; LEFTMARGIN=&quot;0&quot;>
<form name=&quot;links1&quot;>
<center>
<table border='0' cellspacing=2 cellpadding=3>
<TR><TR>
<TR><TR>
<TR><TR>
<TR>
<TR>
<TD align=&quot;left&quot; valign=&quot;middle&quot;><font size=2><b>LAST MODF</b>
<TD align=&quot;left&quot; valign=&quot;middle&quot;><font size=2><b>DESCOPEPCR ID</b>
<TD align=&quot;left&quot; valign=&quot;middle&quot;><font size=2><b>TSD DESC</b>
<TD align=&quot;left&quot; valign=&quot;middle&quot;><font size=2><b>ACTV TEST SCRT</b>
<TR>
<TD align=&quot;left&quot;><input type = text name=&quot;lastmod&quot; size =25 onFocus=&quot;this.blur();&quot;>
<TD align=&quot;left&quot;><input type = text name=&quot;descopepcrid&quot; size =25 onFocus=&quot;this.blur();&quot;>
<TD align=&quot;left&quot;><textarea name=&quot;tsddesc&quot; rows=5 col=10 onFocus=&quot;this.blur();&quot;></textarea>
<TD align=&quot;left&quot;><input type = radio name=&quot;activetestscr&quot; value=&quot;0&quot;><font size=2><b>YES<b>
<input type = radio name=&quot;activetestscr&quot; value=&quot;1&quot;><font size=2><b>NO</b>
</table>
</CENTER>
</form>

<script language=&quot;javascript&quot;>
<!-- hide
function replace(string,text,by) {

var i = string.indexOf(text);
var newstr = '';

if ((!i) || (i == -1))
return string;

newstr += string.substring(0,i) + by;

if (i+text.length < string.length)

newstr = newstr + replace(string.substring(i+text.length,string.length),text,by);

return newstr;
}


function getParm(string,parm) {
// returns value of parm from string

var startPos = string.indexOf(parm + &quot;=&quot;);


if (startPos > -1)
{
//alert(&quot;In If(startpos)&quot;);
startPos = startPos + parm.length + 1;
var endPos = string.indexOf(&quot;&&quot;,startPos);

if (endPos == -1)
endPos = string.length;

var x= unescape(string.substring(startPos,endPos));

return x;

}
return '';
}

//var passed = location.search.substring(1);

var passed = replace(location.search.substring(1),&quot;+&quot;,&quot; &quot;);

document.links1.lastmod.value = getParm(passed,'lastmod');
document.links1.descopepcrid.value = getParm(passed,'descopepcrid');
document.links1.tsddesc.value = getParm(passed,'tsddesc');
document.links1.activetestscr[getParm(passed,'activetestscr')].value = true;


// show me -->
</script>
</body>
</html>
--------------------------
 
document.links1.activetestscr[getParm(passed,'activetestscr')].checked = true;


Programming today is a race between software engineers striving to build better and bigger idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. - Rick Cook (No, I'm not Rick)

fart.gif
 
Than You Very Much for identifying THAT silly mistake of mine!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top