|
#1
|
|||
|
|||
|
Hey guys,
I can't find this code in DD, it used to be there. It was just a textfield with a button. So you could enter url of a site in that textfield click go and the page would open in the other frame. I need some help on this. viktor ps. anyone knows any simple codes for random ads? |
|
#2
|
||||
|
||||
|
I think it's
HTML Code:
<form name="form_url" method="post" onsubmit="document.frames['frame_name'].location = this.form.elements['url'].value"> <label>Url: <input name="url" type="text" id="url" size="100"> </label> <label> <input name="go" type="submit" id="go" value="Go"> </label> </form>
__________________
Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM. Currently: enjoying the early holidays :)Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide |
|
#3
|
||||
|
||||
|
Probably, you mean:
Code:
<form method="post" onsubmit="window.frames['frame_name'].location.href = this.elements['url'].value">
<label>Url:
<input name="url" type="text" size="100">
</label>
<label>
<input name="go" type="submit" value="Go">
</label>
</form>
__________________
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP! |
|
#4
|
|||
|
|||
|
its not working, when I click Go nothing happens.
|
|
#5
|
|||
|
|||
|
can anyone help please?
|
|
#6
|
||||
|
||||
|
Huh? Twey gave you the code. ^^^^^
__________________
Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM. Currently: enjoying the early holidays :)Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide |
|
#7
|
||||
|
||||
|
Ah, sorry, I failed to return false:
Code:
<form onsubmit="window.frames['frame_name'].location.href = this.elements['url'].value; return false;">
<label>Url:
<input name="url" type="text" size="100">
</label>
<label>
<input name="go" type="submit" value="Go">
</label>
</form>
__________________
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP! |
|
#8
|
|||
|
|||
|
Quote:
Hey, thanks for trying but it wouldn't work. =/ However, I found the code that I was talking about. It works, but now I can't figure out how to open it inside my frame. I tried putting target attribute everywhere inside form but no luck. I think it has to be inside JS code somewhere. Can anyone help me out on this? Code:
<form name="jumpurl1" onSubmit="return jumpit()">
<input type="text" size=30 name="jumpurl2" value="http://">
<input type="button" value="Go!" onClick="jumpit()">
</form>
<script>
function jumpit(){
window.location=document.jumpurl1.jumpurl2.value
return false
}
</script>
v1k |
|
#9
|
||||
|
||||
|
That's not a good code.
See where "frame_name" is? Replace it with your frame name and see if that helps.
__________________
Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM. Currently: enjoying the early holidays :)Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide |
|
#10
|
|||
|
|||
|
Quote:
I was talking about the second code, it has nothing for frame name. The one that uses jumpit function. viktor |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
|
|