Solved

js back button problem

Posted on 2011-09-20
7
147 Views
Last Modified: 2012-05-12
On this page i am building a user comment system.

However, the js works good when load the page originally, but when i click to another website and then use the back button the thing gets all messed up.

What do i need to put in the js to get it to work on back button visit?
0
Comment
Question by:blink10
[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
  • 4
  • 3
7 Comments
 
LVL 40

Expert Comment

by:gurvinder372
ID: 36571555
<< thing gets all messed up.>>
You need to elaborate a bit more

If this is happening for ff, the check this one
http://stackoverflow.com/questions/2638292/after-travelling-back-in-firefox-history-javascript-wont-run
0
 

Author Comment

by:blink10
ID: 36571561
ok the function i wrote should do the following....

When click, change the dimensions of the textarea and drop the faded message.

When i use back button, i get the text that is suppose to be faded as normal text, and none of the other fucntions will work. This is in chrome.

This is not a reloading problem as ur link deals with, this a is a back button issue.
0
 
LVL 40

Expert Comment

by:gurvinder372
ID: 36571570
it could well be a reloading problem, since your browser is not sure whether or not to capture onload event or not
0
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 

Author Comment

by:blink10
ID: 36571581
i added the code from stack, no luck, yes it does seem to be loading again i guess, but i doesnt fix it
0
 
LVL 40

Expert Comment

by:gurvinder372
ID: 36571597
please check in you debugger (chrome has a good one),
-- if the scripts are getting loaded or not
-- use breakpoints and console.logs to see if control flow is going as expected.

Please isolate the problem and reach to the specific one
0
 

Author Comment

by:blink10
ID: 36571840
do you have tutorial on this? I have never troubleshoted with chrome before
0
 
LVL 40

Accepted Solution

by:
gurvinder372 earned 500 total points
ID: 36571845
right click, inspect element, there you can see multiple options
0

Featured Post

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

Question has a verified solution.

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

Avoid defining the variables in the global scope; trying to define them in a local function scope. Because:   • Look-up is performed every time a variable is accessed.   • Variables are resolved backwards from most specific to least specific scope…
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

729 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