[Javascript] force to load window.open()

Hassan Schroeder hassan at webtuitive.com
Thu Jun 19 12:25:11 CDT 2003


noel.jean-baptiste at courrier.uqam.ca wrote:
> Your algorithme seems to work but i don't understand all.
> For example, eventhough i comment "t.search = t.search + "&date=" + 
> Date.parse(new Date());" in init function it seems to work...
> any idea ?

It's not clear why you were having a problem to start with :-)

My response was simply a way to guarantee an unique URL (using
a date string) to defeat caching.

But there may be a difference in how a particular browser does
caching of an href value versus one accessed by a JS function.

>><script type="text/javascript">
>>function init()
>>{
>>   var t = document.getElementById("s");
>>   t.search = t.search + "&date=" + Date.parse(new Date());
>>}
>>
>>window.onload=init;
>></script>
>>
>>   href="ServletAcces?nomBase=etudiant"
>>   onclick="window.open(this.href,'_self','status=yes');"
>>   >
>><img src="bouton.gif"/>
>>
>>
>>(I put the onclick in there, though it's superfluous; the normal
>>link will open in the same window, unless you change the '_self'
>>to something else...)

-- 
Hassan Schroeder ----------------------------- hassan at webtuitive.com
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com

                           dream.  code.





More information about the Javascript mailing list