Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

jquery page load duplicates loading

Posted on 2015-02-12
2
Medium Priority
?
85 Views
Last Modified: 2015-02-12
I have a click in event setup in a javascript behind code

 $('.cgcct-baselines').click(function () {            
            $("#pages").load("/html/baselines/baselines.aspx");
              return false;
        });

I'm seeing duplicate page loads of baseline.aspx in the firebug console
every time I fire off the click event

Any ideas?
0
Comment
Question by:Mauro Cazabonnet
2 Comments
 
LVL 30

Accepted Solution

by:
Alexandre Simões earned 2000 total points
ID: 40605860
Where are you executing this code?
This usually happens when you pass through this code more than once (twice in your case).

So make sure that this click event handler assignment code is only executed once.
0
 
LVL 4

Author Closing Comment

by:Mauro Cazabonnet
ID: 40606174
Alex,
Thx, i had mycustom jscript loading on other pages causing the multiple calls to the click event

Thx again!!
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
Batch, VBS, and scripts in general are incredibly useful for repetitive tasks.  Some tasks can take a while to complete and it can be annoying to check back only to discover that your script finished 5 minutes ago.  Some scripts may complete nearly …
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …
Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…
Suggested Courses

916 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