www.webdeveloper.com
Results 1 to 4 of 4

Thread: multiple openindex() function

  1. #1
    Join Date
    Jan 2004
    Posts
    2

    multiple openindex() function

    with using the openindex() function to open a new window, i want to call two different windows with two different inputs. so basically if i click A, window A opens and if i click B window B opens but with openindex() it seems i can only call one window. any suggestions on how to do this?

  2. #2
    Join Date
    Dec 2002
    Location
    WI, United States
    Posts
    1,372
    I'm not sure exactly what you mean, but does this help?
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
    	   "http://www.w3.org/TR/html4/strict.dtd">
    
    <html>
    <head>
    	<title>Untitled</title>
    	<script type="text/javascript">
    		function openindex(which){
    			if(which == "A"){
    				wina = window.open("http://www.code4ever.com");
    			}else if(which = "B"){
    				winb = window.open("http://www.code4ever.com/free.php");
    			}
    		}
    	</script>
    </head>
    
    <body>
    
    <a href="http://www.code4ever.com" onclick="openindex('A'); return false;">Home page</a>
    <a href="http://www.code4ever.com" onclick="openindex('B'); return false;">Free page</a>
    
    </body>
    </html>
    if (succeed != true)
    function askAdam();

    Check out my site!

  3. #3
    Join Date
    Jan 2004
    Posts
    2
    yes thank you!

  4. #4
    Join Date
    Dec 2002
    Location
    WI, United States
    Posts
    1,372
    Great, I'm glad that worked for you.
    if (succeed != true)
    function askAdam();

    Check out my site!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles