Closed Thread Icon

Preserved Topic: How do I make "dynamic" links (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=18442" title="Pages that link to Preserved Topic: How do I make &amp;quot;dynamic&amp;quot; links (Page 1 of 1)" rel="nofollow" >Preserved Topic: How do I make &quot;dynamic&quot; links <span class="small">(Page 1 of 1)</span>\

 
z28
Obsessive-Compulsive (I) Inmate

From: Florida
Insane since: Jun 2002

posted posted 06-17-2002 22:17

I am using Doc's excellent rollover script (Thanks Doc!!) and all that is working well. I added to it, so that when you rollover one end of the menu, the buttons change (think of it like a sideways scroll to show more of the menu). Now, I am looking for an easy way to make the button's links change with the psudo-scroll, so that when the button changes from "home" to "resources" the link changes too so you go to the right page. I am a JS newbie, so I don't even know where to begin.

Thanks to all for any help

CPrompt
Maniac (V) Inmate

From: there...no..there.....
Insane since: May 2001

posted posted 06-17-2002 22:57

Call me silly, but I am confused as to what you want. Can you post a psudeo page to look at?

Later,
C:\


~Binary is best~

Petskull
Maniac (V) Mad Scientist

From: 127 Halcyon Road, Marenia, Atlantis
Insane since: Aug 2000

posted posted 06-17-2002 23:01

well, you see... it's quite simple...um...


*whisper*pssst, Slime.... ya know the answer?


Harmonizing new illusions...
ICQ: 67751342

Petskull
Maniac (V) Mad Scientist

From: 127 Halcyon Road, Marenia, Atlantis
Insane since: Aug 2000

posted posted 06-17-2002 23:02

he's got no problem changing the images, but the he wants to change the <A HREF="whatever"> part..


Harmonizing new illusions...
ICQ: 67751342

bitdamaged
Maniac (V) Mad Scientist

From: 100101010011 <-- right about here
Insane since: Mar 2000

posted posted 06-17-2002 23:27

Ugh okay basics are this.
<script>
// First is the array of hrefs for the first menu. Second is the list of hrefs for the second
linklist1 = new Array("wherever.com/page1.html","wherever.com/page2html");
linklist2 = new Array("wherever.com/page3.html","wherever.com/page4html");
currentList = linklist1;

function goto(listnum) {
location.href = currentList[listnum];
}

function switchmenus(menuList) {
// Code here that switchs out your images.
currentList = menuList;
}
</script>

// This is your basic link. Note that the number in goto is one less than the number of your link.
<a href="javascript: goto(0);>Link number 1</a>

then your link that switchs menus you need to include.
swichmenus('linklist1');

Something like that.
It would be easier if you showed how you are switching the menus right now.






.:[ Be Bert. Be Ernie. Just be. ]:.

CPrompt
Maniac (V) Inmate

From: there...no..there.....
Insane since: May 2001

posted posted 06-18-2002 02:23

OH, ok ! heheh. I was totally confused by that. I couldn't have helped anyway. Good thing Bit came along

Later,
C:\


~Binary is best~

Petskull
Maniac (V) Mad Scientist

From: 127 Halcyon Road, Marenia, Atlantis
Insane since: Aug 2000

posted posted 06-18-2002 20:50

bitD.... that's cheating!!

is there a DOM path to the link?


Harmonizing new illusions...
ICQ: 67751342

bitdamaged
Maniac (V) Mad Scientist

From: 100101010011 <-- right about here
Insane since: Mar 2000

posted posted 06-18-2002 22:25

sure you can name it

<a href="wherever.com" name="myLink">

and switch the href like

myLink.href = "newURL.com";



.:[ Be Bert. Be Ernie. Just be. ]:.

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 06-18-2002 22:44

Work as that might, the proper way to do it with the real DOM would be

<a href="whatever" id="mylink">

and

document.getElementById('mylink').setAttribute('href','newurl');

I believe.

« BackwardsOnwards »

Show Forum Drop Down Menu