add image in absolute positioning

Last post 08-15-2005, 12:12 PM by Adam. 1 replies.
Sort Posts: Previous Next
  •  08-15-2005, 10:07 AM 9573

    add image in absolute positioning

    Can someone recommend a script or solution to modify the existing add image button so that the image will have absolute position or else to add a new button.  I have the code for adding a text button but need this to apply to the image.  Thanks!
  •  08-15-2005, 12:12 PM 9574 in reply to 9573

    Re: add image in absolute positioning

    rneel,
     
    Please copy and paste the following JavaScript code into the bottom of your insert_image.asp page.
     
    function insert_Image() { var img=oControl; img.src = document.getElementById("TargetUrl").value; if (document.getElementById("Width").value) img.width = document.getElementById("Width").value; if (document.getElementById("Height").value) img.height = document.getElementById("Height").value; if (document.getElementById("VSpace").value) img.vspace = document.getElementById("VSpace").value; if (document.getElementById("HSpace").value) img.hspace = document.getElementById("HSpace").value; if (document.getElementById("Border").value) img.border = document.getElementById("Border").value; try { img.style.borderColor = document.getElementById("bordercolor").value; } catch(er) { alert("Please enter a correct color value."); return false; } if (document.getElementById("Align").value) img.align = document.getElementById("Align").value; if (document.getElementById("AlternateText").value) img.alt = document.getElementById("AlternateText").value; if (document.getElementById("TargetUrl").value == "") { alert("Please choose an image to insert"); return false; } img.style.position='absolute'; window.returnValue=img; window.close(); }

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

View as RSS news feed in XML