Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Iframe to open a browser with input

Status
Not open for further replies.

hapsmack

Programmer
Feb 6, 2006
19
US
Hey guys,

I am trying to get a input from a user in a textbox which redirects to a .aspx page in which i want it to open a iframe in which i open a address such as "
Instead of userinput I want it to put the textbox input there. I am passing the textbox value using the GET method

I am using the following iframe code:
<IFRAME SRC=" FRAMEBORDER="0" SCROLLING="auto" WIDTH="446" HEIGHT="120" TITLE="Test">
Test </IFRAME>

Is there anyway I can use something like src=" ?

Do I need to use VB script somehow using if statements and build a string?

I am fairly new to dreamweaver, any help would be greatly appreciated :)
 
Use javascript to redirect. Just add an onClick action to your submit button that appends the value of your text box to the redirect. Something like..
Code:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<script type="text/javascript">
<!--
function myRedirect(){
myNewPage = "[URL unfurl="true"]http://www.anywebsite.com/images/"[/URL]
myNewPage = myNewPage + document.forms.form1.textbox1.value
myNewPage = myNewPage + ".apsx"
window.location = myNewPage
}
//-->
</script>
</head>

<body>
<form name="form1" method="post" action="">
  <p>
    <textarea name="textbox1" id="textbox1"></textarea>
</p>
  <p>
    <input type="button" name="Button" value="Button" onClick="javascript:myRedirect()">
</p>
</form>
</body>
</html>

Untested so you may wish to have a play

[Peace][Pipe]
 
Hey thanks a lot i actually got it figured out...i had to put the request.querystring(textboxvalue) in the src part of the iframe tag but your code will work too
thanks anyways
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top