Marc vChat Developer
     I <3 Rossy
Posts: 3,388 Status: Offline Gender: Male Location: Ontario, Canada Age: 32 Joined:
Additional Groups: Coding Team
  
pmwww | URL Prompt Box (26th Mar 08 at 3:15am UTC) | | This code makes a prompt box appear when your users click on the url ubbc button and asks them for the link's information, then automatically displays it in the textbox.
Preview
 Code: - <script type="text/javascript">
- <!--
- /*
- URL Prompt by Cr0w
- Copyright 2008
- Do not repost
- */
-
- function urlPrompt(){
- var url = prompt("What is the location you would like to link to?","http://");
- if(url != "" && url != null){
- var urlName = prompt("What would you like to name the link?","");
- if(urlName != "" && urlName != null){
- if(document.post_form){
- document.post_form.message.value += "[url=" + url + "]" + urlName + "[/url]";
- }
- else if(document.quick_reply_form){
- document.quick_reply_form.message.value += "[url=" + url + "]" + urlName + "[/url]";
- }
- }
- }
- }
-
- if(get('ubbc_buttons','id')){
- get('ubbc_buttons','id').getElementsByTagName("a")[8].setAttribute("onclick","urlPrompt()");
- }
- else if(get('quick_reply_ubbc','id')){
- get('quick_reply_ubbc','id').getElementsByTagName("a")[8].setAttribute("onclick","urlPrompt()");
- }
- //-->
- </script>
Global Footers. | |
rroll.to— Shorten a link, rickroll your friends. |
|