FRIHOSTFORUMSSEARCHFAQTOSBLOGSCOMPETITIONS
You are invited to Log in or Register a free Frihost Account!


location of frame





alalex
how can i change the location of a frame with a textbox?
I tried this, but it doesn't work...
Code:
function open_web(){
   if(content.value !== 'Open page...'){
      document.frames[1].href = content.value;
   }
}

The textbox is called content, and the button open.
Then I put in the button onClick(open_web()).
ock1991
You cant call to Input fields like that. input fields have to be in a named form (<form name=X>), and call using

Code:
FORMNAME.INPUTNAME.value


for example,

Code:
<form name=hex><input name=content></form>


your call to its value would be hex.content.value
alalex
thanks,
and to refer to the location of the frame?? any idea?
Related topics
Windows Tips&tricks!
Transport yourself over the Net
Header("Location: PROBLEM");
frame stuff
Ok, I'm getting there!?
Where are you?? (map your location)
Jokes!! Jokes!! Jokes!!
Getting acceptes by Fri Host
Need to restore phpBB backup made by Fantastico
[JS] get vars in location.pathname
some help scripting cgi
[JS] onclick to print out info
[resolved] Linking Problem
Shadow of The Colossus - video game
Reply to topic    Frihost Forum Index -> Scripting -> Html, CSS and Javascript

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.