a variable in a link

P

pr

Tantale said:
On my page http://www.jmrw.com/Meteo/Meteo.shtml

I have the line : document.write('<a
href="',Evenements_du_Jour,'">Évènements du Jour</a>');

where Evenements_du_Jour is a variable built in the page (today
Evenements_du_Jour gives http://fr.wikipedia.org/wiki/7_novembre.

It woks only with right-click in a new tab.

How should I correct this ?

Try it without the onclick attribute on the ancestor table cell:

<td onclick="MM_goToURL('parent','Evenements_du_Jour');
return document.MM_returnValue" valign="top" width="20%">
 
T

Tantale

pr said:
Try it without the onclick attribute on the ancestor table cell:

<td onclick="MM_goToURL('parent','Evenements_du_Jour');
return document.MM_returnValue" valign="top" width="20%">

Thanks but it does'nt seem to work

JMR
 
R

rf

Tantale said:
On my page http://www.jmrw.com/Meteo/Meteo.shtml

I have the line : document.write('<a
href="',Evenements_du_Jour,'">Évènements du Jour</a>');

Without a URL, wild guess:
document.write('<a > href="' + Evenements_du_Jour + '">Évènements du
Jour said:
where Evenements_du_Jour is a variable built in the page (today
Evenements_du_Jour gives http://fr.wikipedia.org/wiki/7_novembre.

It woks only with right-click in a new tab.

Er, what?
How should I correct this ?

Question why you should be using document.write?
 
T

Tantale

Now it works with
document.write('<a href="',Evenements_du_Jour,'">Évènements du Jour</a>');

thanks

JMR
 
P

pr

Randy said:
pr said the following on 11/7/2007 6:27 AM:

MM_goToURL is undefined.
document.MM_returnValue is undefined.

You shouldn't post Dreamweaver code without posting the accompanying
code to go with it.

Look again. The OP supplied a URL and I'm suggesting they try *dropping*
the table cell attribute that I quote. Dreamweaver, pah! I scorn such
immoral devices, and write all my web pages using just ones and zeros :)
 
D

Darko

Now it works with
document.write('<a href="',Evenements_du_Jour,'">Évènements du Jour</a>');

thanks

JMR

new: document.write('<a href="',Evenements_du_Jour,'">Évènements du
Jour</a>');
old: document.write('<a href="',Evenements_du_Jour,'">Évènements du
Jour</a>');

I don't see anything has changed. You've probably fixed the variable
definition outside here-visible code?

And I must say it was a good question rf asked - why (the hell) do you
use document.write to generate the page?
 
T

Tantale

"Darko" <[email protected]> a écrit dans le message de (e-mail address removed)...
Now it works with
document.write('<a href="',Evenements_du_Jour,'">Évènements du Jour</a>');

thanks

JMR

new: document.write('<a href="',Evenements_du_Jour,'">Évènements du
Jour</a>');
old: document.write('<a href="',Evenements_du_Jour,'">Évènements du
Jour</a>');

I don't see anything has changed. You've probably fixed the variable
definition outside here-visible code?

And I must say it was a good question rf asked - why (the hell) do you
use document.write to generate the page?

There was some bad old code before this portion who prevented it to function
properly. Now it works.

Thanks

JMR
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,279
Latest member
LaRoseDermaBottle

Latest Threads

Top