Click to See Complete Forum and Search --> : hyperlink to an event in a webpage


MarkE
12-27-2002, 08:52 PM
I have buttons in my webpage that, when clicked, use document.write('') to write a video file to the webpage. (It does not link to another webpage, it is on the same one.) How can I make a hyperlink on another page that links to the part after a button is clicked? For example, I have a button named "trailermovie". When it is clicked, it writes a movie file to the page. I want a hyperlink that goes to the movie rather than the menu part with the buttons. I think I have to do something like this: "C:\My Documents\My Webs\moviepage.html?______________ with text after the question mark that goes to the event when the button is clicked.

Zach Elfers
12-27-2002, 09:21 PM
Why would you need to do that? Also, if you link to your harddrive, other visitors will not be able to see the information.


Why don't you do something like this:

<input type="button" value="Click" onClick="writeCode();">

<script language="JavaScript" type="text/JavaScript">

function writeCode() {
document.write("Hello!");
return true;
}

</script>