Begin forwarded message:

I could be wrong, but I believe...

onClick="newWindow(form.menu[form.menu.selectedIndex].value);"

...is what you want.

On Monday, August 18, 2003, at 03:13 PM, Wade Preston Shearer wrote:

i have been searching the internet for hours and cannot find a solution to this. anyone good with javascript?


this code...


        <SCRIPT LANGUAGE="JavaScript">
                function newWindow(URL)
                         {
                                day = new Date();
                                id = day.getTime();
                                eval("page" + id + " = window.open(URL, '" + id + "',
                                'toolbar=0,scrollbars=0,location=0,statusbar=0,
                                menubar=0,resizable=0,width=666,height=515,
                                left = 467,top = 342.5');");
                        }
        </script>

<a href="javascript: newWindow('http://google.com')">Open the new Window</a>


...will open a new window that have everything stripped away.


i want to do this with a list/menu in a form. meaning, that the user will select one item from the list and then click a button in the form ("view") and it will then create a new browser window, on top, displaying either the file or the website that they selected.

so, if i have a form, like...

<form name="form">
<select name="menu">
<option value="http://cheese.com"; selected>CHEESE!</option>
<option value="http://love.com";>burning love</option>
<option value="http://hot.com";>hot sauce</option>
</select>
<input type="button" name="view" value="view" onClick="????????????">
</form>



...what would i need to do to get the value that the user selects from the list/menu into the button... or into the javascript... or something .... so that, when the button is clicked, it...


1. opens a new browsers window that is stripped of everything
2. loads the selected file (whether a file or a different website) in that new window



...?


anyone?



____________________
BYU Unix Users Group http://uug.byu.edu/ ___________________________________________________________________
List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list




____________________
BYU Unix Users Group http://uug.byu.edu/ ___________________________________________________________________
List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list

Reply via email to