function checkform()
{
some validation
$('#form1').submit(function() {
window.open('', 'formpopup', '');
this.target = 'formpopup';
});
}
function confirmPrint(theID)
{
var sURL = "checkifprintedModal.cfm?myID="+theID;
showPopWin(sURL,600,375,null);
}
function loaddata()
{
ajax to load table form
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
document.getElementById("mydata").innerHTML=xmlhttp.responseText;
}
}
xmlhttp.open("GET","getmystuff.cfm?accountID="+encodeURIComponent(accountID),true);
xmlhttp.send();
}
<body onload="loaddata();">
<form id="form1" target="_blank" onsubmit="return checkform()">
<div id="mydata">
<table>
<!--- ajax data goes here --->
<tr>
<td> <input type="submit" value="Submit">
</tr>
</table>
</div>
<table>
</form>
</body>
$('#form1').submit(function() {
$('#this').target="new";
});
and var targetvalue = "new";
$('#form1').prop("target", targetvalue);
$('#form1').submit(function() {
$('#form1.target')="new";
});
with this I am getting js error saying "Uncaught ReferenceError: Invalid left-hand side in assignment"Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.
”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Distinguished Expert awards are presented to the top veteran and rookie experts to earn the most points in the top 50 topics.