Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Any event firing on page when I use Back button?
Message
General information
Forum:
Internet
Category:
Javascript
Miscellaneous
Thread ID:
00672185
Message ID:
00672553
Views:
12
Hi Thomas,

Thanks for pointing me to the right direction, it works now.

The result page was rendered from several scripts, and I found that in BODY tag it was calling custom onLoadFunction (not present on rendered page) along with other commands.
< BODY ..... ONLOAD=".... ;onLoadFunction()" >
So I added function onLoadFunction() into one of scripts and put there the line
document.forms.SearchBarForm.Fulltext_value1.focus()
Thanks!

>Nick;
>
>Give this a try:
>
>< script language="javascript">
>
>function init(){
>...your code...
>}
>
>window.onload=init;
>< /script>
>
>Tom
>
>
>>Hi All,
>>
>>Since I am new to Javascript, can anybody tell me if there any event firing for sure on page when I return to it using Back button in a browser?
>>
>>The scenario:
>>
>>#1. I enter the value in the text box, then use Enter.
>>#2. Another page appears. I am not clicking anywhere on the page.
>>#3. I click the Back button in the browser.
>>#4. I return to the previous page, the focus goes in my text box.
>>
>>If in #1 I click on Submit button instead of pressing Enter, or in #2 I click anywhere on the page and then click Back button, the focus does not return to the text box automatically. But I have some code in textbox onFocus() event and I want it to fire. How can I ensure the focus returning to my textbox?
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Previous
Reply
Map
View

Click here to load this message in the networking platform