Re: script to open a new window



Neredbojias wrote:

With neither quill nor qualm, Jonathan N. Little quothed:


JDS wrote:


On Thu, 06 Oct 2005 23:01:21 +0100, SpaceGirl wrote:



<a href="mypage.html" onclick="popup('mypage.html'); return true;"


Shouldn't that be "return false"?


I would think so, else if JavaScript is enabled both the popup will load AND the main page will load 'mypage.html'. You want it to return false so that if JavaScript is enabled the main page link will be ignored but if JavaScript is disabled the onclick event will be ignored and the fall back will be that 'mypage.html' loads in the main window.


What if javascript is enabled but popups are disabled?


You're screwed! ;-) That's a good reason NOT to use a popup right?

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
.



Relevant Pages

  • Re: Client Side - click radio button - controls become enabled
    ... Thanks Eliyahu. ... Now here's the next problem - when I originally load the page, ... some javascript to be able to activate the appropriate items. ... Thanks - Jeffrey. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: register dynamic javacript with RegisterStartupScript
    ... On first load of the page, the page load will load the first page of data ... then will create the javascript for your page. ... I bind the datalist according to the current page. ... > the script of the first page. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Setting innerHTML
    ... Another more simplistic option would be to have your javascript merely ... use document.createElement to create an iframe, set the iframes src to ... // load the data file. ... javascript to parse html into DOM nodes, ...
    (comp.lang.javascript)
  • Re: back-end vs. front-end calculation
    ... have the same Javascript function that will handle the onchange event ... handle the initial calculation as well. ... The data is retrieved from the database upon page load. ...
    (comp.lang.javascript)
  • Re: backdoor:Win32/Hackdef.L C:program filesAdobe Help centerBrowseres262-32.dll
    ... it could not load the system file ... Javascript ... | wil not be executed if I deleted es262-32.dll ...
    (microsoft.public.security.virus)

Loading