hyperlink problem

Last post 01-07-2008, 11:01 AM by Adam. 1 replies.
Sort Posts: Previous Next
  •  01-07-2008, 7:57 AM 36178

    hyperlink problem

    Hello, i have a small hyperlink problem. I needed to add a dropdown to all the pages that allowed the user to create hyperlinks. Now instead of rewriting the javascripts or creating new dialog popups, i solved the problem with creating a small javascript, that checks the dropdown, if it has a value, then move that value to the inp_src field (URL). It worked perfect for the imagemap page, but i cant figure out how to get it to work with the hyperlink popup page Dialog->Tag->Tag_a.ascx. I have gone thru that page but since the buttons are loaded from another page, it makes it very difficult. Also since the page loads diffrent javascript on diffrent occations, its hard to find out where to put it.
     
    These are the small code blocks that i added:

    Dropdown that they can select a hyperlink from (this is automatically loaded, works perfect)
    <select name="intern_dropdown" id="intern_dropdown">
     <option selected="selected" value="">Ange i fältet nedan</option>
     <option value="template1.aspx">Sida1</option>
     <option value="template2.aspx">Sida2</option>
     <option value="template3.aspx">Sida3</option>
    </select>  
     
    This is the BLOCKED SCRIPT
    <script language="javascript" type="text/javascript">
     function check_dropdown()
     {
         var mVal = document.getElementById("intern_dropdown");
         if (mVal.selectedIndex == -1) return;
         var mUrl = document.getElementById("inp_src");
         if (mVal.options[mVal.selectedIndex].value == "") return;
         mUrl.value = mVal.options[mVal.selectedIndex].value;
     }
    </script>
     
    And then the last line of code:
    <input class="inputbuttoninsert" type="button" value="[[Insert]]" style="width: 80px" onclick="check_dropdown();insert_link()" />
     
    This works on the Imagemap page, but not on the Hyperlink page since it have the button located on another page. I have tried chaingching both pages, but with no luck.

    Any ideas of where to put it?, i have tried in the javascript and on the page =/
  •  01-07-2008, 11:01 AM 36185 in reply to 36178

    Re: hyperlink problem

    funkybox,
     
    You can create a button in the dialog page. When people click this button, you show a new dialog and put your own logic into this new dialog.
     
    In the new dialog, when the user click the "Ok" button, you set the URL value of the parent window. it should resolve the problems.
     

    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