Solved

pasting a quote!

Posted on 2008-10-19
18
307 Views
Last Modified: 2010-04-06
so far i have got the code to grab a piece of text (i think)



but one on my action page how would i paste it into a textbox allready there named inputforum...

i would like it to be displayed something like

[ quote] quote goes here [ /quote]


also how could i grab the username of who posted it and the post id and also stick that into the quote??

the id is grabbed by $userid and the post $postid (this is done in php)
[code]<form id="hiddenQuoteSendOff" action="index.php?page=reply&id=230" method="post" style="display:none;">
        <input type="hidden" name="quote_text" value="" />
</form>
<a href="#" onclick="return quoteThis();">quoteit</a>
<script> function quoteThis()
        {
        var txt = '';
        if (window.getSelection)
                {
                txt = window.getSelection();
                }
        else if (document.getSelection)
                {
                txt = document.getSelection();
                }
        else if (document.selection)
                {
                txt = document.selection.createRange().text;
                }
        else txt = "";
        var hiddenForm = document.getElementById("hiddenQuoteSendOff");
        hiddenForm.quote_text.value = txt;
        hiddenForm.submit();
                return false;
        }</script>[/code]

Open in new window

0
Comment
Question by:runnerjp
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 9
  • 9
18 Comments
 
LVL 7

Expert Comment

by:bluV11t
ID: 22751902
I would just concatenete the quote/unquote onto the txt like this:

hiddenForm.quote_text.value = '[quote]' + txt + '[/quote]';

As for username and post id I think you need to pass it to the quoteThis function (not real sure about php code):



<a href="#" onclick="return quoteThis(<?=$postid?>,<?=$postuser?>);">quoteit</a>
<script> function quoteThis(postnr, postuser)
        {
        var txt = '[quote]' +'Post #' + postnr + ' by' + postuser;
        if (window.getSelection)
                {
                txt += window.getSelection() + '[/quote]';
                }
        else if (document.getSelection)
                {
                txt += document.getSelection() + '[/quote]';
                }
        else if (document.selection)
                {
                txt += document.selection.createRange().text+ '[/quote]';
                }
        else txt = "";
        var hiddenForm = document.getElementById("hiddenQuoteSendOff");
        hiddenForm.quote_text.value = txt;
        hiddenForm.submit();
                return false;
        }</script>

Open in new window

0
 
LVL 7

Expert Comment

by:bluV11t
ID: 22751920
Line 1 should be
<a href="#" onclick="return quoteThis(<?php print "'".$postid."'";  ?>,<?php print "'".$userid."'";  ?>);">quoteit</a>

Hope this helps!

0
 

Author Comment

by:runnerjp
ID: 22752421
ok but how would i post it on the next page in the textbox?
0
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 
LVL 7

Expert Comment

by:bluV11t
ID: 22752583
Hi!


value="<?php print $_POST["quote_text"];  ?>" on your textbox should do it I think.

0
 

Author Comment

by:runnerjp
ID: 22752668
nah sent me to the page but didnt post anything,,,

infact how do i know if the code is grabbing the text?
<script> function quoteThis(postnr, postuser)
        {
        var txt = '[quote]' +'Post #' + postnr + ' by' + postuser;
        if (window.getSelection)
                {
                txt += window.getSelection() + '[/quote]';
                }
        else if (document.getSelection)
                {
                txt += document.getSelection() + '[/quote]';
                }
        else if (document.selection)
                {
                txt += document.selection.createRange().text+ '[/quote]';
                }
        else txt = "";
        var hiddenForm = document.getElementById("hiddenQuoteSendOff");
        hiddenForm.quote_text.value = txt;
        hiddenForm.submit();
                return false;
        }</script>

Open in new window

0
 
LVL 7

Expert Comment

by:bluV11t
ID: 22752798
You could do this to test:

        hiddenForm.quote_text.value = txt;
        alert(txt);
//        hiddenForm.submit(); comment out submit of form

Could you maybe post the code for your form on the page you are submitting to?
0
 
LVL 7

Expert Comment

by:bluV11t
ID: 22752811
Also your link needs to be:
<a href="#" onclick="return quoteThis('<?=$postid?>','<?=$postuser?>');">quoteit</a>
0
 

Author Comment

by:runnerjp
ID: 22753047
ok here is my forum page
<table class='maintable'>
 
<tr class='headline'><td width=11%>Author</td>
<td width=89%>Post</td>
</tr> <?php
if ($pagenum == 1){
?>
<tr class='mainrow'><td valign='top'><div align="center"><?php //We need to add a Little variable that will automatically increase so that
//Each div (container) in the editforum.php script is unique:
$CONT_ID = 1;
 echo $gettopic3['author'] ;?></div>
  <p align="center">
  <?
 
 
$query = "SELECT * FROM users WHERE Username = '".$gettopic3['author']."' LIMIT 1"; 
if ($result = mysql_query($query)){
    if (mysql_num_rows($result)) {
        $array = mysql_fetch_assoc($result);
        $image = $array['image'];
$postnum = $array['post_count'];
 
echo "<img src=\"http://www.runningprofiles.com/members/images/mini/$image\" border=\"1\"  />";?>
<p align="center"> Posts: <?php echo $postnum;?> 
<p align="center">
<?php $result = mysql_query("SELECT * FROM useronline WHERE(user='".$gettopic3['author']."')");
while($row = mysql_fetch_array( $result )) {
 
$last_active = time() - $row['timestamp'];
}
 
if($last_active < 300) {
?>
      <span   class="online">online</span>
    <?
} ?>
<p> <?
}
}
?>
</p></td>
<td valign='top'>Started 
 <?php $now = time();
if ($now - $dbtime > 86400) { echo 'on '; $dbtime=$gettopic3['showtime']; $time = date("F j Y, g:i a", $dbtime); echo $time;
 
} else if ($now - $dbtime <= 86400) { echo 'today';
}
?> 
   <? $id3=$gettopic3['postid'];
  ?> id=<? echo $id3;?>
 
<br>
  <hr>
  <p>
  <?php
 
$message=$gettopic3['post'];
 
$message=BBCode($message); ?>
 
  <?php echo $message ?></p>
  <p align="right"><br>
  </p>
  <p>&nbsp;</p>
  <p align="right"><a href="index.php?page=report&amp;user=<?php echo $gettopic3['author'];?>&msgid=<?php echo $gettopic3['postid'];?>&area=forum">Report to Admin</a></p></td></tr>
<?php
}
 
$getreplies="Select * from forumtutorial_posts where parentid='$id' ORDER BY showtime $max"; //getting replies
 
$getreplies2=mysql_query($getreplies) or die(mysql_error()."Could not get replies");
 
while($getreplies3=mysql_fetch_array($getreplies2))
 
{
 
   ?><tr class='mainrow'><td valign='top'><div align="center"><?php echo $getreplies3['author'];?></div>
  <p align="center">
  <?
   $query = "SELECT * FROM users WHERE Username = '".$getreplies3['author']."' LIMIT 1"; 
if ($result = mysql_query($query)){
    if (mysql_num_rows($result)) {
        $array = mysql_fetch_assoc($result);
        $image = $array['image'];
		$postnum = $array['post_count'];
 
echo "<img src=\"http://www.runningprofiles.com/members/images/mini/$image\" border=\"1\"  />";?>
<p align="center"> Posts: <?php echo $postnum;?> 
<p align="center">
<?php $result = mysql_query("SELECT * FROM useronline WHERE(user='".$getreplies3['author']."')");
while($row = mysql_fetch_array( $result )) {
 
$last_active = time() - $row['timestamp'];
}
 
if($last_active < 300) {
?>
      <span   class="online">online</span>
    <?
} ?>
<p> <?
}
}?> 
</p></td>
<td vakign='top'>replied  at 
  <? $dbtime=$getreplies3['showtime']; $time = date("F j Y, g:i a", $dbtime); echo $time;?> 
   <? $id2=$getreplies3['postid'];
  ?> id=<? echo $id2;?>
  <br>
  <form id="hiddenQuoteSendOff" action="index.php?page=reply&id=230" method="post" style="display:none;">
        <input type="hidden" name="quote_text" value="" />
</form>
<a href="#" onclick="return quoteThis(<?php print "'".$postid."'";  ?>,<?php print "'".$userid."'";  ?>);">quoteit</a>
<script> function quoteThis(postnr, postuser)
        {
        var txt = '[quote]' +'Post #' + postnr + ' by' + postuser;
        if (window.getSelection)
                {
                txt += window.getSelection() + '[/quote]';
                }
        else if (document.getSelection)
                {
                txt += document.getSelection() + '[/quote]';
                }
        else if (document.selection)
                {
                txt += document.selection.createRange().text+ '[/quote]';
                }
        else txt = "";
        var hiddenForm = document.getElementById("hiddenQuoteSendOff");
        hiddenForm.quote_text.value = txt;
        hiddenForm.submit();
                return false;
        }</script>
  <hr>
    <p>
      <?php
 
   $message=$getreplies3['post'];
 
   $message= BBCode($message);
   $id2=$getreplies3['postid'];
 
   ?>
      <?php echo $message?></p>
    <p align="right"><br>
    
  <?php 
 
            include 'editmessage2.php'; 
//Now increase it:
$CONT_ID++;
         
        ; ?> 
      </p>
    <p align="right"><a href="index.php?page=report&amp;user=<?php echo $getreplies3['author'];?>&msgid=<?php echo $getreplies3['postid'];?>&area=forum">Report to Admin</a></p></td></tr>
<?
}
?>
</table>

Open in new window

0
 

Author Comment

by:runnerjp
ID: 22753051
and here is the page im trying to post it in the message board
<script language="JavaScript" type="text/javascript" src="../bbcode.js"></script>
<script>
function setColor(color) {
        var textbox = document.getElementById('inputforum');
        textbox.value += "[color=" + color + "][/color]";
}
function setsize(size) {
        var textbox = document.getElementById('inputforum');
        textbox.value += "[size=" + size + "][/size]";
}
 
function initialise() {
var element = document.getElementById('element-id');
 
if (element && element.style)
element.style.display = 'none';
}
 
function toggleDisplay(element) {
var style;
 
if (typeof element == 'string')
element = document.getElementById(element);
if (element && (style = element.style))
style.display = (style.display == 'none') ? '' : 'none';
}
 
if (!document.getElementById)
document.getElementById = function() {return null;};
 
 
function wrapText(el, openTag, closeTag) {
if (el.setSelectionRange) {
// W3C/Mozilla
el.value = el.value.substring(0,el.selectionStart) + openTag + el.value.substring(el.selectionStart,el.selectionEnd) + closeTag + el.value.substring(el.selectionEnd,el.value.length);
}
else if (document.selection && document.selection.createRange) {
// IE code goes here
el.focus(); //or else text is added to the activating control
var range = document.selection.createRange();
range.text = openTag + range.text + closeTag;
}
}
</script>
<?php
session_start();
 //connection string
require_once '../settings.php';
include "../BBClass.php"; //store the BBClass.php in the same place as settings.php or change the path.
include "connect.php";
 
$id = $_SESSION['user_id'];  
$puser = get_username($id);
$timestamp = time();
$timeout = $timestamp - 180;
$username= get_username($_SESSION['user_id']);
function selfURL() { 
$s = empty($_SERVER["HTTPS"]) ? '' : ($_SERVER["HTTPS"] == "on") ? "s" : "";
$protocol = strleft(strtolower($_SERVER["SERVER_PROTOCOL"]), "/").$s; 
$port = ($_SERVER["SERVER_PORT"] == "80") ? "" : (":".$_SERVER["SERVER_PORT"]); 
return $protocol."://".$_SERVER['SERVER_NAME'].$port.$_SERVER['REQUEST_URI']; } 
function strleft($s1, $s2) { return substr($s1, 0, strpos($s1, $s2)); }
$filename = (selfURL());
//Insert User
$insert = mysql_query("REPLACE INTO `useronline` SET `timestamp`='$timestamp', `ip`='".$_SERVER['REMOTE_ADDR']."', `file`='$filename',`user`='$username',`user_id`='".$_SESSION['user_id']."'") 
or die(mysql_error()); 
 
 
 
$uid = $_SESSION['user_id']; //never use the same varible name twice.
$forum=$_GET['forum']; 
$forumid=$_GET['id']; 
 
$query = "SELECT * FROM users WHERE ID = '$uid' LIMIT 1";
if ($result = mysql_query($query)){
	if (mysql_num_rows($result)) {
		$array = mysql_fetch_assoc($result);        
		$puser = $array['Username']; 	
		$pimage = $array['image'];
	}
}
?><a href='index.php?page=mainforums'><img src="http://www.runningprofiles.com/images/homeforum.gif" alt="home" border="0"  /></a>
<a href='index.php?page=message&forum=<?php echo $forum;?>&id=<?php echo $forumid;?>'><img src="http://www.runningprofiles.com/images/backforum.gif" alt="forum" border="0"  /></a>
 
<link rel='stylesheet' href='style.css' type='text/css'>
<table width="70%" class='maintables'>
<tr class='headline'><td>Reply</td></tr>
	<tr class='maintables'>
		<td align="center">
<?php 
			$id=$_GET['id'];
			if(isset($_POST['submit'])) {
				$name=$puser;
				$yourpost=$_POST['yourpost'];
				$subject=$_POST['title'];
				if(strlen($yourpost)<1) {
					print "You did not type in a post."; //no post entered
				}else{
					$thedate=date("U"); //get unix timestamp
					$displaytime = time();
					//we now strip HTML injections
					$subject=strip_tags($subject);
					$name=strip_tags($name);
					//This is where the bbcode come in.
					$message = new BBCode;
					$message->selection = $yourpost;
					$message->parseCode(); // set to 1 if you want to disable bbcode
					$message->parseEmoticons();
					$yourpost = $message->parsed;
					$insertpost="INSERT INTO `forumtutorial_posts` (`author`,`forum`,`title`,`post`,`showtime`,`realtime`,`lastposter`,`parentid`) values('$name','$forum','$subject','$yourpost','$thedate','$thedate','$name','$id')";
					mysql_query($insertpost) or die("Could not insert post"); //insert post
 
					$updatepost="UPDATE `forumtutorial_posts` SET `numreplies`=`numreplies`+'1', `lastposter`='$name', `lastrepliedto`='$thedate' WHERE `postid`='$id'";
					mysql_query($updatepost) or die("Could not update post");
 
 
                                  $updatep="UPDATE `users` SET `post_count`=`post_count`+'1' WHERE `Username`='$name'";
					mysql_query($updatep) or die("Could not update post");
 
 
					print "Message posted, go back to <A href='index.php?page=message&id=$id&forum=$forum'>Message</a>.";
				}
			}else{
				$gettopic="SELECT * FROM `forumtutorial_posts` WHERE `postid`='$id'";
				$gettopic2=mysql_query($gettopic) or die("Could not get topic");
				$gettopic3=mysql_fetch_array($gettopic2);
				$message=strip_tags($getreplies3['post']);
				$message=nl2br($message);
				?>
                
                <?php  if($gettopic3['forumlock'] == 0)
{
     ?> Your message:
                    <br><form action='index.php?page=reply&forum=<? echo $forum; ?>&id=<? echo $_GET['id']; ?>' method='post' name='myform'>
					  <div style='padding-left: 5px; padding-top:5px;'>
<input type='button' value='B' name='btnBold' onclick='wrapText(document.getElementById(&#39;inputforum&#39;),&#39;[b]&#39;,&#39;[/b]&#39;);'>
<input type='button' value='I' name='btnItalic' onclick='wrapText(document.getElementById(&#39;inputforum&#39;),&#39;[i]&#39;,&#39;[/i]&#39;);'>
<input type='button' value='U' name='btnUnderline' onclick='wrapText(document.getElementById(&#39;inputforum&#39;),&#39;[u]&#39;,&#39;[/u]&#39;);'>
<input type='button' value='IMG' name='btnImg' onclick='wrapText(document.getElementById(&#39;inputforum&#39;),&#39;[img]&#39;,&#39;[/img]&#39;);'>
<input type='button' value='Email' name='btnImg' onclick='wrapText(document.getElementById(&#39;inputforum&#39;),&#39;[email]&#39;,&#39;[/email]&#39;);'>
<input type='button' value='URL' name='btnUrl' onclick='wrapText(document.getElementById(&#39;inputforum&#39;),&#39;[url]&#39;,&#39;[/url]&#39;);'>
<input type='button' value='Center' name='btnUrl' onclick='wrapText(document.getElementById(&#39;inputforum&#39;),&#39;[center]&#39;,&#39;[/center]&#39;);'>
<input type="button" value="Smilies" onclick="toggleDisplay('element-id');">
<div id="element-id" style="display: none;">
 
<a href="http://www.runningprofiles.com/emoticons/smiley.gif" title="smile"
onclick="wrapText(document.getElementById('inputforum'),':',')'); return false"><img 
src="http://www.runningprofiles.com/emoticons/smiley.gif" border="0"></a>
<a href="http://www.runningprofiles.com/emoticons/smiley.gif" title="smile"
onclick="wrapText(document.getElementById('inputforum'),':','('); return false"><img 
src="http://www.runningprofiles.com/emoticons/sad.gif" border="0"></a>
<a href="http://www.runningprofiles.com/emoticons/smiley.gif" title="smile"
onclick="wrapText(document.getElementById('inputforum'),';',')'); return false"><img 
src="http://www.runningprofiles.com/emoticons/wink.gif" border="0"></a>
<a href="http://www.runningprofiles.com/emoticons/smiley.gif" title="smile"
onclick="wrapText(document.getElementById('inputforum'),':','D'); return false"><img 
src="http://www.runningprofiles.com/emoticons/cheesy.gif" border="0"></a>
<a href="http://www.runningprofiles.com/emoticons/smiley.gif" title="smile"
onclick="wrapText(document.getElementById('inputforum'),';','D'); return false"><img 
src="http://www.runningprofiles.com/emoticons/grin.gif" border="0"></a>
<a href="http://www.runningprofiles.com/emoticons/smiley.gif" title="smile"
onclick="wrapText(document.getElementById('inputforum'),'::',')'); return false"><img 
src="http://www.runningprofiles.com/emoticons/rolleyes.gif" border="0"></a>
<a href="http://www.runningprofiles.com/emoticons/smiley.gif" title="smile"
onclick="wrapText(document.getElementById('inputforum'),'>:','('); return false"><img 
src="http://www.runningprofiles.com/emoticons/angry.gif" border="0"></a>
<a href="http://www.runningprofiles.com/emoticons/smiley.gif" title="smile"
onclick="wrapText(document.getElementById('inputforum'),':','o'); return false"><img 
src="http://www.runningprofiles.com/emoticons/shocked.gif" border="0"></a>
<a href="http://www.runningprofiles.com/emoticons/smiley.gif" title="smile"
onclick="wrapText(document.getElementById('inputforum'),'8',')'); return false"><img 
src="http://www.runningprofiles.com/emoticons/cool.gif" border="0"></a>
<a href="http://www.runningprofiles.com/emoticons/smiley.gif" title="smile"
onclick="wrapText(document.getElementById('inputforum'),'??','?'); return false"><img 
src="http://www.runningprofiles.com/emoticons/huh.gif" border="0"></a>
<a href="http://www.runningprofiles.com/emoticons/smiley.gif" title="smile"
onclick="wrapText(document.getElementById('inputforum'),':','p'); return false"><img 
src="http://www.runningprofiles.com/emoticons/tongue.gif" border="0"></a>
<a href="http://www.runningprofiles.com/emoticons/smiley.gif" title="smile"
onclick="wrapText(document.getElementById('inputforum'),':-','['); return false"><img 
src="http://www.runningprofiles.com/emoticons/embarrassed.gif" border="0"></a>
<a href="http://www.runningprofiles.com/emoticons/smiley.gif" title="smile"
onclick="wrapText(document.getElementById('inputforum'),':-','*'); return false"><img 
src="http://www.runningprofiles.com/emoticons/undecided.gif" border="0"></a>
<a href="http://www.runningprofiles.com/emoticons/smiley.gif" title="smile"
onclick="wrapText(document.getElementById('inputforum'),':-','\\'); return false"><img 
src="http://www.runningprofiles.com/emoticons/lipssealed.gif" border="0"></a>
<a href="http://www.runningprofiles.com/emoticons/smiley.gif" title="smile"
onclick="wrapText(document.getElementById('inputforum'),':-','*'); return false"><img 
src="http://www.runningprofiles.com/emoticons/kiss.gif" border="0"></a>
<a href="http://www.runningprofiles.com/emoticons/smiley.gif" title="smile"
onclick="wrapText(document.getElementById('inputforum'),':','*('); return false"><img 
src="http://www.runningprofiles.com/emoticons/cry.gif" border="0"></a>
 
 
 
 
 
 
</div>
<select id="size" onchange="setsize(this.value);">
<option value="" selected="selected">Font Size</option>
							<option value="1">8pt</option>
							<option value="2">10pt</option>
							<option value="3">12pt</option>
							<option value="4">14pt</option>
 
							<option value="5">18pt</option>
							<option value="6">24pt</option>
							<option value="7">36pt</option>
<select id="color" onchange="setColor(this.value);">
      <option value="" selected="selected">Change Color</option>
							<option value="black">Black</option>
							<option value="red">Red</option>
							<option value="yellow">Yellow</option>
							<option value="pink">Pink</option>
							<option value="green">Green</option>
							<option value="orange">Orange</option>
							<option value="purple">Purple</option>
							<option value="blue">Blue</option>
							<option value="beige">Beige</option>
							<option value="brown">Brown</option>
							<option value="teal">Teal</option>
							<option value="navy">Navy</option>
							<option value="maroon">Maroon</option>
							<option value="limeGreen">Lime Green</option>
							<option value="white">White</option>
</select>
  	
 
 
</div>
 
					  <input name="title" type="hidden" value="<?php echo $gettopic3['title'];?>" />
				      <textarea value="<?php print $_POST["quote_text"];  ?>" id="inputforum" class="inputforum" name='yourpost' rows='5' cols='40'></textarea>
					  <br>
				      <input type='submit'class="submit-btn" name='submit' value=''>
				          </p>
                </form>

Open in new window

0
 
LVL 7

Expert Comment

by:bluV11t
ID: 22753212
It looks sound but I cannot really comment on the php code as I have very little experiance with PHP.

Did you try testing the javascript with alert?
        hiddenForm.quote_text.value = txt;
        alert(txt);
//        hiddenForm.submit();  // Comment out submit of form
0
 

Author Comment

by:runnerjp
ID: 22753219
sorry how does the alret script work??  my javascript is poor lol.. and how does the javascript get the text :S
0
 

Author Comment

by:runnerjp
ID: 22753330
i tried this and nothing happend
<form id="hiddenQuoteSendOff" action="index.php?page=reply&id=230" method="post" style="display:none;">
           <script> hiddenForm.quote_text.value = txt;
        alert(txt);
      hiddenForm.submit();  // Comment out submit of form 
	  </script>
</form>
<a href="#" onclick="return quoteThis(<?php print "'".$postid."'";  ?>,<?php print "'".$userid."'";  ?>);">quoteit</a>
<script> function quoteThis(postnr, postuser)
        {
        var txt = '[quote]' +'Post #' + postnr + ' by' + postuser;
        if (window.getSelection)
                {
                txt += window.getSelection() + '[/quote]';
                }
        else if (document.getSelection)
                {
                txt += document.getSelection() + '[/quote]';
                }
        else if (document.selection)
                {
                txt += document.selection.createRange().text+ '[/quote]';
                }
        else txt = "";
        var hiddenForm = document.getElementById("hiddenQuoteSendOff");
        hiddenForm.quote_text.value = txt;
        hiddenForm.submit();
                return false;
        }</script>

Open in new window

0
 
LVL 7

Expert Comment

by:bluV11t
ID: 22753666
No, that's the wrong place.
You should comment out line 26 (put // infront of hiddenForm.submit();
and put alert(txt); between line 23 and 24.
0
 
LVL 7

Accepted Solution

by:
bluV11t earned 500 total points
ID: 22753691
alert(txt);
pops up an alertbox with the text and an OK button. That way we can test if the javascript function produces the correct value for the txt variable.

Javascript then assigns the txt value to the quote_text field of the form hiddenQuoteSendOff and submits the form. You should then be able to get the value from hiddenQuoteSendOff on the next page via PHP (<?php print $_POST["quote_text"];  ?>)

I just realized that you use a textarea and so you have to put <?php print $_POST["quote_text"];  ?> like this
 <textarea id="inputforum" class="inputforum" name='yourpost' rows='5' cols='40'><?php print $_POST["quote_text"];  ?></textarea>

0
 
LVL 7

Expert Comment

by:bluV11t
ID: 22753697
Just remember to remove the line alert(txt); and remove the // infront of hiddenForm.submit() afterwards :-)
0
 

Author Comment

by:runnerjp
ID: 22753888
ok i tried it and all i got in the alert box is

[ quote] quote by # [/ quote] thats all... how comes its not grabbing anything??
0
 

Author Comment

by:runnerjp
ID: 22753896
sorry i made little mistake... it grabs the postid and the username but not the post itself???

i use $message to get the posts if that helps in php
0
 

Author Comment

by:runnerjp
ID: 22754076
ok i found the problem i dont watn to highlight it...  i just want it to be copied so depends on what reply i want to quote it copys that quote!!..

$message sends the quote
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand. Self-Executing functions are just one good example that I'll try to demystify here.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question