Ask Question Forum:
Model Library:2025-02-08:A.I. model is online auto reply
C
O
M
P
U
T
E
R
2
8
Show
#
ASK
RECENT
←
- Underline
- Bold
- Italic
- Indent
- Step
- Bullet
- Quote
- Cut
- Copy
- Paste
- Table
- Spelling
- Find & Replace
- Undo
- Redo
- Link
- Attach
- Clear
- Code
Below area will not be traslated by Google,you can input code or other languages
Hint:If find spelling error, You need to correct it,1 by 1 or ignore it (code area won't be checked).
X-position of the mouse cursor
Y-position of the mouse cursor
Y-position of the mouse cursor
Testcursor
caretPos
Attachment:===
Asked by duncanb7
at 2024-11-15 04:14:53
Point:250 Replies:2 POST_ID:828425USER_ID:11059
Topic:
JavaScript;;Hypertext Markup Language (HTML)
I have one simple question that is I have two frame, one frame is with inputbox
and second frame is my redirect URL webpage and I set its default URL like www.yahoo.com
and second frame will redirect to my targe URL after I input correct value or address name in the inputbox
The question is after I redirect to my tagerat second frame URL like www.experts-exhange.com successfully
but I can NOT go back to my default page,www.yahoo.com when clicking refresh button right next to IE window address bar OR even I click adress bar and enter again, and the second frame webpage is still stay on www.expert-exchange.com. Why ?
As I know, when click the refresh button, it will go back to www.mywebiste.com/index.html
since URL in address bar at IE is still http://www.mywebsite.com and no change at all
and second frame in my index.html will should go back to its default URL, www.yahoo.com
Is it related to refresh,reload , onload issue ? Please advise and attach simple index.html code
and second frame is my redirect URL webpage and I set its default URL like www.yahoo.com
and second frame will redirect to my targe URL after I input correct value or address name in the inputbox
The question is after I redirect to my tagerat second frame URL like www.experts-exhange.com successfully
but I can NOT go back to my default page,www.yahoo.com when clicking refresh button right next to IE window address bar OR even I click adress bar and enter again, and the second frame webpage is still stay on www.expert-exchange.com. Why ?
As I know, when click the refresh button, it will go back to www.mywebiste.com/index.html
since URL in address bar at IE is still http://www.mywebsite.com and no change at all
and second frame in my index.html will should go back to its default URL, www.yahoo.com
Is it related to refresh,reload , onload issue ? Please advise and attach simple index.html code
**********www.mywebiste.com/index.html<html><frameset rows="135,*" cols="*"><frame id="inputFrame" name="inputFrame" frameborder="no" scrolling="NO" src="/inputboxframe.html"><frame name="secondFrame" marginwidth=0 marginheight=0 src="http://www.yahoo.com" frameborder="no" ></frameset></html>******Inputboxframe.Html<html><script type="text/javascript">function checkEnter(e, el,fn) { var key=e.keyCode || e.which; if (key==13){ fn();el.value='';return false; } return true;}function formSubmit() {var my_val = document.getElementById('text1').value;parent.secondFrame.document.location.href="http://www."+ my_val + ".com ";}<script type="text/javascript"><body><input id="text1" value='' onclick="this.value=''; this.className='highlighted'" onblur="if(this.value=='')this.value=this.defaultValue; this.className=''"onkeydown="return checkEnter(event, this,formSubmit);" ><input type="button" value="submit" onclick="formSubmit();" /></body></html> 1:2:3:4:5:6:7:8:9:10:11:12:13:14:15:16:17:18:19:20:21:22:23:24:25:26:27:28:29:30:31:
Author: duncanb7 replied at 2024-11-15 07:40:55
I change to onload="dothis"
to noload="dothis();"
it works finally
Thanks for your help
Duncan
Accepted Solution
Expert: Proculopsis replied at 2024-11-15 05:03:05
250 points EXCELLENT
In you input frame have an onload event that will force secondFrame to load your initial web site.
Something like:
<body onload="doThis">function doThis(){ parent.secondFrame.document.location.replace( "http://w3c.org" );} 1:2:3:4:5:6: