View Full Version : Linking and Anchoring at Same Time


Andyman
02-16-2003, 12:41 AM
I've tried to link and anchor to a page at the same time, but without success. I'm using a javascript pop-up window code. Here's an example of what I've done:

<script language="javascript">
//<!--
function start()
{ window.open ("/main/start#1.html","start","width=400,height=400,location=0,menubar=0,resizabl e=0,scrollbars=0,status=0,titlebar=1,toolbar=0") }
-->
</script>

blahblahblah

<a href="javascript:start()">Click here</a>

I've seen from other people's posts that you just put the "#" after the real url...

I've also tried to just link it without the anchoring, and it worked fine. I think the problem is when I've put in the "#". I'd appreciate any help. ^_^

bejayel
02-16-2003, 01:40 AM
<script language="javascript">
//<!--
function start()
{ window.open ("/main/start#1.html","start"," width=400,height=400,loca
tion=0,menubar=0,resizabl
e=0,scrollbars=0,status=0
,titlebar=1,toolbar=0") }
-->
</script>

blahblahblah

<a href="javascript:start()">Click here</a>

try this instead.
**bold areas is where you messed up**
<script language="javascript">
//<!--
function start()
{ window.open ("main/start.html#1","start"," width=400,height=400,loca
tion=0,menubar=0,resizabl
e=0,scrollbars=0,status=0
,titlebar=1,toolbar=0") }
-->
</script>

blahblahblah

<a href="javascript:start()">Click here</a>

Andyman
02-16-2003, 03:13 AM
it worked! thank you so much! btw, there needed to be a "/" in front of the word "main" =D