by jkb3614 on June 10th, 2009

jkb3614

Question

Help answer this question below.

Can anyone find a problem here?

<script language="JavaScript" type="text/javascript">
var opt = document.getElementById("_opt");
var x = "Home";
function go()
{
if (opt.value) == x
{window.open("http://www.google.com")}
}
</script>
its a menu

  • Like
  • Report

Answers. 2 helpful answers below.

  • by ILoveMySteaks ... is thinking. on June 10th, 2009

    ILoveMySteaks  ... is thinking.

    Try www.dynamicdrive.com they have some awesome java menus on there for you and you can go through the code and learn as you play with them :-)

    No comments. Post one | Permalink

  • by Derek_L5933 on July 15th, 2011

    Derek_L5933

    Yes, there is.
    Here:
    if (opt.value) == x
    it should be:
    if (opt.value == x)

    No comments. Post one | Permalink

Want to attach an image to your answer? Click here.

Did this answer your question? If not, then ask a new question or create a poll.

You're reading Can anyone find a problem here? <script language="JavaScript" type="text/javascript"> var opt = document.getElementById("_opt"); var x = "Home"; function go() { if (opt.value) == x {window.open("http://www.google.com")} } </script> its a menu

Follow us on Facebook!

Related Ads

ANSWERBAG BUZZ

Problem with the language javascript
Problems with money under the matress
Language javascript type text javascri
Script language javascript type text javascri