have script but need to know what Href to use
I am flat out dumb with javascript and that is why I am here.
I have html files that have multiple video popups currently using this href:
<p><a href="Videos/Tufting.wmv" target="_blank">
I have been provided a script by the client that I must use to launch the pop up window rather than using the "_blank" method.
This is the script I must use:
<script>
function openpopupvideo(){
var popurlvideo=NAMEofHTMLpage.htm'
winpops=window.open(popurlvideo,"","toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=720, height=536,")
}
</script>
but I do not know how to call this script or how the href(s) need to be worded.
Can anyone help me?
Thanks so much anyone.
[787 byte] By [
tftcwi] at [2007-11-11 8:37:42]

# 1 Re: have script but need to know what Href to use
Since you are new to Java, I think it would be good for me to point it out that Java is not the same as JavaScript. People who know Java need not know JavaScript. JavaScript is a half-baked scripting language targeted to control some of the browser's functionality on the client-side, while Java is intended for much more than that.
# 2 Re: have script but need to know what Href to use
Now, to answer your question, you need to change your link HTML to:
<a href="#" onClick="javascript:openpopupvideo();return false"> </a>
and your page will be called in a different window. The name for the window can be specified in the call to window.open()
# 4 Re: have script but need to know what Href to use
Thanks, I realized that just after I posted so I reposted this on the javascript forum - Thanks for pointing out your views on the inferiority of javascript but as I said I must use this - not my choice
Excuse me! :confused: I didn't say or mean to say JavaScript was inferior. The purpose of my message was that Java and JavaScript are two different languages created for different purpose. Java is a general purpose, full-blown programming language, while JavaScript is a convenient language for scripting browsers which has limitations to the functionality mostly for security reasons. There are several interesting things you could do with JavaScript.
While the names sound similar and tend to confuse, I just wanted to convey the message that there are better chances of getting help on a real javascript forum. Good luck! :)