a special function
Hi, I need a java code for a special kind of hyperlink. Please help me in this regard. I want it this way:
When you click on the link for the first time, a text box appears including, say, "A".
When you click on the link for the second, third, forth,.... times, a text box appears including, say, "B".
That is, for the first consultation of the link, one thing is displayed; in further consultations, something else is shown.
<a href="#" onclick = 'alert( this.wasClicked ? "B" : "A" ); this.wasClicked = true; return false;'>GO</a>
Where used, return should be executed unconditionally and always as the last statement in the function.
That's my signature, it's not part of the damn post!
Originally Posted by nasscript
Originally Posted by Logic Ali
Imagine that we have the following line with the underlined words functioning as links.
This time tomorrow, we would get there. The time is passing quickly and I wonder if we could stay here longer.
I want the above links to function as follows. The result may appear in a new window, a new frame, a toolbox, a tooltip or whatever. It does not matter. To me the way of presenting the result is important which is as follows.
1) By clicking on "there" for the first time, the word "BOSTON" appears.
2) By clicking on "here" for the first time, the word "LONDON" appears.
3) After both links are consulted once and in a sequential order (that is, first "there" is clicked on, then "here"), by clicking on either "there" or "here" for the second, third, fourth,… times, the word "LONDON" appears.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)