• Nike free run 2 pink
  • Nike free 5.0 kids
  • Oakley sunglasses discount
  • CodeAve.com CodeAve.com - JavaScript - Navigation
    ASP
    JavaScript
    ·Document Info
    ·Forms
    ·Images
    ·Miscellaneous
    ·Navigation
    ·Script Writers
    ·Contents
    ·What's New?
    CSS
    HTML
    Maps
    Links
    Mail List
    Search
    Sitemap


     

  • Retro 3 jordans
  • Jordan 13 retro
  • Nike free 5.0

  • Passing Variables via Links
  • Air jordan 11 low
  • New Balance 996
  • Ray ban vintage sunglasses
  • Variables can be passed to JavaScript functions in a number of ways including hyperlinks. In order to pass a value from a link to a javascrtipt function the link must be set to the function name and the variable value must be placed in parenthesis and single quoted similar to the following convention javascript:funtion_name(‘variable_value’) The following example contains four links to websites and rather than a link directly to them will pass a value to a JavaScript function that will open a new browser window with the link that was clicked on. Place your mouse pointer over any of the links and you will notice the value that is being passed to the JavaScript function
    View the Output
    Text View
    Print View
    Mail this Link
    Download the Code

    <html>
    <title>CodeAve.com(JavaScript: 
    Passing Variables via Links)</title>
    <script language="JavaScript">
    <!-- 
    function variable_in_link(varible_value)
    // function variable_in_link will assign the first variable
    // passed to it as variable_value


    new_win = window.open('http://www.'+varible_value+'.com','', 'width=640,height=400,left=10,top=10')
    }
    // -->
    </script>


    <body bgcolor="#FFFFFF">
    <a href="javascript:variable_in_link('yahoo')">Yahoo</a> 
    <br>
    <a href="javascript:variable_in_link('aol')">AOL</a> 
    <br>
    <a href="javascript:variable_in_link('lycos')">Lycos</a> 
    <br>
    <a href="javascript:variable_in_link('altavista')">AltaVista</a> 

    <!-- The variable value being passed to the JavaScript function 
    is encased in parenthesis and single-quoted -->

    </body>
    </html>

     

     

     



    ASP: What's New? | Articles | Script Writers | Database Display | Read/Write
    Server Variables | Response Objects | Random Events | Miscellaneous
    HTML: Forms | Hyperlinks | Headers | Tables | Hyperlinks | Headers | Text Display
    JavaScript: Document Info | Forms | Images | Navigation | Script Writers
    CSS: Basics | Page Display | Text Display | Script Writers | Miscellaneous
  • 2014 michael kors
  • air max women 2013
  • 2014 michael kors
  • air max 2014
  • oakley glasses
  • oakley glasses

  • Maps: Map Script Writers | Bing Maps | Google Maps
  • bottes fr
  • ugg boot
  • Privacy Statement

    CodeAve.com is hosted by MyHosting.com
    Donate Food Online with a Mouse Click at TheHungerSite.com
    Donate Land Online with a Mouse Click at TheRainForestSite.com
    © 1999 - 2017 CodeAve.com
    All Rights Reserved

    jordan 11 gamma Nike KD VI lebron 11 low