Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #21  
Old 07-28-2012, 02:19 PM
chefy chefy is offline
 
Join Date: Jul 2012
Posts: 88
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks, Simon and Bird.

Bird, I tested your latest code and it works on Chrome but still not working in Firefox 14. I haven't tested it yet on IE9 because I have IE8 and well it doesn't work on IE8 but at least I got feedback from IE8 error log:

Code:
"Can't move focus to the control because its invisible, not enabled, or of a type that does not accept the focus"
Maybe if we solve that problem then it will work on IE and Firefox!
Or maybe there is a type on your code?
Reply With Quote
  #22  
Old 07-28-2012, 02:40 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I copied the code directly from my test site where it is/was working.

It is working fine on Firefox 13 and Firefox 14 and Waterfox which is a 64 bit version of Firefox.

I only put it in place of the top "Post Reply" button... curious if you tried it from that location?

You could try this alternate code- it should do the same thing, again I have tested it in IE9 and FF and Chrome:

HTML Code:
<td class="smallfont"><a href="javascript:void(0);" onclick="location.hash = '#qrform'; vbform.elements['message'].focus();"><if condition="$show['closethread']"><img src="$stylevar[imgdir_button]/reply.gif" alt="$vbphrase[reply]" border="0" /><else /><img src="$stylevar[imgdir_button]/threadclosed.gif" alt="$vbphrase[closed_thread]" border="0" /></if></a></td>
As a last resort you could try it with removing the code:
Code:
location.hash = '#qrform';
Reply With Quote
  #23  
Old 07-28-2012, 03:02 PM
chefy chefy is offline
 
Join Date: Jul 2012
Posts: 88
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I figured out what the problem is. It works (I'm using your original code) when your quick reply box isn't WYSIWYG by default. When it's WYSIWYG by default (like mine) then it doesn't work. Try it and you'll see. Any workaround?
Reply With Quote
  #24  
Old 07-28-2012, 04:29 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Good eye...

OK So I had to add a condition to test if the wysiwg editor is enabled, both in vb and the browser... this is working for me-

Code:
      <if condition="$show['wysiwyg']">
                <td class="smallfont"><a href="javascript:void(0);" onclick="location.hash = '#qrform'; if (document.getElementById('vB_Editor_QR_iframe')) {  document.getElementById('vB_Editor_QR_iframe').focus(); } else { document.getElementById('vB_Editor_QR_textarea').focus(); }"><if condition="$show['closethread']"><img src="$stylevar[imgdir_button]/reply.gif" alt="$vbphrase[reply]" border="0" /><else /><img src="$stylevar[imgdir_button]/threadclosed.gif" alt="$vbphrase[closed_thread]" border="0" /></if></a></td>
      <else />
                <td class="smallfont"><a href="javascript:void(0);" onclick="location.hash = '#qrform'; document.getElementById('vB_Editor_QR_textarea').focus();"><if condition="$show['closethread']"><img src="$stylevar[imgdir_button]/reply.gif" alt="$vbphrase[reply]" border="0" /><else /><img src="$stylevar[imgdir_button]/threadclosed.gif" alt="$vbphrase[closed_thread]" border="0" /></if></a></td>
       </if>
EDIT- Damn, working in FF but not IE9... so close...
Reply With Quote
  #25  
Old 07-28-2012, 04:46 PM
chefy chefy is offline
 
Join Date: Jul 2012
Posts: 88
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks! Now it's working fine in Firefox... so it's all about getting it to work on IE. I'm not a programmer but I'll try to play with your code and see if I have luck. I hope so!
Reply With Quote
  #26  
Old 07-28-2012, 04:49 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In Googling the issue setting focus in IE is a common problem-

I tried some options here: http://stackoverflow.com/questions/2...n-iframe-in-ie

But no luck yet.
Reply With Quote
  #27  
Old 07-28-2012, 05:06 PM
chefy chefy is offline
 
Join Date: Jul 2012
Posts: 88
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have noticed that when using the quick reply button the focus is inside the text area be it WYSIWYG or not (IE9). So I'm sure that what I'm looking for is doable however it appears to be more hard than what I expected
Reply With Quote
  #28  
Old 07-30-2012, 03:07 AM
vbresults vbresults is offline
 
Join Date: Apr 2009
Posts: 687
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wow, so simple in theory. Not surprising, though. xD
Reply With Quote
  #29  
Old 07-30-2012, 01:57 PM
chefy chefy is offline
 
Join Date: Jul 2012
Posts: 88
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If anyone knows how to make this to work please help.
Reply With Quote
  #30  
Old 07-30-2012, 03:22 PM
vbresults vbresults is offline
 
Join Date: Apr 2009
Posts: 687
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Put this in the <head> section of the SHOWTHREAD template --
HTML Code:
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript">
	jQuery.noConflict();

	(function ($) {
		$(document).ready(function() {
			$('body').find('a[href^="newreply.php"]:not([id])').each(function() {
				$(this).click(function() {
					$('a#qr_1').click();
					return false;
				});
			});
		});
	})(jQuery);
</script>
Reply With Quote
Reply


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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:08 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04446 seconds
  • Memory Usage 2,278KB
  • Queries Executed 12 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_code
  • (2)bbcode_html
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete