Solved

Javascript Error Help

Posted on 2012-03-24
3
243 Views
Last Modified: 2012-04-03
I'm getting an error with this code, can you please tell me if you see anything wrong.  The error is only in IE8.  Chrome and FF work just fine.

  // AUDIO:
    $('#jplayer_music_link').click(function(){

    	window.open($(this).attr('for-lable'), "My Musics", "width=275,height=500");

    }); // end of jplayer_music_link block

Open in new window

0
Comment
Question by:deputycheek
3 Comments
 
LVL 25

Accepted Solution

by:
Kyle Hamilton earned 500 total points
Comment Utility
try this:

 // AUDIO:
    $('#jplayer_music_link').click(function(e){
        e.preventDefault();
    	window.open($(this).attr('for-lable'), "My Musics", "width=275,height=500");

    }); // end of jplayer_music_link block

Open in new window

0
 

Author Comment

by:deputycheek
Comment Utility
What is it doing?
0
 
LVL 7

Expert Comment

by:Lalit Chandra
Comment Utility
Remove spaces from the second argument of the window.open i,e change

My Musics
to
My_Musics

OR
if it still does't work then make the second argument( "MY Music" to empty).

Note : In window.open function,  Microsoft does not support a name as second argument. When you look at the official documentation page, you see that Microsoft only allows the following arguments, If using that argument at all:

_blank
_media
_parent
_search
_self
_top
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
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…

728 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now