emokitten
05-24-2003, 04:10 PM
I know the original inlineframe and drop down menu issue is addressed several times in the forums, and in the site itself. However, I've having problems.
I need to create a dropdown box (with go button) that will open certain targets in the iframe, and others as a new page. I've searched everywhere, and I cannot seem to find anything on it. Is there any way to acheive it?
Stormx
05-25-2003, 09:18 AM
You could use javascript to set a variable with the onClich event handler and then use a if (variable != undefined) to open the link. If you know enogh java you could do it yourself but do you want me to write it out?
emokitten
05-25-2003, 07:16 PM
If you would write it out, I'd be quite grateful. I have no Jscript experience :/
Stormx
05-26-2003, 01:17 PM
I have no idea if this will work. It basicly uses the variable "yoyo" to store the URL and "spinningtop" to store the target info and loades it when you click the button.
First, add these tags to your options in your option tag
--------------
onClick="yoyo= yoururl;
spinningtop=yourtarget;"
--------
Then, INSTEAD of your go button, put this. No need to change anything in this bit:
----------
<SCRIPT LANGUAGE="JAVASCRIPT" TYPE="TEXT/JAVASCRIPT>
document.write("<a href='" + yoyo + "' target='" + spinningtop + "' > Go! </a>");
</SCRIPT>
-----
so it will look like (altogether):
----
<form name="whatever" method="POST">
<select name="menu" size=1>
<option value="http://www.lissaexplains.com" onClick="yoyo= yoururl;
spinningtop=yourtarget;">Lissa Explains it All</option>
<option value="http://www.lissaexplains.com/cursor.shtml" onClick="yoyo= yoururl;
spinningtop=yourtarget;">Lissa's Cursors</option>
<option value="http://www.lissaexplains.com/home"onClick="yoyo= yoururl;
spinningtop=yourtarget;">Lissa's Page</option>
</select>
</form>
<SCRIPT LANGUAGE="JAVASCRIPT" TYPE="TEXT/JAVASCRIPT>
document.write("<a href='" + yoyo + "' target='" + spinningtop + "' > Go! </a>");
</SCRIPT>