return false; after popupcal(); this will stop the href running.
You could also put href="javascript
:popupcal();" but this won't work for non
js users so I'd suggest putting the same page the popup loads in the href,
target="_blank" and return false on the click.
So :-
<a href="page.html" onClick="popupcal('page.html');return false;"
target="_blank">date</a>
Now this is general for all popups. To ensure you cover JS and non JS
people, but don't forget, the text input bit on the parent for non JS people
won't work.
Good luck hope that helps.
Stu
"Jez" <je**********@btinternet.com> wrote in message
news:ad**************************@posting.google.c om...
Hi,
I've created a function which opens a popup window containing a
calendar. When a day is clicked, the date is entered into a text box
on the parent page and the popup is closed.
The link I'm using on the parent page is ...
<a href="#" onClick="popupcal()">choose date</a>
My form is quite long, and when the popup is opened I'm returned to
the top of the page meaning I then have to scroll down again to
continue entering information.
I'm assuming this is due to the href="#" part of the link? Is there
any way I can avoid this problem?
Many thanks!
Jez