JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 8th, 2000, 09:43 PM
PrimalFear PrimalFear is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2000
Posts: 8 PrimalFear User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Hi guys I have a problem(again)

I have 3 .html files:

1. creates 2 vertical frames
2. creates 2 horizontal frames in the right frame of 1.
3. creates 2 vertical frames in the bottom frame of 2.

Now In the document of frame 2a I want to create a textbox and button where the user can type in a url and by pressing on the button the requested url will load in the frame. I tried this:

</script>
<SCRIPT LANGUAGE="JavaScript">
function testResults (form) {
var TestVar = form.textfield.value;
parent.frame2B.Frame3B.src=TestVar;
}
</SCRIPT>

and in the body:

<form name="a" method="get" action="" Target="main">
<input type="text" Value="http://www.yahoo.com" name="textfield" size=50>
<input type="submit" name="Submit" value="go" onClick="testResults(this.form)" >
</form>

But this doesn't work. I tried everything I could think of, and looked everywhere, so If any of you could help me, I'd be much obliged. Thanks

Primal Fear

Reply With Quote
  #2  
Old June 9th, 2000, 02:06 AM
Spookster Spookster is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 1999
Posts: 84 Spookster User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
Well first of all your form isnt going to work the way you have it and id modify the script a bit too.

Try this instead:

<script language="JavaScript">
function go(){
URL = document.myForm.theURL.value;
parent.framename.location=URL;
}
</script>

Just change "framename" to the name of the frame you are trying to load this in.

<form name="myForm">
<input type="text" name="theURL" size="50">
<input type="button" value="Go" onClick="go()">
</form>


That should work.

Spookster

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignJavaScript Development > Loading a new document in a frame using javascript


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway