open new window from an anchor (<a href="">

Results 1 to 3 of 3

Thread: open new window from an anchor (<a href="">

  1. #1
    Join Date
    Dec 1969
    Posts
    866

    Default open new window from an anchor (<a href="">

    I am having trouble making a link open in a new smaller window. It will work from an HTML page i.e. page.html, but as soon as I put the same code in an ASP page, it gives me an Invalid Argument!? Here&#039s the code: &#060;A HREF="#" onClick="window.open(&#039help.htm&#039,&#039Sign up help&#039,&#039width=425,height=475&#039);"&#062;< BR><BR>Help!

  2. #2
    Nathan Pond Guest

    Default RE: open new window from an anchor (<a href=

    Is it an ASP error you are getting? Or a client side scripting error? Browsers view html code the same whether it&#039s an html page or asp page, and the code you showed there looked correct. My only guess is that if you are trying to response.write that line, it would mess up in the ASP because of the double quotes.<BR><BR>let me know<BR><BR>Nathan Pond

  3. #3
    Steve Marlowe Guest

    Default RE: open new window from an anchor (<a href=

    although this is a little off topic what you are trying to do is call a javascript function with an anchor. and this can be done. i have never seen the syntax of &#060;a href=# onClick="window.open(...)"&#062;Click Here&#060;/a&#062;. I think that your problem most likely comes form the href=#. I&#039m not quite sure though because I have never seen that before. But what will work is to replace the # with the javascript function call like this &#060;a href="javascript:window.open(...)"&#062;Click Here&#060;/a&#062; and that should get you going just fine.<BR><BR>steve

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •