Log in

View Full Version : need some help with inputs



queerfm
03-08-2007, 06:50 PM
hi i would like to do the following

Lets say i have a text box and someone types in the word russell

I would like that text field to open something like http://www.queerfm.net/["name"].swf in this case it would look like

http://www.queerfm.net/russell.swf i would like to also make it so that this opens in an iframe. can any one help.

BTW i want it so no matter what they type in it trys to find the swf file even if it can't

mburt
03-08-2007, 08:04 PM
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Link Change</title>
<script type="text/javascript">
var host = "http://www.queerfm.net/";
var extension = ".swf";
function url(element,attribute) {
var el = document.getElementById(element);
var value = el.value;
window.open(host+value+extension,"window");
}
</script>
</head>
<body>
<input id="page" type="text">
<br><input value="Enter" onclick="url('page');" type="button">
</body>
</html>

queerfm
03-19-2007, 08:10 AM
Hi i was wondering is there a way that a user could select from a drop down box what directory they would like to search.

So for contacts its - http://www.queerfm.net/contacts/____.html
for Music its - http://www.queerfm.net/music/____.html

and so on

Thanks

queerfm
03-25-2007, 01:41 AM
can any one help?

boxxertrumps
03-25-2007, 02:05 AM
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Link Change</title>
<script type="text/javascript">
var host = "http://www.queerfm.net/";
var extension = ".html";
function url(element,element2) {
var el = document.getElementById(element);
var value = el.value;
var el2 = document.getElementById(element2);
var value2 = el2.value;
window.open(host+value2+value+extension,"window");
}
</script>
</head>
<body>
<input id="page" type="text">
<select id="dir">
<option value="music/">Music</option>
<option value="contacts/">contacts</option>
</select>
<br><input value="Enter" onclick="url('page','dir');" type="button">
</body>
</html>

Oh Yes, It Works! (I am extatic.)