Index: CKEditor/trunk/CHANGES.html
===================================================================
--- CKEditor/trunk/CHANGES.html	(revision 4992)
+++ CKEditor/trunk/CHANGES.html	(revision 4993)
@@ -50,4 +50,5 @@
 		<li><a href="http://dev.fckeditor.net/ticket/4724">#4724</a> : Using the mouse to insert a link in IE might create incorrect results.</li>
 		<li><a href="http://dev.fckeditor.net/ticket/4640">#4640</a> : Small optimizations for the fileBrowser plugin.</li>
+		<li><a href="http://dev.fckeditor.net/ticket/4583">#4583</a> : The "Target Frame Name" field only visible when select is 'frame'.</li>
 		<li><a href="http://dev.fckeditor.net/ticket/4863">#4863</a> : Fixing iframedialog's height doesn't stretch to 100%</li>
 		<li><a href="http://dev.fckeditor.net/ticket/4964">#4964</a> : The BACKSPACE key positioning was not correct in some cases with Firefox.</li>
Index: CKEditor/trunk/_source/plugins/link/dialogs/link.js
===================================================================
--- CKEditor/trunk/_source/plugins/link/dialogs/link.js	(revision 4992)
+++ CKEditor/trunk/_source/plugins/link/dialogs/link.js	(revision 4993)
@@ -18,16 +18,24 @@
 
 		popupFeatures = popupFeatures.getElement();
-
-		if ( value == 'popup' )
-		{
-			popupFeatures.show();
-			targetName.setLabel( editor.lang.link.targetPopupName );
-		}
-		else
-		{
-			popupFeatures.hide();
-			targetName.setLabel( editor.lang.link.targetFrameName );
-			this.getDialog().setValueOf( 'target', 'linkTargetName', value.charAt( 0 ) == '_' ? value : '' );
-		}
+		popupFeatures.hide();
+		targetName.setValue( '' );
+		
+		switch ( value )
+ 		{
+			case 'frame' :
+				targetName.setLabel( editor.lang.link.targetFrameName );
+				targetName.getElement().show();
+				break;
+			case 'popup' :
+				popupFeatures.show();
+				targetName.setLabel( editor.lang.link.targetPopupName );
+				targetName.getElement().show();
+				break;
+			default :
+				targetName.setValue( value );
+				targetName.getElement().hide();
+				break;
+ 		}
+		
 	};
 
