Click here to Skip to main content
15,885,278 members
Please Sign up or sign in to vote.
2.00/5 (2 votes)
See more:
this is my javascript code any idea why it only works on internet explorer and not any other browser.?
help please.

<script type="text/javascript">

function check(){
$('#main').load('LabSF2-2home.html #target');
}
function check1(){
$('#main').load('LabSF2-2calendar.html #target1');
}
function check2(){
$('#main').load('LabSF2-2members.html #target2');
}
</script>
Posted
Comments
Sergey Alexandrovich Kryukov 27-Jan-16 20:00pm    
The rule of thumb is: if some code works only for IE, it's wrong. Correct behavior is not working. In your case, you URL cannot be correct.
—SA
Mohibur Rashid 27-Jan-16 20:07pm    
Thumbs up for "Working does not mean correct".
Sergey Alexandrovich Kryukov 27-Jan-16 20:30pm    
Absolutely. Working does not mean correct. Sometime not working code is better then "working".
—SA
koolprasad2003 27-Jan-16 23:39pm    
IE makes possible if the things are Impossible :)
Patrice T 27-Jan-16 20:54pm    
Can you define "only works on internet explorer" ?

1 solution

Please see my comment to the question. First of all, try the following: remove blank space before #. Any better?

—SA
 
Share this answer
 
v2
Comments
Patrice T 28-Jan-16 0:28am    
+5
Sergey Alexandrovich Kryukov 28-Jan-16 1:17am    
Thank you.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900