0

i have 2 pages, page1 and page2. the page2 will be loaded in a fancybox upon click on a link in page1. i want to set the focus to a specific textbox on page2 after it has been loaded. may i know how to do that?

many thanks!

lordrebs
  • 13
  • 3
  • Can you provide some sample code and a description of what have you tried? – undefined Dec 18 '13 at 07:52
  • is page2 opened in `iframe` mode? – JFK Dec 18 '13 at 17:57
  • sorry for taking too long for my response. till now i haven't found the solution for my problem. here is the code that i used but won't work $('.fancyboxTopic').fancybox({ helpers:{overlay: {closeClick:false}}, 'padding': 5, 'width': '840px', 'height': '95%', 'autoScale': false, 'autoHeight': false, 'autoSize': false, 'afterClose': function(){window.location.reload(true);}, 'onComplete': function(){$('#topicTitle').focus();} }) – lordrebs Jan 06 '14 at 02:47

1 Answers1

0

sorry for taking too long for my response. till now i haven't found the solution for my problem. here is the code that i used but won't work

code in page1

$('.fancyboxTopic').fancybox({
   helpers:{overlay: {closeClick:false}},
   'padding': 5,
   'width': '840px',
   'height': '95%',
   'autoScale': false,
   'autoHeight': false,
   'autoSize': false,
   'afterClose': function(){window.location.reload(true);},
   'onComplete': function(){$('#topicTitle').focus();}
})

in my link:

<a href="page2.asp" class="fancyboxTopic fancybox.iframe">page 2</a>
lordrebs
  • 13
  • 3