|
-
Jul 17th, 2005, 07:54 AM
#1
Thread Starter
Lively Member
adding target=_main
Hi
i wrote a code like this:
var text=document.form1.T1.value
document.location.href="http:///www.blabla/search?fr="+text
the link is open in a other window. i want to open in the main window.
generaly i put target=_main.
but in here it's making error.
what the solution plz??
thanks
-
Jul 18th, 2005, 05:16 AM
#2
Addicted Member
Re: adding target=_main
hi,
if you want to open in the same window then use document.location.href or location.href.
if you want to open in the parent window then use document.parent.location.href = ""., if the subwindow is opened from main.
if you specifically want to open in a window then you have to use window.open(). its window.open(url, windowname, [options]). ex., window.open("www.test123.com", "Test_Window");
so in your case i think window.open will help. you have to give the main windows name in the window.open().
--Kishore...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|