PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Graphisme & Infographie > macromedia.dreamweaver > onClick GoTo URL
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
onClick GoTo URL

Réponse
 
LinkBack Outils de la discussion
Vieux 01/07/2008, 15h10   #1
Karlhevera
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut onClick GoTo URL

I have 'details' pages, which are accessible from various lists, depending
whether they are called from the 'by date' or 'by event' listing. The visitor
has to click the 'Back' arrow at top left to return to the calling page. Is
there a way I could incorporate a onClick behaviour, which will return the
visitor the the calling page, the 'parent'? In the 'behaviours' panel I could
only see that I can only assign a specific URL to the behaviour, which would
not work in my case, as the calling URLs might be different each time the page
is visited..
karl,London


  Réponse avec citation
Vieux 01/07/2008, 16h50   #2
djinn
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: onClick GoTo URL

Karlhevera wrote:
> I have 'details' pages, which are accessible from various lists, depending
> whether they are called from the 'by date' or 'by event' listing. The visitor
> has to click the 'Back' arrow at top left to return to the calling page. Is
> there a way I could incorporate a onClick behaviour, which will return the
> visitor the the calling page, the 'parent'? In the 'behaviours' panel I could
> only see that I can only assign a specific URL to the behaviour, which would
> not work in my case, as the calling URLs might be different each time the page
> is visited..
> karl,London
>
>


<a href="javascript:history.go(-1);">back</a>

HTH

--
chin chin
Sinclair
  Réponse avec citation
Vieux 01/07/2008, 20h40   #3
Michael Fesser
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: onClick GoTo URL

..oO(djinn)

>Karlhevera wrote:
>> I have 'details' pages, which are accessible from various lists, depending
>> whether they are called from the 'by date' or 'by event' listing. The visitor
>> has to click the 'Back' arrow at top left to return to the calling page. Is
>> there a way I could incorporate a onClick behaviour, which will return the
>> visitor the the calling page, the 'parent'? In the 'behaviours' panel I could
>> only see that I can only assign a specific URL to the behaviour, which would
>> not work in my case, as the calling URLs might be different each time the page
>> is visited..
>> karl,London

>
><a href="javascript:history.go(-1);">back</a>


JFTR: Every browser already has a back button and users know how to use
it. There's hardly a reason to reinvent the wheel, especially since it
relies on JS and would appear as a non-working link to users without JS.

Micha
  Réponse avec citation
Vieux 01/07/2008, 20h53   #4
djinn
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: onClick GoTo URL

Michael Fesser wrote:

> JFTR: Every browser already has a back button and users know how to use
> it. There's hardly a reason to reinvent the wheel, especially since it
> relies on JS and would appear as a non-working link to users without JS.


Yep - for sure - but it's what the OP was asking for :-)

--
chin chin
Sinclair
  Réponse avec citation
Vieux 01/07/2008, 20h56   #5
Karlhevera
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: onClick GoTo URL

many thanks... as they say: it's easy, when you know how.. Never though that it could be this simple..:-)
  Réponse avec citation
Vieux 01/07/2008, 20h58   #6
Murray *ACE*
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: onClick GoTo URL

It's not. 8)

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
==================


"Karlhevera" <webforumsuser@macromedia.com> wrote in message
news:g4e25t$d8o$1@forums.macromedia.com...
> many thanks... as they say: it's easy, when you know how.. Never though
> that it could be this simple..:-)


  Réponse avec citation
Vieux 01/07/2008, 21h10   #7
Karlhevera
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: onClick GoTo URL

Djinn: this is the snippet.. where do I put the line?
<map name="Map" id="Map">
<area shape="rect" coords="4,4,64,21" href="#"
onclick="MM_goToURL('parent','apothecary_summary.h tm');return
document.MM_returnValue"
onmouseover="MM_swapImage('Image1','','pics/closelabel_swap.jpg',1)"
onmouseout="MM_swapImgRestore()" />
</map>

  Réponse avec citation
Vieux 01/07/2008, 21h25   #8
Karlhevera
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: onClick GoTo URL

Michael: Sure, everyone is aware of the button's existence. However, I was
aked 'why do I have to click on the 'Back' arrow, at the top of the browser, to
go back to the previous page?'... This took me back to my former incarnation,
where I used if lastkey().... or inkey() ..do whatever...obviously not
available in DW? or is burried somewhere?


  Réponse avec citation
Vieux 01/07/2008, 21h36   #9
Michael Fesser
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: onClick GoTo URL

..oO(Karlhevera)

>Michael: Sure, everyone is aware of the button's existence. However, I was
>aked 'why do I have to click on the 'Back' arrow, at the top of the browser, to
>go back to the previous page?'


Who asks such stupid questions? ;-)

Micha
  Réponse avec citation
Vieux 01/07/2008, 22h50   #10
djinn
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: onClick GoTo URL

Karlhevera wrote:
> Djinn: this is the snippet.. where do I put the line?
> <map name="Map" id="Map">
> <area shape="rect" coords="4,4,64,21" href="#"
> onclick="MM_goToURL('parent','apothecary_summary.h tm');return
> document.MM_returnValue"
> onmouseover="MM_swapImage('Image1','','pics/closelabel_swap.jpg',1)"
> onmouseout="MM_swapImgRestore()" />
> </map>
>


Hi,

If you'd still like to do it - then it would look something like this,
given those co-ords and onclicks etc.........

<map name="Map" id="Map">
<area shape="rect" coords="4,4,64,21" href="javascript:history.go(-1);"
onclick="MM_goToURL('parent','apothecary_summary.h tm');return
document.MM_returnValue"
onmouseover="MM_swapImage('Image1','','pics/closelabel_swap.jpg',1)"
onmouseout="MM_swapImgRestore()" />
</map>

HTH

--
chin chin
Sinclair
  Réponse avec citation
Vieux 02/07/2008, 09h13   #11
Dooza
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: onClick GoTo URL

Karlhevera wrote:
> I have 'details' pages, which are accessible from various lists, depending
> whether they are called from the 'by date' or 'by event' listing. The visitor
> has to click the 'Back' arrow at top left to return to the calling page. Is
> there a way I could incorporate a onClick behaviour, which will return the
> visitor the the calling page, the 'parent'? In the 'behaviours' panel I could
> only see that I can only assign a specific URL to the behaviour, which would
> not work in my case, as the calling URLs might be different each time the page
> is visited..
> karl,London


If your using ASP you could use this technique:

On every page use this near the top:

<% Session("previouspage") = Request.ServerVariables("SCRIPT_NAME") %>

This doesn't allow for a page with url parameters, but you can use
another ServerVariable to add that on:

Session("previouspage") = Request.ServerVariables("SCRIPT_NAME") & "?"
& Request.ServerVariables("QUERY_STRING") %>

On the next page, you use this:

<a href="<%=Session("previouspage")%>">Back</a>

If you understand what this is doing then I am sure you could do the
same in any serverside language. That way the user doesn't have to have
Javascript enabled for it to work.

Steve
  Réponse avec citation
Vieux 02/07/2008, 09h23   #12
Karlhevera
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: onClick GoTo URL

Who asks such stupid questions?

:-)) Obiously, a stupid person... and, unfortunately, there are MORE stupid
people than clever ones.... And that makes the World go round... Can you
imagine, if we were all clever?




  Réponse avec citation
Vieux 02/07/2008, 09h26   #13
Karlhevera
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: onClick GoTo URL

djinn: thanks...Indeed, I will try it and see how it looks.... Question must have come from a 'stupid' person, to which I have replied elsewhere...:-) he may be quite happy with the result...
  Réponse avec citation
Vieux 02/07/2008, 09h40   #14
Dooza
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: onClick GoTo URL

Karlhevera wrote:
> :-)) Obiously, a stupid person... and, unfortunately, there are MORE stupid
> people than clever ones.... And that makes the World go round... Can you
> imagine, if we were all clever?


If we were all clever there would still be degree's of how clever one
was, so you would have really clever and clever not as clever as the
really clever, ie stupid, like good and evil, both will always exist.

Steve
  Réponse avec citation
Vieux 02/07/2008, 09h47   #15
Karlhevera
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: onClick GoTo URL

djinn: have done as suggested, but I still return to the 'apothecary_summary.htm;, instead of the calling page..
Karl
  Réponse avec citation
Vieux 02/07/2008, 12h36   #16
djinn
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: onClick GoTo URL

Karlhevera wrote:
> djinn: have done as suggested, but I still return to the 'apothecary_summary.htm;, instead of the calling page..
> Karl


The minus number will take you back the number of pages from whence you
came - so -1 will take you back a page, if you need to - then adjust
that minus figure to suit - like..

<map name="Map" id="Map">
<area shape="rect" coords="4,4,64,21" href="javascript:history.go(-2 or
whatever is required);"
blah blah blah......

Be aware once this page has gone live - should a person find one of
these pages via google or other search engine then by clicking *your*
back button, they will find themselves back at google or further back in
their browsing history, depending on the minus figure used.

Personally - I'd go for some sort of sub menu - if this is a static site
- if you are using server side coding then check out Dooza's reply.

--
chin chin
Sinclair
  Réponse avec citation
Vieux 02/07/2008, 15h36   #17
Karlhevera
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: onClick GoTo URL

djinn: thanks. It does not matter what number I use, it always returns to
apothecary_summary.htm, although it was not called from there.

The path is: index->july_aug->apothecary_RCP_detail.htm.. on click, I would
like to return to the calling page, the july_aug page, rather than other
details of the organisation.




  Réponse avec citation
Vieux 02/07/2008, 15h46   #18
djinn
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: onClick GoTo URL

Karlhevera wrote:
> djinn: thanks. It does not matter what number I use, it always returns to
> apothecary_summary.htm, although it was not called from there.
>
> The path is: index->july_aug->apothecary_RCP_detail.htm.. on click, I would
> like to return to the calling page, the july_aug page, rather than other
> details of the organisation.


let us see this phenomenon.

--
chin chin
Sinclair
  Réponse avec citation
Vieux 02/07/2008, 16h19   #19
djinn
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: onClick GoTo URL

Karlhevera wrote:
> djinn: thanks. It does not matter what number I use, it always returns to
> apothecary_summary.htm, although it was not called from there.
>
> The path is: index->july_aug->apothecary_RCP_detail.htm.. on click, I would
> like to return to the calling page, the july_aug page, rather than other
> details of the organisation.


OK - check this out.....

http://www.bijouwebsites.co.uk/karl/

and see if this s.

--
chin chin
Sinclair
  Réponse avec citation
Vieux 03/07/2008, 07h37   #20
Karlhevera
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: onClick GoTo URL

Thanks. Will have a go... otherwise, I will have to calm down that 'stupid' person who was asking that 'stupid' question..:-)
Karl
  Réponse avec citation
Vieux 04/07/2008, 18h16   #21
Karlhevera
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: onClick GoTo URL

djinn: that would work fine. But the problem is that the 'previous' page could
be one of three pages, which might call this page. I will forego this idea,
but may, in due time, when I come to the time to do my ASP, to have a look at
the code supplied above.

again, thanks, it was just an idea...:-)

  Réponse avec citation
Vieux 04/07/2008, 18h53   #22
djinn
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: onClick GoTo URL

Karlhevera wrote:
> djinn: that would work fine. But the problem is that the 'previous' page could
> be one of three pages, which might call this page. I will forego this idea,
> but may, in due time, when I come to the time to do my ASP, to have a look at
> the code supplied above.
>
> again, thanks, it was just an idea...:-)
>


Sure thing,

If you are still keen to provide this - without asp or other server side
code - depending on your site structure - you might be interested in a
couple of extensions from KaosWeaver - breadcrumbs or croutons......

http://www.kaosweaver.com/

HTH

--
chin chin
Sinclair
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 04h08.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,24609 seconds with 30 queries