Zelaron Gaming Forum

Zelaron Gaming Forum (http://zelaron.com/forum/index.php)
-   Tech Help (http://zelaron.com/forum/forumdisplay.php?f=329)
-   -   A question about a JavaScript(?) code. (http://zelaron.com/forum/showthread.php?t=2892)

Mr.Lee 2002-04-29 09:54 AM

A question about a JavaScript(?) code.
 
Here is my q:

How do i make when i click on a special link on a image
then the function will go to a another position of the website
( same webpage ) NOT normal "<a href>"?

I hope u understand what i mean. Thanks.

PS: Can you mail the answer to me please? Im too busy now to visit the forums.

WetWired 2002-04-29 10:30 AM

You mean like this?:

<a href="#gohere">Go to gohere</a>
When<br>
you<br>
click<br>
the<br>
link<br>
above,<br>
it<br>
should<br>
skip<br>
past<br>
all<br>
this<br>
text<br>
to<br>
the<br>
line<br>
below.<br>
<a id="gohere"><b>You made it</b></a><br>
this<br>
text<br>
will<br>
add<br>
enough<br>
stuff<br>
below<br>
the<br>
new<br>
position<br>
so<br>
that<br>
your<br>
browser<br>
will<br>
shift<br>
its<br>
vertical<br>
position<br>
if<br>
you<br>
resize<br>
it<br>
very<br>
small<br>

Simple, isn't it?
--WetWired

Mr.Lee 2002-04-29 10:37 AM

yes but i said NOT NORMAL a href code...

WetWired 2002-04-29 10:51 AM

I took you to mean that you didn't wan't to change pages.
I fail to understand what you want then. Why does this not work for you?

I can't see why it doesn't
--WetWired

Mr.Lee 2002-04-29 10:59 AM

i explain deeper:

i have 2 iframes
frame 1 contains the link i want to click
frame 2 shows the containt when i clicked on that link

and the javascript function: if click this link; go to postion top on frame 2

WetWired 2002-04-29 11:27 AM

So you mean something like this?
index.html
Code:

<html>
<frameset cols="100,*">
  <frame name="navbar" src="navbar.html">
  <frame name="main" src="home.html">
</frameset>
</html>

navbar.html
Code:

<html>
<body>
  <a href="home.html#top" target="main">Home</a>
</body>
</html>

home.html
Code:

<html>
<body>
  <a id="top">Welcome to my awesome site</a><br>
  (other stuff here)
</body>
</html>

You could have mentioned frames in your first post
--WetWired

Mr.Lee 2002-04-29 11:31 AM

not der ****ing html shit!!!
i asked for ----> java script code !!! <----

i already know that you posted below
and also a frame is not nessesary

WetWired 2002-04-29 12:13 PM

What's wrong with HTML? If you can do it in HTML, do it in HTML, because Javascript is not universally available. If you want Javascript, I believe the function you want is:
window.open(newurl,target)

:rolleyes: Use at your own risk
--WetWired

GameCube 2002-05-01 02:45 PM

but ud need an onclick="" within a link or button tag

GameCube 2002-05-01 03:25 PM

btw the newurl and target need to be in 'single quotes'.


All times are GMT -6. The time now is 12:06 AM.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
This site is best seen with your eyes open.