This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Dreamweaver > June 2004 > Javascript links appear as "visited" in IE





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Javascript links appear as "visited" in IE
Andrew McKenna Lee

2004-06-11, 4:14 am

I have a few links on my site that have javascript pop-up menus attached. When
I click on ONE of these links in IE for Windows, ALL of the javascript links in
the site turn purple- the default font for a "visited" link.

This was not a problem in IE for Mac, nor Safari or Netscape (all Mac)
Any ideas on what's causing this?

Thanks!
Andrew

seb

2004-06-11, 4:14 am

I'd love to think that IE PC (=windows) just plain sucks, but there
might as well be another more scientific explanation for your problem.
If there is, even the techies won't be able to find out, unless you

SHOW US THE CODE

SHOW US THE CODE

SHOW US THE CODE

thank you, i won't say it one more time.


Andrew McKenna Lee wrote:
> I have a few links on my site that have javascript pop-up menus attached. When
> I click on ONE of these links in IE for Windows, ALL of the javascript links in
> the site turn purple- the default font for a "visited" link.
>
> This was not a problem in IE for Mac, nor Safari or Netscape (all Mac)
> Any ideas on what's causing this?
>
> Thanks!
> Andrew
>

Andrew McKenna Lee

2004-06-11, 4:14 am

Please excuse me, as I'm new to html discussion :-)
Anyway, I have no idea what I'm doing with code- I work in design view
exclusively and pretend that the code doesn't really exist- a policy wich I'm
sure has the hard-core web designers shuddering...

Anyway, I'd be happy to provide the code, but what code do you need? The code
for the javascript link? The code for something else? How do I post code? Last
time I tried to include code in my message the forum message board turned it
into a link or something...

I'm really not an idiot, just a neophyte... What exactly do I do?

-A

seb

2004-06-11, 4:14 am

go in code view, select all, copy, and paste here in your message.
Or, better, publish your page on the web and give us a URL.
Sorry if I was rude. There's just no way to help without seeing the
code. Just like you'll never learn to answer your own questions if you
never look at your code.

Andrew McKenna Lee wrote:

> Please excuse me, as I'm new to html discussion :-)
> Anyway, I have no idea what I'm doing with code- I work in design view
> exclusively and pretend that the code doesn't really exist- a policy wich I'm
> sure has the hard-core web designers shuddering...
>
> Anyway, I'd be happy to provide the code, but what code do you need? The code
> for the javascript link? The code for something else? How do I post code? Last
> time I tried to include code in my message the forum message board turned it
> into a link or something...
>
> I'm really not an idiot, just a neophyte... What exactly do I do?
>
> -A
>

Murray *TMM*

2004-06-11, 12:14 pm

Think about this. Such constructions are typically handled with code like
this -

<a href="java script:;" onClick="MM_open....

In other words, all of the "links" point to "java script:;". In this light,
it makes perfect sense that clicking on one of them will set all of them to
visited.

If this is not what you want, then use CSS to give them a special
pseudo-class where a:link and a:visited are defined with the same style.

--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver MX
(If you *MUST* email me, don't LAUGH when you do so!)
==================
news://forums.macromedia.com/macromedia.dreamweaver - THE BEST WAY TO GET
ANSWERS
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================

"seb" <sebnewyork@earhlink.netTakeThisOut> wrote in message
news:cabiam$kfd$2@forums.macromedia.com...[color=darkred]
> go in code view, select all, copy, and paste here in your message.
> Or, better, publish your page on the web and give us a URL.
> Sorry if I was rude. There's just no way to help without seeing the
> code. Just like you'll never learn to answer your own questions if you
> never look at your code.
>
> Andrew McKenna Lee wrote:
>
wich I'm[color=darkred]
The code[color=darkred]
code? Last[color=darkred]
turned it[color=darkred]


Joe Makowiec

2004-06-11, 12:14 pm

On 11 Jun 2004 in macromedia.dreamweaver, Andrew McKenna Lee wrote:

> Anyway, I have no idea what I'm doing with code- I work in design
> view
> exclusively and pretend that the code doesn't really exist- a policy
> wich I'm sure has the hard-core web designers shuddering...


Correct in one. In particular, a lot of what some designers view as
shortcomings in DreamWeaver are part of the design of HTML. If you're
going to be doing any web development at all, it's *well* worth your
while to learn at least the basics of HTML and CSS. You have to be able
to read code to diagnose a lot of problems, and it will cut your
development time substantially.

> Anyway, I'd be happy to provide the code, but what code do you
> need? The code
> for the javascript link? The code for something else? How do I post
> code? Last time I tried to include code in my message the forum
> message board turned it into a link or something...


In general, when somebody says 'show us the code', what we mean is that
we want to see the code /in vivo/ - on a server, with all the other code
and associated files available. So what we're asking for is a URI to
where we can see the code: http://mysite.invalid/testpage.php

Side note - come over to the NNTP side
(news://forums.macromedia.com/macromedia.dreamweaver). The forums run
faster, are better about allowing you to post code snippets, and news
readers are designed for this kind of forum.

--
Joe Makowiec can be reached at:
http://makowiec.org/contact/?Joe
Andrew McKenna Lee

2004-06-11, 12:14 pm

Dear All,
Many thanks for your clarification and explanation :-)
I can try looking at the code myself later this evening, but in the meantime,
here are some links that illustrate the point, and I assume you can look at the
code by "viewing the source?"

Go to:
http://silvertone.princeton.edu/~am...20works/Two%20P
ieces.htm

Click on the link that says "Click here to listen to an MP3"
Notice the pop-up menu.
Now, go to :
http://silvertone.princeton.edu/~am...dual%20works/Sc
ordatura%20Suite.htm

If you're using IE on Windows, notice that the "Click here to listen to an
MP3" link on this page is now colored purple, as if it has been visited. On
any other browser, it should still be blue.

Murray's post makes sense to me- ie, the links all pointing to "java script:;"
which is why they all become colored when one of them is visited. I'm just not
sure how to recognize what exactly it is in the code that's causing this, and
why it's specific to IE in Windows (if indeed it is- Mac IE, Safari, Netscape,
and Opera all seem to handle the links w/o problem)

My many thanks for your advice and sage wisdom.

Best wishes,
Andrew


Michael Fesser

2004-06-11, 7:14 pm

.oO(Murray *TMM*)

>In other words, all of the "links" point to "java script:;". In this light,
>it makes perfect sense that clicking on one of them will set all of them to
>visited.
>
>If this is not what you want, then use CSS to give them a special
>pseudo-class where a:link and a:visited are defined with the same style.


Or even better - make them real links and use an onclick event handler
for performing JS-actions. Then you don't have such problems.

Micha
Andrew McKenna Lee

2004-06-11, 7:15 pm

Or even better - make them real links and use an onclick event handler
for performing JS-actions. Then you don't have such problems.

Micha

Does this mean that I can insert a pop-up menu without having to use JS?

-A

Murray *TMM*

2004-06-11, 7:15 pm

No.

--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver MX
(If you *MUST* email me, don't LAUGH when you do so!)
==================
news://forums.macromedia.com/macromedia.dreamweaver - THE BEST WAY TO GET
ANSWERS
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================

"Andrew McKenna Lee" <webforumsuser@macromedia.com> wrote in message
news:cacssc$drp$1@forums.macromedia.com...
> Or even better - make them real links and use an onclick event handler
> for performing JS-actions. Then you don't have such problems.
>
> Micha
>
> Does this mean that I can insert a pop-up menu without having to use JS?
>
> -A
>



Josh Johnson

2004-06-11, 7:15 pm

You've probably created links with href="#". When you click on that
link it loads the link which is your page. Since you've visited your
page, all your other links with that href="#" are marked visited too.

Instead of linking to "#", link to the actual page you're popping up,
and use javascript to make it show up in a popup. Here's an example
that uses the built-in MM behaviour:

< a href="foo.html"
onclick="MM_openBrWindow(this,'window','width=900,height=650');return
false" >popup foo< /a >

I spaced out the brackets to make sure it'll post right.

- Josh

Andrew McKenna Lee wrote:
> I have a few links on my site that have javascript pop-up menus attached. When
> I click on ONE of these links in IE for Windows, ALL of the javascript links in
> the site turn purple- the default font for a "visited" link.
>
> This was not a problem in IE for Mac, nor Safari or Netscape (all Mac)
> Any ideas on what's causing this?
>
> Thanks!
> Andrew
>

Michael Fesser

2004-06-11, 7:15 pm

.oO(Andrew McKenna Lee)

> Does this mean that I can insert a pop-up menu without having to use JS?


No, but you can provide an alternative in case JS is turned off or not
available at all on the client. Javascript-only "links" are a usability
issue - they are there, but do nothing when someone clicks on them
without having JS available. Simply annoying.

There are two ways to correct this:

* Print out the entire thing with document.writeln(), so that it won't
be visible at all without Javascript.

* Better: Use a real link as fallback, something like

<a href="foo.html" onclick="popup('foo.html'); return false;">...</a>

This will work always: With JS enabled it opens a new window or shows
some hidden content, without it it opens something in the same window.

Micha
Murray *TMM*

2004-06-11, 7:15 pm

href="java script:;" as I said in my original response.

--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver MX
(If you *MUST* email me, don't LAUGH when you do so!)
==================
news://forums.macromedia.com/macromedia.dreamweaver - THE BEST WAY TO GET
ANSWERS
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================

"Andrew McKenna Lee" <webforumsuser@macromedia.com> wrote in message
news:cad29t$jv4$1@forums.macromedia.com...
> Here's the code for the link in question:
>
> < td width="265" height="55" valign="top"><p><a href="java script:;"
> name="link2" class="Bluelink1" id="link1"
>

onClick="MM_showMenu(window.mm_menu_0610001524_0,200,-10,null,'link2')">Clic
k
> here to listen to an MP3 </a></p >
>
> There is not a link to a "#"... Being a novice HTML'r, I can understand
> certain parts of the code. I recognize "class=Bluelink1" as the CSS style

I've
> applied to the link. I recognize "a href="java script:;" and "on
> Click=MM-etc..." as being components of the behavior I've attached to the

link
> (the pop-up menu). I don't recognize the part that's making EVERY JS link

in my
> site turn purple (the visited link color) when only ONE has been

visited...
>
> ???
>
> -Andrew
>
>
>



Andrew McKenna Lee

2004-06-11, 7:15 pm

DOOOH!!!
Let me try to post the code once more :-/ This time I'll space the brackets...

< td width="265" height="55" valign="top" > < p> < a href="javascript:;"
name="link2" class="Bluelink1" id="link1" onClick= "MM_showMenu
(window.mm_menu_0610001524_0,200,-10,null,'link2')" > Click
here to listen to an MP3</a></p>

Andrew McKenna Lee

2004-06-11, 7:15 pm

Here's the code for the link in question:

< td width="265" height="55" valign="top"><p><a href="javascript:;"
name="link2" class="Bluelink1" id="link1"
onClick="MM_showMenu(window.mm_menu_0610001524_0,200,-10,null,'link2')">Click
here to listen to an MP3 </a></p >

There is not a link to a "#"... Being a novice HTML'r, I can understand
certain parts of the code. I recognize "class=Bluelink1" as the CSS style I've
applied to the link. I recognize "a href="javascript:;" and "on
Click=MM-etc..." as being components of the behavior I've attached to the link
(the pop-up menu). I don't recognize the part that's making EVERY JS link in my
site turn purple (the visited link color) when only ONE has been visited...

???

-Andrew



Bonnie in Sacramento

2004-06-12, 4:14 am

Andrew McKenna Lee wrote:

> Dear All,


<snipped>

> Go to:
> http://silvertone.princeton.edu/~am...20works/Two%20P
> ieces.htm
>

Not Found
The requested URL /~amlone/Music/Chamber/Individual works/Two P was not
found on this server.

Apache/1.3.26 Server at silvertone.princeton.edu Port 80
--
Bonnie in Sacramento
kroko at
sbcglobal dot net
Michael Fesser

2004-06-12, 4:14 am

.oO(Bonnie in Sacramento)

>Andrew McKenna Lee wrote:
>
>Not Found
>The requested URL /~amlone/Music/Chamber/Individual works/Two P was not
>found on this server.


Watch the line break.

<http://silvertone.princeton.edu/~am...wo%20Pieces.htm>

Micha
Sponsored Links


Copyright 2003 - 2009 forum4designers.com  Software forum  Computer Hardware reviews