Calling the dialog box on image click....see two lines below....and followed by the javascript function on the same .aspx page. Nothing happens, when you click on the browse button...no dialog box comes up.
Editor1.Setting(
"security:FilesGalleryPath") = struploadinfo(0) 'sets the path
Editor1.Setting("security:MaxDocumentFolderSize") = struploadinfo(1) 'sets the Folder limit
Editor1.Setting("security:MaxDocumentSize") = struploadinfo(2) 'sets the file limit
<asp:TextBox id="docFile" ReadOnly ="true" CssClass="longfield-select" runat="server" />
<img alt="" title ="Browse" style="cursor: pointer" align="absmiddle" src="../buttons/browse.gif" onclick="callInsertImage()" runat ="server" id="Change" NAME="Change" />
<script type ="text/javascript" language ="javascript" >
function callInsertImage()
{
var editor1 = document.getElementById('<%=Editor1.ClientID%>');
editor1.FocusDocument();
var editdoc = editor1.GetDocument();
editor1.ExecCommand(
'new');
editor1.ExecCommand(
'insertdocument');
InputURL();
window.document.getElementById(
"docFile").focus();
}
function
InputURL()
{
var editor1 = window.document.getElementById('<%=Editor1.ClientID%>');
var editdoc = editor1.GetDocument();
var links = editdoc.getElementsByTagName("a");
if(links.length>0&&links[links.length-1].href!="")
{
window.document.getElementById(
"docFile").value = links[links.length-1].href;
var docurl = links[links.length-1].href;
var strImageGallery = docurl.lastIndexOf("/");
var urllength = docurl.length;
var newurl = docurl.substring(strImageGallery+1, urllength);
window.document.getElementById(
"docFile").value=newurl
window.document.getElementById(
"HiddenField1").value=window.document.getElementById("docFile").value
}
else
{
setTimeout(InputURL,500);
}
}