Link to home
Start Free TrialLog in
Avatar of Mike Eghtebas
Mike EghtebasFlag for United States of America

asked on

<a> tag with OnClick()...

I want to add an OnClick event to the following line:
<a id="A4c" href="./Videos.html#UploadVideo" ><abbr title="watch demo video.">Data Upload</abbr></a>

Open in new window


It is supposed to show a message also navigate to href="./Videos.html#UploadVideo".

But this cannot be like alert box because it may mess up navigation.

Question: How can I incorporate something like toast (Demo:http://codeseven.github.io/toastr/demo.html) with this tag?

BTW, when I try something like:
<a id="A4c" href="./Videos.html#UploadVideo" onclcik="showSomething()"><abbr title="watch demo video.">Data Upload</abbr></a>

Open in new window

Understandably, it doesn't work I guess because <a> doesn't function like button on a form. So, how one fire from <a> or basically perform what has been described above?
Avatar of Julian Hansen
Julian Hansen
Flag of South Africa image

But this cannot be like alert box because it may mess up navigation.
Can you elaborate?

How will the message be dismissed - must the user click a button or does it just show for a period and then navigate to url.
Avatar of Mike Eghtebas

ASKER

I have 4 hyperlinks in index.html and 4 descriptions + vidoes on videos.html.

Problem: When user clicks on a hyperlink on index.html, it navigates to vidoes.html but it is not clear to the user which of the videos s/he must concentrate.

Desired solution: The caption of the target video could change color to red, or blink several times.

But because there is no session variables etc, a messaging like toast is also acceptable in the following manner:
1. User clicks on the hyperlink ("Search video").
2. A mesage appears on the upper right corner of the screen telling user "please see item 3. Search video" for example. This message ideally better to appear on vidoes.html and close after a second or two. But, it will be okay just to show this message on index.html just before navigating to vidoes.html. But this simple request may have its own complication causing delay in navigation.

Any other solution helping the user what video to watch is also acceptable.

Thanks,

Mike
ASKER CERTIFIED SOLUTION
Avatar of Julian Hansen
Julian Hansen
Flag of South Africa image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You are welcome.