29 users online (0 members and 29 guests)  


  Results 1 to 7 of 7

Related

  1. About frame-location    Forum: Javascript Forum
    Replies: 9
  2. Save output in user-defined location?    Forum: PHP Forum
    Replies: 2
  3. Drop down link location    Forum: Javascript Forum
    Replies: 3
  4. Link to location on different webpage    Forum: HTML Forum
    Replies: 3
  1. #1
    razka3's Avatar
    New User

    Status
    Offline
    Join Date
    Sep 2008
    Posts
    10

    POSTing via location.replay(URL)

    Hello all,

    Is it possible to send a POST via location.replace(URL) with URL as a name=value pairing string??

    This is the final hurtle for me on this project!!! I've tried and it always is sent via GET.... how do I send a POST with my own dynamically created URL containing name=value pairs ?

    Thanks!
    Last edited by razka3; 09-09-2008 at 02:00 PM.

  2. #2
    jthayne's Avatar

    Status
    Offline
    Join Date
    Aug 2008
    Location
    Texas
    Posts
    508

    Re: POSTing via location.replay(URL)

    Not possible. The name=value pairings within a URL is ALWAYS retrieved via GET. There is no way to change that.

  3. #3
    razka3's Avatar
    New User

    Status
    Offline
    Join Date
    Sep 2008
    Posts
    10

    Re: POSTing via location.replay(URL)

    Doesn't a POST send the form data via name=value pairings???!!!?!!

    =======

    Since that's not possible... is it possible to update the form action value to a new dynamically created URL?

    window.frames[iframename].contentDocument.forms[hiddenform].action = URL;

    Doesn't work for me, I get hiddenform being undefined.
    Last edited by razka3; 09-09-2008 at 03:37 PM.

  4. #4
    rangana's Avatar
    Moderator/Allstar

    Status
    Offline
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    317

    Re: POSTing via location.replay(URL)

    Could you at least show some example of how this is going to be?

    I'm confused, I may help if I'm taking this right, you can split the URL and find whatever data you need.

    But as jthayne said, GET gathers data from URL and POST from elements in your markup.
    Checkout my porfolio.
    Please click the button when a member helped you.
    Take time to use Forum's Search function.

  5. #5
    razka3's Avatar
    New User

    Status
    Offline
    Join Date
    Sep 2008
    Posts
    10

    Re: POSTing via location.replay(URL)

    Certainly, it's fairly complex (at least for me). I am dynamically creating an iframe when a submit button is pressed on the main page. This iframe is inserted into the main page's html body. This iframe uses src=hidden.htm, which is a blank page other than an empty form and it also contains about 75 tokens to be parsed by the server and an onload event which calls back a function in the main page. So when the user hits the submit button on the main page, I generate a string of name=value pairs from the form on the main page. Then I would like to send this string to the form.action located in the hidden.htm. Then I would submit the form in the iframe via form.submit() which would send the string to the server to parse and actions will be performed, then the server will send back updated data to the hidden.htm which stores it in javascript vars. These vars are then pulled from the iframe by the main page and used to update displays.

    I've got everything setup perfectly other than the calls from the main page to the iframe to update the form.action and submit(). These two are erroring as object undefined. Which actually makes sense, because the iframe is loaded dynamically with the src set as hidden.htm, so the form (which is in hidden.htm) doesn't exist yet (i think).

    Seems like the only option I have is to dynamically create a form and add it to the iframe doc while I create the iframe dynamically. That seems really difficult and I don't want to get into that. Also I could instead of using hidden.htm page as src for iframe, create the hidden.htm when I create the iframe and insert it all into the main page... but that would require the dynamic creation of all those tokens as well as the form which is difficult and requires a lot of work.

    Seems like there should be an easy way to update the form action and submit the form from the main page. Any suggestions?

    Thanks,
    Frank

  6. #6
    razka3's Avatar
    New User

    Status
    Offline
    Join Date
    Sep 2008
    Posts
    10

    Re: POSTing via location.replay(URL)

    If you are interested... here's all the code from the index.htm and hidden.htm

    First one is index.htm
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>IDR-04 Test Integrator</title>
    
    <script type="text/javascript">
    	  
    	  var testPlan = {testLevel:${testLevel}, halt:${haltStatus}, loop:${loopStatus}, output:${outputStatus}, run:${runStatus}};
    	  
    	  var testObject1 = {display:${testDisplay1}, status:${testStatus1}, enabled:${testEnabled1}, name:"${testName1}", result:"${testResult1}"};
    	  var testObject2 = {display:${testDisplay2}, status:${testStatus2}, enabled:${testEnabled2}, name:"${testName2}", result:"${testResult2}"};
    	  var testObject3 = {display:${testDisplay3}, status:${testStatus3}, enabled:${testEnabled3}, name:"${testName3}", result:"${testResult3}"};
    	  var testObject4 = {display:${testDisplay4}, status:${testStatus4}, enabled:${testEnabled4}, name:"${testName4}", result:"${testResult4}"};
    	  var testObject5 = {display:${testDisplay5}, status:${testStatus5}, enabled:${testEnabled5}, name:"${testName5}", result:"${testResult5}"};
    	  var testObject6 = {display:${testDisplay6}, status:${testStatus6}, enabled:${testEnabled6}, name:"${testName6}", result:"${testResult6}"};
    	  var testObject7 = {display:${testDisplay7}, status:${testStatus7}, enabled:${testEnabled7}, name:"${testName7}", result:"${testResult7}"};
    	  var testObject8 = {display:${testDisplay8}, status:${testStatus8}, enabled:${testEnabled8}, name:"${testName8}", result:"${testResult8}"};
    	  var testObject9 = {display:${testDisplay9}, status:${testStatus9}, enabled:${testEnabled9}, name:"${testName9}", result:"${testResult9}"};
    	  var testObject10 = {display:${testDisplay10}, status:${testStatus10}, enabled:${testEnabled10}, name:"${testName10}", result:"${testResult10}"};
    	  var testObject11 = {display:${testDisplay11}, status:${testStatus11}, enabled:${testEnabled11}, name:"${testName11}", result:"${testResult11}"};
    	  var testObject12 = {display:${testDisplay12}, status:${testStatus12}, enabled:${testEnabled12}, name:"${testName12}", result:"${testResult12}"};
    	  var testObject13 = {display:${testDisplay13}, status:${testStatus13}, enabled:${testEnabled13}, name:"${testName13}", result:"${testResult13}"};
    	  var testObject14 = {display:${testDisplay14}, status:${testStatus14}, enabled:${testEnabled14}, name:"${testName14}", result:"${testResult14}"};
    	  var testObject15 = {display:${testDisplay15}, status:${testStatus15}, enabled:${testEnabled15}, name:"${testName15}", result:"${testResult15}"};
    	  var testObject16 = {display:${testDisplay16}, status:${testStatus16}, enabled:${testEnabled16}, name:"${testName16}", result:"${testResult16}"};
     	  
    	  var testObjects = new Array(testObject1, testObject2, testObject3, testObject4, testObject5, testObject6, testObject7, testObject8, testObject9, testObject10, testObject11, testObject12, testObject13, testObject14, testObject15, testObject16);
     	  var ipAddress = "0.0.0.0";
    	  
    	  var IFrameObj; // our IFrame object
     
    <!-- ************************************ -->		 
    <!-- *** preload variables and images *** -->				 
    <!-- ************************************ -->	
     
    	  function start() 
    	  {	  
    		  if(document.images) preImages("pass.png", "fail.png");
    		  preVars();
    	//	  loadPage();
    	  }
    	
    	  window.onload = start;
    	  
    	  function preVars()
    	  {
    	    document.form1.textOut.value = "!";
    		document.form1.LOOPCNT.value = "0";
    		TMDisplay(document.form1.TM);
    	  }
    	  
    	  function preImages()
    	  {
    	    var testImages = new Array();
    	    for (var x = 0; x < preImages.arguments.length; x++)
    		{
    		  testImages[x] = new Image();
    		  testImages[x].src = preImages.arguments[x];
    		}
    	  }
    	  
    <!-- ***************************** -->		 
    <!-- *** update checkbox value *** -->				 
    <!-- ***************************** -->		  
    
          function amIChecked(id)
    	  {
    	    if(document.getElementById(id).checked == true) document.getElementById(id).value = "C"; 
    		else document.getElementById(id).value = "N";
    	  }
    	  
    <!-- *************************** -->		 
    <!-- *** display test status *** -->				 
    <!-- *************************** -->		  
    	  
    	  function displayStatus(status)
    	  {
    	   switch (status)
    	   {
    	   	case 0: return ''; //'<img id="TestStatus" src="None.png" width="40" height="40" alt="No Status" border="0" />';  // No Status
    		case 1: return ''; //'<img id="TestStatus" src="Run.png" width="40" height="40" alt="Running" border="0" />';		// Running
    		case 2: return '<img id="TestStatus" src="pass.png" width="40" height="40" alt="Passed" border="0" />';     // Passed	  
    		case 3: return '<img id="TestStatus" src="fail.png" width="40" height="40" alt="Failed" border="0" />';  	// Failed
    		default: return 'XXX';	  // should never occur
    	   }
    	  }
    	  
    <!-- *************************** -->		 
    <!-- *** save output to file *** -->				 
    <!-- *************************** -->	
    
    	  function WriteToFile()
    	  {
    	   str = document.form1.textOut.value;
    	   mydoc = document.open();
    	   mydoc.write(str);
    	   mydoc.execCommand("saveAs", true, "IDR04TestIntegratorOutput.txt");
    	   mydoc.close();
    	   history.back();
    	   return false;
    	  }
    	  
    <!-- ****************************** -->		 
    <!-- *** display drop down menu *** -->				 
    <!-- ****************************** -->	
    
    	  function TMDisplay(dropdown)
    	  {
    	   // clear all check boxes and values...
    	   for (var i = 0; i < 16; i++)
    	   { 
    	     document.getElementById('cb' + i).checked = false; 
    		 document.getElementById('cb' + i).value = "N"; 
    		 document.getElementById('cb' + i).disabled = true;
    	   }
    		 
    	   // grab chosen combobox value 
    	   var selVal = dropdown.options[dropdown.selectedIndex].value; 
    	   
    	   if (selVal == 1) // production board test
    	   {
    	     document.getElementById('cb0').checked = true; document.getElementById('cb0').value = "C";
    		 document.getElementById('cb1').checked = true; document.getElementById('cb1').value = "C";
    		 document.getElementById('cb2').checked = true; document.getElementById('cb2').value = "C";
    		 document.getElementById('cb3').checked = true; document.getElementById('cb3').value = "C";
    		 document.getElementById('cb4').checked = true; document.getElementById('cb4').value = "C";
    		 document.getElementById('cb5').checked = true; document.getElementById('cb5').value = "C";
    	   } 
    	   else if (selVal == 2) // ess unit test
    	   {
    		 document.getElementById('cb6').checked = true; document.getElementById('cb6').value = "C";
    		 document.getElementById('cb7').checked = true; document.getElementById('cb7').value = "C";
    		 document.getElementById('cb8').checked = true; document.getElementById('cb8').value = "C";
    		 document.getElementById('cb9').checked = true; document.getElementById('cb9').value = "C";
    		 document.getElementById('cb10').checked = true; document.getElementById('cb10').value = "C";
    		 document.getElementById('cb11').checked = true; document.getElementById('cb11').value = "C";
    	   } 
    	   else if (selVal == 3) // basic board test
    	   {
    		 document.getElementById('cb12').checked = true; document.getElementById('cb12').value = "C";
    		 document.getElementById('cb13').checked = true; document.getElementById('cb13').value = "C";
    		 document.getElementById('cb14').checked = true; document.getElementById('cb14').value = "C";
    		 document.getElementById('cb15').checked = true; document.getElementById('cb15').value = "C";
    	   }
    	   else if (selVal == 4) // debug mode - hand select tests
    	   {
    	   	for (var i = 0; i < 16; i++)
    	   	{  
    		 document.getElementById('cb' + i).disabled = false;
    	   	}
    	   }
    	  }
    	  
    <!-- ************************** -->		 
    <!-- *** build query string *** -->				 
    <!-- ************************** -->	
    
    	  function BuildQueryString(theFormName)
    	  {
    	   var theForm = document.forms[theFormName];
    	   var qs = 'hidden.htm'
    	   for (var e = 0; e < theForm.elements.length; e++)
    	   {
    		if (theForm.elements[e].name != '')
    		{
    		 qs += (qs == 'hidden.htm') ? '?' : '&'
    		 qs += theForm.elements[e].name + '=' + escape(theForm.elements[e].value);
    		}
    	   }
    	   return qs;
    	  }
    	  	 
    <!-- ********************** -->		 
    <!-- *** call to server *** -->				 
    <!-- ********************** -->	
    
    	  function CallToServer(theFormName)
    	  {
    //	   document.testPlan.run = 2;
    	   document.getElementById('RUNSTATUS').value = "2";
    	   document.getElementById('TestControl').disabled = true;
    	   
    	   // enable all check boxes before sending POST
    	   for (var i = 0; i < 16; i++) document.getElementById('cb' + i).disabled = false;
    	  
    	   if (!document.createElement) {return true};
      	   var IFrameDoc;
    	   
    	   // build POST URL
    	   var URL = BuildQueryString(theFormName);
    //	   document.getElementById('textOut').value = URL; 			 // TESTING URL BUILD ***********************************
    	   
    	   // build iframe
      	   if (!IFrameObj && document.createElement) 
    	   {
           	  // create the IFrame and assign a reference to the
        	  // object to our global variable IFrameObj.
        	  // this will only happen the first time 
        	  // callToServer() is called
       		  try 
    		  {
          	  	  var tempIFrame=document.createElement('iframe');
          		  tempIFrame.setAttribute('id','RSIFrame');
    			  tempIFrame.setAttribute('name','RSIFrame');
    	  		  tempIFrame.setAttribute('src','hidden.htm');
          		  tempIFrame.style.border='0px';
          		  tempIFrame.style.width='0px';
          		  tempIFrame.style.height='0px';
          		  IFrameObj = document.body.appendChild(tempIFrame);
    			  
    			  var iform = document.createElement('form');
    			  iform.method = 'post';
    			  iform.name = 'hform';
    			  iform.id = 'hform';
    			  iform.setAttribute('action', URL);
    			  iFrameObj.document.body.appendChild(iform);
    			  alert(document.getElementById('hform'));
          
          		  if (document.frames) IFrameObj = document.frames['RSIFrame'];    	 	   	 // for IE5 Mac
        	   } 
    		   catch(exception) 	   			   											 // for IE5 PC -- USES THIS ONE *******
    		   {
          		iframeHTML='\<iframe name="RSIFrame" id="RSIFrame" src="hidden.htm" style="border:0px;width:0px;height:0px;"><\/iframe>';
          		document.body.innerHTML+=iframeHTML;
          		IFrameObj = new Object();
          		IFrameObj.document = new Object();
          		IFrameObj.document.location = new Object();
          		IFrameObj.document.location.iframe = document.getElementById('RSIFrame');
          		IFrameObj.document.location.replace = function(location) { this.iframe.src = location; }
        	   }
      		}
    		  
      		if (navigator.userAgent.indexOf('Gecko') !=-1 && !IFrameObj.contentDocument)   	 // for NS6
    		{
        	  setTimeout('callToServer()',10); // pause
        	  return false;
      		}
      
        	if (IFrameObj.contentDocument) IFrameDoc = IFrameObj.contentDocument; 		 	// for NS6
    		else if (IFrameObj.contentWindow) IFrameDoc = IFrameObj.contentWindow.document; // For IE5.5 and IE6 
    		else if (IFrameObj.document) IFrameDoc = IFrameObj.document;					// For IE5    -- USES THIS ONE *******
    		else return true;
    
      		// disable all check boxes after sending POST
      		for (var i = 0; i < 16; i++) document.getElementById('cb' + i).disabled = true;
      
      		// send URL to iframe for POSTing
      //		IFrameDoc.location.replace(URL);
    
    //  			alert(IFrameDoc);
    // 			IFrameDoc.forms[0].action = URL;
    			IFrameDoc.forms[0].submit();
    //		window.frames['RSIFrame'].contentWindow.document.hiddenForm.action.value = URL;
    //		window.frames['RSIFrame'].contentWindow.document.hiddenForm.submit();
    		//document.getElementById('RSIFrame').document.getElementById('hiddenForm').submit();
    		
      		return false;
    }
    	    
    <!-- *********************************************** -->		 
    <!-- *** handle response from server->hidden.htm *** -->				 
    <!-- *********************************************** -->	
    	  
    	  function HandleResponse(doc)
    	  {
    	   var iframe = document.getElementById('RSIFrame');
    	   
    	   document.testPlan = iframe.contentWindow['testPlan'];
    	   document.testObjects = iframe.contentWindow['testObjects'];
    	   
    	   document.testObject1 = iframe.contentWindow['testObject1'];
    	   document.testObject2 = iframe.contentWindow['testObject2'];
    	   document.testObject3 = iframe.contentWindow['testObject3'];
    	   document.testObject4 = iframe.contentWindow['testObject4'];
    	   document.testObject5 = iframe.contentWindow['testObject5'];
    	   document.testObject6 = iframe.contentWindow['testObject6'];
    	   document.testObject7 = iframe.contentWindow['testObject7'];
    	   document.testObject8 = iframe.contentWindow['testObject8'];
    	   document.testObject9 = iframe.contentWindow['testObject9'];
    	   document.testObject10 = iframe.contentWindow['testObject10'];
    	   document.testObject11 = iframe.contentWindow['testObject11'];
    	   document.testObject12 = iframe.contentWindow['testObject12'];
    	   document.testObject13 = iframe.contentWindow['testObject13'];
    	   document.testObject14 = iframe.contentWindow['testObject14'];
    	   document.testObject15 = iframe.contentWindow['testObject15'];
    	   document.testObject16 = iframe.contentWindow['testObject16'];
    	   
    	   document.getElementById('form1').textOut.value = document.testPlan.results;
    	   document.getElementById('form1').LOOPCNT.value = document.testPlan.count;
    	   
    	   // setTimeout(100);
    	   CheckStatus(); // check status of tests run...
    
    	   document.getElementById('TestControl').disabled = false;	   
    	  }
    	  
    <!-- ************************************* -->		 
    <!-- *** check overall status of tests *** -->				 
    <!-- ************************************* -->		  
    	  
    	  function CheckStatus()
    	  {
    	   var failed = false;
    	   document.getElementById('AllTestStatus').style.color = "green";
    	   var i = 0;
    	   while (i < 16)
    	   {
    	   	if (testObjects[i].status == 3)
    	    { 
    	     document.getElementById('AllTestStatus').style.color = "red";
    		 failed = true;
    		 i++;
    	    }
    		else i++;
    	   }
    	   if (failed == true) document.getElementById('AllTestStatus').value = "FAILURE!";
    	   else document.getElementById('AllTestStatus').value = "SUCCESS!";
    	  }
    	  
    <!-- **************************************** -->		 
    <!-- *** input IP Addy and load main page *** -->				 
    <!-- **************************************** -->	
    
    	  function loadPage()
    	  {
    //	   var ip1 = document.getElementById('IP1').value;
    //	   var ip2 = document.getElementById('IP2').value;
    //	   var ip3 = document.getElementById('IP3').value;
    //	   var ip4 = document.getElementById('IP4').value;
    	   
    //	   document.ipAddress = ip1.toString() + '.' + ip2.toString() + '.' + ip3.toString() + '.' + ip4.toString();
    //	   document.getElementById('Page').removeChild(document.getElementById('IPPrompt'));
    //	   document.getElementById('mainPage').style.visibility = "visible";
    //	   alert(document.ipAddress);
    	   document.getElementById('slowScreenSplash').style.display = "none";
    	   document.getElementById('mainPage').style.visibility = "visible";
    	  }
    	  
    <!-- ******************** -->		 
    <!-- *** clear output *** -->				 
    <!-- ******************** -->	
    	  
    	  function ClearOutput()
    	  {
    	   document.getElementById('textOut').value = "!";
    	   return false;
    	  }
    	  
    </script>
       
    <!-- ****************** -->		 
    <!-- *** start HTML *** -->				 
    <!-- ****************** -->	
    
    </head>
    <body bgcolor="#ffba00">
    <div id="Page">
    
    <!--
    <div align="center" id="IPPrompt" style="visibility: hidden">
    <form name="ipform" id="ipform"><font size="6">
    Enter IP Address of Board:</font><br><input id="IP1" name="IP1" style="WIDTH: 60px; HEIGHT: 21px" size="4">&nbsp;<font>.</font>&nbsp;<input id="IP2" name="IP2" style="WIDTH: 60px; HEIGHT: 21px" size="4">&nbsp;<font>.</font>&nbsp;<input id="IP3" name="IP3" style="WIDTH: 60px; HEIGHT: 21px" size="4">&nbsp;<font>.</font>&nbsp;<input id="IP4" name="IP4" style="WIDTH: 60px; HEIGHT: 21px" size="4">
    <input type="button" value="Submit" style="LEFT: 108px; WIDTH: 150px; TOP: 568px; HEIGHT: 30px" onclick="loadPage()">
    </form>
    </div>
    -->
    
    <div id="slowScreenSplash" Style="position:absolute;z-index:5;top:40%;left:15%;visibility:hidden" align="center">
    Please wait while page loads...
    </div>
    
    <div id="mainPage" style="visibility: visible">
    
    <form name="form1" id="form1" onsubmit="return CallToServer(this.name)" >
    <!--
    <form name="form1" id="form1" action="hidden.htm" method="POST">-->
    <table border="0">
      <tr>
        <td>
    		<font face="Raavi" size="6"><strong>Wabtec IDR-04 Test Integrator</strong></font>
    		<font face="System" size="2"><br>
    		Test Action:<br><select id="TM" style="WIDTH: 359px" onchange="TMDisplay(this.form.TM)" name="TM"><option value="1" selected>Run Production Board Test (Use FN xxx)</option><option value="2">Run Top Level Unit Test (Use FN xxx)</option>
    		<option value="3">Basic Board Test (No Fixture)</option><option value="4">Debug - Select Tests From List</option></select>
    		<br><select id="ERR" name="ERR" style="WIDTH: 143px"><option value="1" selected>Halt On Error</option><option value="2">Continue on Error</option></select><select id="LOOP" name="LOOP" style="WIDTH: 96px"><option value="1" selected>Run Once</option><option value="2">Loop 
            Test</option></select><select id="OUTPUT" style="WIDTH: 120px" name="OUTPUT"><option value="1" selected>Brief Output</option><option value="2">Verbose Output</option></select>
    		<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    		<input type="submit" id="TestControl" style="LEFT: 120px; TOP: 165px WIDTH: 150px; HEIGHT: 30px" alt="Start Test" size="102" value="Start Testing">
    		<br><br><input id="LOOPCNT" name="LOOPCNT" style="WIDTH: 38px; HEIGHT: 21px" size="4" readonly> Test Loop Count</font>
    		<font size="2"><br><br>Test Results:<br><textarea id="textOut" style="WIDTH: 365px; HEIGHT: 225px" name="textOut" rows="15" readonly cols="41"></textarea><br>
    		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    		<input style="LEFT: 108px; WIDTH: 150px; TOP: 568px; HEIGHT: 30px" onclick="return ClearOutput()" type="submit" size="102" value="Clear Test Results">
    		&nbsp;&nbsp;
    	    <input style="LEFT: 108px; WIDTH: 150px; TOP: 568px; HEIGHT: 30px" onclick="return WriteToFile()" type="submit" size="102" value="Save Test Results"><br>
          	<input type="hidden" name="RUNSTATUS" id="RUNSTATUS" value="1">
    		<br>
    		<br>
    		<table width="100%" border="0">
             <tr>
              <td width="133"><font size="4">Status of Tests:</font></td>
              <td>&nbsp;<input id="AllTestStatus" name="AllTestStatus" style="WIDTH: 85px; HEIGHT: 21px; color: black; font-weight: bold" size="6" readonly value="No Tests Run"></font></td>
    		 </tr>
    	    </table>
    		</font>
    	</td>
    	<td><font face="System" size="2">&nbsp;&nbsp;&nbsp;Test Selection:<br></font>
    		<table border="0">
            	   <tr><td width="31"><p align="center"><script type="text/javascript">document.write(displayStatus(testObject1.status))</script></p></td><td width="33"><p align="center"><input style="WIDTH: 15px; HEIGHT: 30px" type="checkbox" size="15" name="CB0" id="cb0" onclick="amIChecked(this.id)"></p></td><td><p align="left"><font face="System" size="1"><script type="text/javascript">document.write(testObject1.name)</script></font></p></td></tr>
            	   <tr><td width="31"><p align="center"><script type="text/javascript">document.write(displayStatus(testObject2.status))</script></p></td><td width="33"><p align="center"><input style="WIDTH: 15px; HEIGHT: 30px" type="checkbox" size="15" name="CB1" id="cb1" onclick="amIChecked(this.id)"></p></td><td><p align="left"><font face="System" size="1"><script type="text/javascript">document.write(testObject2.name)</script></font></p></td></tr>
            	   <tr><td width="31"><p align="center"><script type="text/javascript">document.write(displayStatus(testObject3.status))</script></p></td><td width="33"><p align="center"><input style="WIDTH: 15px; HEIGHT: 30px" type="checkbox" size="15" name="CB2" id="cb2" onclick="amIChecked(this.id)"></p></td><td><p align="left"><font face="System" size="1"><script type="text/javascript">document.write(testObject3.name)</script></font></p></td></tr>
            	   <tr><td width="31"><p align="center"><script type="text/javascript">document.write(displayStatus(testObject4.status))</script></p></td><td width="33"><p align="center"><input style="WIDTH: 15px; HEIGHT: 30px" type="checkbox" size="15" name="CB3" id="cb3" onclick="amIChecked(this.id)"></p></td><td><p align="left"><font face="System" size="1"><script type="text/javascript">document.write(testObject4.name)</script></font></p></td></tr>
            	   <tr><td width="31"><p align="center"><script type="text/javascript">document.write(displayStatus(testObject5.status))</script></p></td><td width="33"><p align="center"><input style="WIDTH: 15px; HEIGHT: 30px" type="checkbox" size="15" name="CB4" id="cb4" onclick="amIChecked(this.id)"></p></td><td><p align="left"><font face="System" size="1"><script type="text/javascript">document.write(testObject5.name)</script></font></p></td></tr>
           		   <tr><td width="31"><p align="center"><script type="text/javascript">document.write(displayStatus(testObject6.status))</script></p></td><td width="33"><p align="center"><input style="WIDTH: 15px; HEIGHT: 30px" type="checkbox" size="15" name="CB5" id="cb5" onclick="amIChecked(this.id)"></p></td><td><p align="left"><font face="System" size="1"><script type="text/javascript">document.write(testObject6.name)</script></font></p></td></tr>
            	   <tr><td width="31"><p align="center"><script type="text/javascript">document.write(displayStatus(testObject7.status))</script></p></td><td width="33"><p align="center"><input style="WIDTH: 15px; HEIGHT: 30px" type="checkbox" size="15" name="CB6" id="cb6" onclick="amIChecked(this.id)"></p></td><td><p align="left"><font face="System" size="1"><script type="text/javascript">document.write(testObject7.name)</script></font></p></td></tr>
            	   <tr><td width="31"><p align="center"><script type="text/javascript">document.write(displayStatus(testObject8.status))</script></p></td><td width="33"><p align="center"><input style="WIDTH: 15px; HEIGHT: 30px" type="checkbox" size="15" name="CB7" id="cb7" onclick="amIChecked(this.id)"></p></td><td><p align="left"><font face="System" size="1"><script type="text/javascript">document.write(testObject8.name)</script></font></p></td></tr>
            	   <tr><td width="31"><p align="center"><script type="text/javascript">document.write(displayStatus(testObject9.status))</script></p></td><td width="33"><p align="center"><input style="WIDTH: 15px; HEIGHT: 30px" type="checkbox" size="15" name="CB8" id="cb8" onclick="amIChecked(this.id)"></p></td><td><p align="left"><font face="System" size="1"><script type="text/javascript">document.write(testObject9.name)</script></font></p></td></tr>
            	   <tr><td width="31"><p align="center"><script type="text/javascript">document.write(displayStatus(testObject10.status))</script></p></td><td width="33"><p align="center"><input style="WIDTH: 15px; HEIGHT: 30px" type="checkbox" size="15" name="CB9" id="cb9" onclick="amIChecked(this.id)"></p></td><td><p align="left"><font face="System" size="1"><script type="text/javascript">document.write(testObject10.name)</script></font></p></td></tr>
    		       <tr><td width="31"><p align="center"><script type="text/javascript">document.write(displayStatus(testObject11.status))</script></p></td><td width="33"><p align="center"><input style="WIDTH: 15px; HEIGHT: 30px" type="checkbox" size="15" name="CB10" id="cb10" onclick="amIChecked(this.id)"></p></td><td><p align="left"><font face="System" size="1"><script type="text/javascript">document.write(testObject11.name)</script></font></p></td></tr>
            	   <tr><td width="31"><p align="center"><script type="text/javascript">document.write(displayStatus(testObject12.status))</script></p></td><td width="33"><p align="center"><input style="WIDTH: 15px; HEIGHT: 30px" type="checkbox" size="15" name="CB11" id="cb11" onclick="amIChecked(this.id)"></p></td><td><p align="left"><font face="System" size="1"><script type="text/javascript">document.write(testObject12.name)</script></font></p></td></tr>
            	   <tr><td width="31"><p align="center"><script type="text/javascript">document.write(displayStatus(testObject13.status))</script></p></td><td width="33"><p align="center"><input style="WIDTH: 15px; HEIGHT: 30px" type="checkbox" size="15" name="CB12" id="cb12" onclick="amIChecked(this.id)"></p></td><td><p align="left"><font face="System" size="1"><script type="text/javascript">document.write(testObject13.name)</script></font></p></td></tr>
            	   <tr><td width="31"><p align="center"><script type="text/javascript">document.write(displayStatus(testObject14.status))</script></p></td><td width="33"><p align="center"><input style="WIDTH: 15px; HEIGHT: 30px" type="checkbox" size="15" name="CB13" id="cb13" onclick="amIChecked(this.id)"></p></td><td><p align="left"><font face="System" size="1"><script type="text/javascript">document.write(testObject14.name)</script></font></p></td></tr>
            	   <tr><td width="31"><p align="center"><script type="text/javascript">document.write(displayStatus(testObject15.status))</script></p></td><td width="33"><p align="center"><input style="WIDTH: 15px; HEIGHT: 30px" type="checkbox" size="15" name="CB14" id="cb14" onclick="amIChecked(this.id)"></p></td><td><p align="left"><font face="System" size="1"><script type="text/javascript">document.write(testObject15.name)</script></font></p></td></tr>
            	   <tr><td width="31"><p align="center"><script type="text/javascript">document.write(displayStatus(testObject16.status))</script></p></td><td width="33"><p align="center"><input style="WIDTH: 15px; HEIGHT: 30px" type="checkbox" size="15" name="CB15" id="cb15" onclick="amIChecked(this.id)"></p></td><td><p align="left"><font face="System" size="1"><script type="text/javascript">document.write(testObject16.name)</script></font></p></td></tr>
    		</table>
    	</td>
      </tr>
    </table>
    </form>
    </div>
    </div>
    </body>
    </html>
    Second one is hidden.htm
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <title></title>
    <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
    <!--<meta http-equiv="refresh" content="15" />-->
      <script type="text/javascript">
    
      	  var testPlan = {testLevel:${testLevel}, halt:${haltStatus}, loop:${loopStatus}, output:${outputStatus}, run:${runStatus}, results:"${testResults}", count:${countStatus}};
    	  
    	  var testObject1 = {display:${testDisplay1}, status:${testStatus1}, enabled:${testEnabled1}, name:"${testName1}", result:"${testResult1}"};
          var testObject2 = {display:${testDisplay2}, status:${testStatus2}, enabled:${testEnabled2}, name:"${testName2}", result:"${testResult2}"};
    	  var testObject3 = {display:${testDisplay3}, status:${testStatus3}, enabled:${testEnabled3}, name:"${testName3}", result:"${testResult3}"};
    	  var testObject4 = {display:${testDisplay4}, status:${testStatus4}, enabled:${testEnabled4}, name:"${testName4}", result:"${testResult4}"};
    	  var testObject5 = {display:${testDisplay5}, status:${testStatus5}, enabled:${testEnabled5}, name:"${testName5}", result:"${testResult5}"};
    	  var testObject6 = {display:${testDisplay6}, status:${testStatus6}, enabled:${testEnabled6}, name:"${testName6}", result:"${testResult6}"};
    	  var testObject7 = {display:${testDisplay7}, status:${testStatus7}, enabled:${testEnabled7}, name:"${testName7}", result:"${testResult7}"};
    	  var testObject8 = {display:${testDisplay8}, status:${testStatus8}, enabled:${testEnabled8}, name:"${testName8}", result:"${testResult8}"};
    	  var testObject9 = {display:${testDisplay9}, status:${testStatus9}, enabled:${testEnabled9}, name:"${testName9}", result:"${testResult9}"};
    	  var testObject10 = {display:${testDisplay10}, status:${testStatus10}, enabled:${testEnabled10}, name:"${testName10}", result:"${testResult10}"};
    	  var testObject11 = {display:${testDisplay11}, status:${testStatus11}, enabled:${testEnabled11}, name:"${testName11}", result:"${testResult11}"};
    	  var testObject12 = {display:${testDisplay12}, status:${testStatus12}, enabled:${testEnabled12}, name:"${testName12}", result:"${testResult12}"};
    	  var testObject13 = {display:${testDisplay13}, status:${testStatus13}, enabled:${testEnabled13}, name:"${testName13}", result:"${testResult13}"};
    	  var testObject14 = {display:${testDisplay14}, status:${testStatus14}, enabled:${testEnabled14}, name:"${testName14}", result:"${testResult14}"};
    	  var testObject15 = {display:${testDisplay15}, status:${testStatus15}, enabled:${testEnabled15}, name:"${testName15}", result:"${testResult15}"};
    	  var testObject16 = {display:${testDisplay16}, status:${testStatus16}, enabled:${testEnabled16}, name:"${testName16}", result:"${testResult16}"};
     	  
    	  var testObjects = new Array(testObject1, testObject2, testObject3, testObject4, testObject5, testObject6, testObject7, testObject8, testObject9, testObject10, testObject11, testObject12, testObject13, testObject14, testObject15, testObject16);
      </script>
    </head>
    <body onload="if (parent != self) parent.HandleResponse(document)">
    <form id="hiddenForm" name="hiddenForm" method="post" action=""></form>
    
    </body>
    </html>

  7. #7
    razka3's Avatar
    New User

    Status
    Offline
    Join Date
    Sep 2008
    Posts
    10

    Re: POSTing via location.replay(URL)

    Maybe another option would be to copy the whole form from the main page over to the iframe document? Think that would work? How would I do that anyway? I'm very new to this javascript and html stuff.

    Thanks,
    Frank



Tags for this Thread