Potential solution for Insert Link (ASP version 3.0)

Last post 07-05-2005, 4:53 PM by Adam. 3 replies.
Sort Posts: Previous Next
  •  07-02-2005, 11:05 PM 8300

    Potential solution for Insert Link (ASP version 3.0)

    Adam,
    I have a potential solution for the Insert Link (ASP version 3.0) if you are interested. I don't know if you are supporting version 3.0 any longer, but I have something that works for me. If you are interested I can post it.

    Great product!
    bvo
  •  07-03-2005, 11:20 PM 8324 in reply to 8300

    Re: Potential solution for Insert Link (ASP version 3.0)

    bvo,
     
    Thanks for the kind words about CuteEditor.
     
    Yes, we are interested.
     
    Please use the new "Insert Code" button to post your code here.
     
    Example:
     
    <script type="text/javascript"> function message() { alert("This alert box was called with the onload event") } </script>

    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

  •  07-05-2005, 4:27 PM 8374 in reply to 8324

    Re: Potential solution for Insert Link (ASP version 3.0)

    Adam,
    I'm not sure where the 'Insert Code' button is. Hmmmm! So I used a textarea box.

    To start with I'm no javascript guy!

    Currently I am not using the 'Type' (https, ftp, gopher, news, etc) stuff. Only the http: is needed for my purpose. I'm sure it could be worked on a bit more to consider these other types. The problem I found with the original code was with the javascript command 'pasteHTML(HTML)'. This is found in the WinIE.js file. If the command pasteHTML(HTML) sees the HTML variable as a link (the string contains the href that sets this baby off), it will default to the absolute path and the browser will insert the 'http://www.domain.com/yourfile.asp automatically. THIS COMMAND WILL NOT DO RELATIVE LINKS! Don't know how to get around it. Did alot of research but didn't find much info on this command that would possibly allow me to insert a relative link. Found out by trial and error that if I typed '//http://www.domain.com' in the URL textbox of the insert_link.asp  file (notice the '//' at the begining of the URL) that it would remove the domain name and insert only 'http' + any text after that. So to me the // was key. I then wrote code that would test for the 'http' in the imgname.value variable. If it was not present an alert("You must use a complete URL - http://www.domain-name.com") would prompt the user to use absolute links. In other words the user MUST USE THE COMPLETE URL and type the whole thing in.

    Basically, if you can't beat it, play the game it wants to play. I hope I explained it well enough for you Adam. Thanks again for a great product.

    bvo

  •  07-05-2005, 4:53 PM 8378 in reply to 8374

    Re: Potential solution for Insert Link (ASP version 3.0)

View as RSS news feed in XML