Solved

Hyperlink calling JavaScript syntax error

Posted on 2007-03-23
2
223 Views
Last Modified: 2012-05-05
I'm not sure what's wrong with this, it's driving me batty:

<a href="javascript:" onclick="window.open('/controls/eBookPolicy.aspx','eBook Policy','toolbar=no,height=300,width=400,location=no,address=no,directories=no,status=no,scrollbars=yes,resizable=yes,menubar=no,copyhistory=false');" runat="server"><b>HERE</b></a>

Javascript error: Invalid argument
Code 0
0
Comment
Question by:dba123
2 Comments
 
LVL 43

Accepted Solution

by:
TimCottee earned 500 total points
ID: 18780700
<a href="#" onclick="window.open('/controls/eBookPolicy.aspx','eBook Policy','toolbar=no,height=300,width=400,location=no,address=no,directories=no,status=no,scrollbars=yes,resizable=yes,menubar=no,copyhistory=false');" runat="server"><b>HERE</b></a>

Is perhaps better, javascript: void(0) may work but it does have some problems.
0
 
LVL 1

Author Comment

by:dba123
ID: 18781266
you know what also I didn't know.  You cannot have a space in the title, or else not all the attributes will work such as location=0, etc.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

679 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