Question : How to modify this javascript to open links in a new window?

Experts,

I need to modify the following script so that it opens the links it creates in another window (target="_blank").  Can someone offer some support?
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
<script language="JavaScript" type="text/javascript">

var qsParm = new Array();


/* ---------------------------------------------------------------------- *\
  Function    : retrieveWYSIWYG()
  Description : Retrieves the textarea ID for which the link will be inserted into.
\* ---------------------------------------------------------------------- */
function retrieveWYSIWYG() {
  var query = window.location.search.substring(1);
  var parms = query.split('&');
  for (var i=0; i<parms.length; i++) {
    var pos = parms[i].indexOf('=');
    if (pos > 0) {
       var key = parms[i].substring(0,pos);
       var val = parms[i].substring(pos+1);
       qsParm[key] = val;
    }
  }
}


function insertHyperLink() {
  var hyperLink = document.getElementById('linkType').value + document.getElementById('url').value;
  window.opener.document.getElementById('wysiwyg' + qsParm['wysiwyg']).contentWindow.document.execCommand("CreateLink", false, hyperLink);
  window.close();
}

</script>
<body bgcolor="#EEEEEE" marginwidth="0" marginheight="0" topmargin="0" leftmargin="0" onLoad="retrieveWYSIWYG();">

<table border="0" cellpadding="0" cellspacing="0" style="padding: 10px;"><tr><td>

<span style="font-size:10px;">
<b>Insert Hyperlink:</b>
<br/><br/>
<b>1.</b> If using a URL to an external website, copy and paste the entire url starting with 'www'.
<br/>
<b>2.</b> If using the 'mailto' option, enter the email address email recipient.</span>
<table width="280" border="0" cellpadding="0" cellspacing="0" style="background-color: #F7F7F7; border: 2px solid #FFFFFF; padding: 5px;">
 <tr>
  <td style="padding-bottom: 2px; width: 50px; font-family: arial, verdana, helvetica; font-size: 11px;">Type:</td>
	<td style="padding-bottom: 2px;">
	<select name="linkType" id="linkType" style="margin-right: 10px; font-size: 10px;">
	 <option value="http://">http:</option>
     <option value="https://">https:</option>
	 <option value="mailto:">mailto:</option>
	</select>
	</td>	
 </tr>
 <tr>
  <td style="padding-bottom: 2px; padding-top: 0px; font-family: arial, verdana, helvetica; font-size: 11px;">URL:</td>
	<td style="padding-bottom: 2px; padding-top: 0px;"><input type="text" name="url" id="url" onFocus="this.value=''" value="Example: www.kp.org"  style="font-size: 10px; width: 100%;"></td>
 </tr>
</table>	

<div align="right" style="padding-top: 5px;"><input type="submit" value="  Submit  " onClick="insertHyperLink();" style="font-size: 12px;" >&nbsp;<input type="submit" value="  Cancel  " onClick="window.close();" style="font-size: 12px;" ></div>

</tr></td></table>

</body>

Answer : How to modify this javascript to open links in a new window?

You can read in the bytes of the file to upload and send it as a stream using Sockets.  Here is a site that shows how to send data between client (the Windows application) and server (where you want to upload the file to).  http://www.c-sharpcorner.com/uploadfile/dottys/socketprogdtrp11222005023030am/socketprogdtrp.aspx
Random Solutions  
 
programming4us programming4us