ishq143 Posted April 30, 2012 Share Posted April 30, 2012 Hi i m new here n i donot know about js so i need help i wants to add rel="nofollow" in this code means when user insert any url or link then it make like this <a rel="nofollow" href="yourdomain.com"> add rel="nofollow" by default in html a href tag var nicLinkButton=nicEditorAdvancedButton.extend({addPane:function(){this.ln=this.ne.selectedInstance.selElm().parentTag("A");this.addForm({"":{type:"title",txt:"Add/Edit Link"},href:{type:"text",txt:"URL",value:"http://",style:{width:"150px"}},title:{type:"text",txt:"Title"},target:{type:"select",txt:"Open In",options:{"":"Current Window",_blank:"New Window"},style:{width:"100px"}}},this.ln)},submit:function©{var A=this.inputs.href.value;if(A=="http://"||A==""){alert("You must enter a URL to Create a Link");return false}this.removePane();if(!this.ln){var B="javascript:nicTemp();";this.ne.nicCommand("createlink",B);this.ln=this.findElm("A","href",B)}if(this.ln){this.ln.setAttributes({href:this.inputs.href.value,title:this.inputs.title.value,target:this.inputs.target.options[this.inputs.target.selectedIndex].value})}}});nicEditors.registerPlugin(nicPlugin,nicLinkOptions); so plz make a code for me n reply me with correct n working code thanks Quote Link to comment Share on other sites More sharing options...
Jessica Posted April 30, 2012 Share Posted April 30, 2012 so please make a code for me n reply me with correct n working code That's not how it works. {this.ln.setAttributes({href:this.inputs.href.value,title:this.inputs.title.value,target:this.inputs.target.options[this.inputs.target.selectedIndex].value})} Is the part you need to edit. href and target are attributes of the a element, just like rel is. Quote Link to comment Share on other sites More sharing options...
ishq143 Posted April 30, 2012 Author Share Posted April 30, 2012 Hi thanks for reply , but i said already i donot know about js can u edit or update that line n add rel="nofollow" in this line plz or any one plz plz Quote Link to comment Share on other sites More sharing options...
ishq143 Posted April 30, 2012 Author Share Posted April 30, 2012 Hi thanks for reply , but i said already i donot know about js {this.ln.setAttributes({href:this.inputs.href.value,title:this.inputs.title.value,target:this.inputs.target.options[this.inputs.target.selectedIndex].value})} can u edit or update that line n add rel="nofollow" in this line please or any one please please Quote Link to comment Share on other sites More sharing options...
haku Posted May 1, 2012 Share Posted May 1, 2012 Search engines don't use javascript, so you don't need to add this to dynamic links. Or, if you are trying to add this to static links, it won't work. Quote Link to comment Share on other sites More sharing options...
.josh Posted May 2, 2012 Share Posted May 2, 2012 You don't need to know javascript for this task. You need common sense and basic editing skills. If you want someone to do it for you, post in the freelance forum. If you want a nudge in the right direction because you are trying to learn something, post here. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.