Go Back   vBulletin Modification Discussions > Coding Discussions > PHP Discussions, Tutorials and Help
Home Register FAQ Members List Calendar Mark Forums Read
vBSEO Info Tags

About This Page: This is a discussion on Post Reply including templates within the PHP Discussions, Tutorials and Help forums, part of the Coding Discussions category, at vBulletin Modification Discussions. I want to be able to include a template contents into the reply on the click of a button. I have managed to create the code to insert var but I don't know how to edit this to include


Reply
 
LinkBack Thread Tools
Old 06-26-2008, 11:23 AM   #1 (permalink)
Junior Member
 
Join Date: Jun 2008
Posts: 3
bananalive is on a distinguished road
iTrader: (0)
Post Reply including templates

I want to be able to include a template contents into the reply on the click of a button. I have managed to create the code to insert var but I don't know how to edit this to include template instead.
Moving javascript to external file hasn't worked

All help appreciated

Thanks,

PS. This is the code I am currently using... (in head of the newreply template)
HTML Code:
<script>
function insertText() {
var textstring = "test string";
document.getElementById ("{$editorid}_iframe").contentWindow.document.body.innerHTML += textstring;
document.getElementById('vB_Editor_001_textarea').value += textstring;
}
</script>
and the link is...
HTML Code:
<a href="javascript:;" onClick="insertText()">test</a>
bananalive is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links

Reply
Tags: , , ,





Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


A vBSkinworks Design Recoded By vBModder.
All Code Distributed On This Site is © 2006 by it's author.
Search Engine Optimization by vBSEO 3.1.0

All times are GMT -7. The time now is 01:57 PM.
Online Users 48
Registered 0
Guests 48
Members 3914
Active Members 162
Threads 1856
Posts 7347
Top poster: Code Monkey (2237)
Welcome to our newest member, xer321
Most users ever online was 235, 04-11-2007 at 09:59 AM.
Speak Out! vBulletin gets the web talking!


vBulletin Setup SEO

vBulletin graphics resource images