The Arcive of vBulletin Modifications Site. | 
    |
| 
		 
			 
			#1  
			
			
			
			
			
		 
		
	 | 
|||
		
		
  | 
|||
| 
		
	
		
		
			
			 
			
			I'm trying to get a piece of code to fetch the userid of the poster in any given thread and pass it to a javascript.. 
		
		
		
		
		
		
		
		
	
	Here's the code <a href="javascript:void(0)" onclick="javascript:jqcc.mychat.chatWith('1');">Ch at with me</a> Instead of the absolute "1", what would be the variable name I substitute in order to have "1" replaced with the userid of the poster? Thanks for any help .. ![]() Regards, Doug  | 
| 
		 
			 
			#2  
			
			
			
			
			
		 
		
	 | 
|||
		
		
  | 
|||
| 
		
	
		
		
			
			 
			
			If this is in the postbit, you could try {vb:raw post.userid}.
		 
		
		
		
		
		
		
		
		
	
	 | 
| 
		 
			 
			#3  
			
			
			
			
			
		 
		
	 | 
|||
		
		
  | 
|||
| 
		
	
		
		
			
			 
			
			So, this would be the correct code? 
		
		
		
		
		
		
		
		
	
	<a href="javascript:void(0)" onclick="javascript:jqcc.mychat.chatWith('{vb:raw post.userid}');">Chat with me</a> Thanks? Regards, Doug  | 
| 
		 
			 
			#4  
			
			
			
			
			
		 
		
	 | 
|||
		
		
  | 
|||
| 
		
	
		
		
			
			 
			
			I'm pretty sure that's right, yes. Does it not work?
		 
		
		
		
		
		
		
		
		
	
	 | 
| 
		 
			 
			#5  
			
			
			
			
			
		 
		
	 | 
|||
		
		
  | 
|||
| 
		
	
		
		
			
			 
			
			I can't seem to make it work ... 
		
		
		
		
		
		
		
		
	
	..but, I'm not a programmer, so it's probably me .. ![]() Thanks anyway ... Regards, Doug  | 
| 
		 
			 
			#6  
			
			
			
			
			
		 
		
	 | 
|||
		
		
  | 
|||
| 
		
	
		
		
			
			 
			
			Well, I'm never 100% sure the code is right unless I try it. What happens when you try it?  Have you tried viewing the html source of your page and seeing what that code looks like?
		 
		
		
		
		
		
		
		
		
	
	 | 
![]()  | 
	
	
		
  | 
	
		
  | 
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
						
  | 
				|
  More Information | 
				|
| 
						 Template Usage: 
						
 Phrase Groups Available: 
						
  | 
					
						 Included Files: 
						
 Hooks Called: 
						
  |