Home: htmlArea 2: htmlArea 2 & 3 archive (read only): htmlArea v2.0 - Add-Ons:
image upload to file upload



Perra
New User

Oct 28, 2004, 4:52 AM


Views: 43189
image upload to file upload

Hey

I have v2.03 and can upload images and files, but the file(ex pdf) become in the html code as IMG tag and not in <A> tag. in witch file can I change this. I probably use similar code in both uploads but cant find where to change the img-tag to A-tag.

Hope you understand a noob question. /Perra


Sara
Novice

Jan 21, 2005, 2:40 PM


Views: 42360
Re: [Perra] image upload to file upload

Take a look at the insert_hyperlink.html popup and take the function from there: I can't remember all changes I made but I have the function:

function returnSelected() {

// href
var text = escape( "<a href='get_file.php?file=" );
text = text + escape( file );
if (folder != "doc")
{
text = text + escape( "&dir=" );
text = text + escape( folder );
}


// title
if (txtTitleText.value != "") {
text = text + escape( "' title='" );
text = text + escape( txtTitleText.value );
}

// target
if (target != "") {
text = text + escape( "' target='" );
text = text + escape( target );
}

text = text + escape( "'>" );
text = text + escape( txtAltText.value );
text = text + escape( "</a>" );

window.returnValue = text; // set return value
window.close(); // close dialog

}



and call it width the OK-button:

<input class="btnOK" type="submit" value="OK" name="btnOK" onclick="returnSelected()">



I hope this will help you

/Sara