Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Javascript Error Help

Posted on 2012-03-24
3
Medium Priority
?
250 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
[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
3 Comments
 
LVL 25

Accepted Solution

by:
Kyle Hamilton earned 2000 total points
ID: 37761812
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
ID: 37761819
What is it doing?
0
 
LVL 7

Expert Comment

by:Lalit Chandra
ID: 37763485
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

Build and deliver software with DevOps

A digital transformation requires faster time to market, shorter software development lifecycles, and the ability to adapt rapidly to changing customer demands. DevOps provides the solution.

Question has a verified solution.

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

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 …
This article discusses how to create an extensible mechanism for linked drop downs.
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…

688 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