Jul 25, 2008

Window.opener

Free Web Hosting, No Ads > CONTRIBUTE > Computers > Programming Languages > Java, Java Servlets, Java Script, & JSP

free web hosting

Window.opener

kvarnerexpress
worked on a simple window.opner() and it worked fine like this.

CODE

function popupwindow()
{
var window_open = window.open('childwindow.html','venderfindwindow','width=1000,height=700');
}
</script>
<form name="productCode">
<input type="text" name="Vender1" id="Vender1" width="45">
<input type="button" value="Find" onClick=popupwindow(); return false;")
</form>





CODE

<form name="vederlookup">
<input type="text" value="" name="Vender1" size="5"></td></tr>
<a href="javascript: doStuff('this');">close</a>
</form>
function doStuff(findItem){ window.opener.document.getElementById('Vender1').value=findItem;
window.close();
}



The above worked as expected. However, when I change the second file like this it does not close the window or communicate to the parent window. I wonder what am I doing wrong?


CODE

<form name="venderlookup">
<input name="searchtext" value=""><input type="submit" value="Search" onClick='goSearch()';>  
</form>
<script language="JavaScript">
function goSearch() {
document.write("hello world!");
document.write('<form name="form1">');    
document.write('<a href="javascript: doStuff("this");">close</a>');
document.write('</form>');
}




The last example does not close the window. Could you do like this" document.write('<a href="javascript: doStuff("this");">close</a>');"

Also, when I call my function goSearch() it takes removes the form from the screen and just shows the output of the function. Is it possible to continue to view the form without using frames?

Notice from snlildude87:
Use code BBCode tags

 

 

 


Reply

electriic ink
Because, of your use of " and '

<a href="javascript: doStuff("this");">

It should be:

<a href="javascript: doStuff('this');">

Your using the speech marks in the command 2 times so html will close the command when it sees the speech marks again. So it sees what your trying to do as this:

<a href="javascript: doStuff("this");">

The part in red is how it sees your link. The other part in blue it sees as stuff it doesn't need so it springs up a code error and doesn't work. Understand?

Right, now you want to write it in javascript and you want to use 3 types of speech marks for that but you only have 2 (' and ").

So you need to write it like this:

document.write("<a href=\"javascript: doStuff('this');\">");

I've added red marks where the key is the backslash. This is javascript 3rd speech mark only to be used inside document.write() and is the the answer to your worries!

 

 

 


Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Recent Queries:-
  1. javascript window.opener. hyperlin value - 17.63 hr back. (1)
  2. javascript window.opener set hidden inputs - 42.10 hr back. (2)
  3. window.opner - javascript - 42.74 hr back. (1)
  4. window.opener.set - 64.25 hr back. (1)
  5. window.opner - 93.94 hr back. (1)
  6. javascript window.opener - 100.54 hr back. (1)
  7. javascript use variable with window.opener - 100.68 hr back. (1)
  8. javascript window.opener set value - 160.00 hr back. (1)
Similar Topics

Keywords : window, opener

  1. Opening Hyperlink In New Window Using Xhtml 1.0 Strict
    (5)
  2. Window Shortcut
    Let's play with keyboard. (0)
    Do you use the mouse for all commands and functions ? You should know better. Studies indicates that
    productivity decrease when you shift between the keyboard and the mouse to input data. So learn the
    shortcuts,familiarise yourself with your keyboard, increase productivity, and show all those guys
    their right place. While Windows comes with a lot of default shortcuts which simplify tasks like
    searching and opening windows applications. Windows Shortcuts - Have you ever played arround with
    the windows key on your keyboard ? That's the small key between the Alt an....
  3. Open Any Unknown File Type With Notepad
    Make Notepad as default file opener (0)
    Open Any Unknown File with Notepad
    ************************************************************************ DISCLAIMER: The
    following contains registry edits. If done improperly can cause strange behaviour, and at worst,
    could even entirely corrupt your Windows Installation, requiring you to reinstall Windows. I cannot
    be held for any damage you may cause to your system as a result of taking any action suggested in
    the following article. ************************************************************************
    Target OS: Windows XP Introduction....
  4. Technology Identifies Invisible Intruders On Wireless Lans
    System is a window into an invisible world (0)
    What do you think of wireless. It's secure? , safey ? , or not !! When using wireless
    every day every where. The security issues still the bigger problems that many users faced today.
    What do think if a system could detected that some intruders were entered your network like the
    wired one. Is it good enough ? Now it's may be the time !! Take a look of this article
    may be you will know more. URL : http://www.computerworld.com.au/index.php/...62;fp;16;fpid;1 ....
  5. Remote Desktop Connection
    How to set up remote desktop connection on Window (7)
    Hi, Last term, I presented my presentation to my supervisor every day with Remote Desktop
    Connection. I did not need to bring my laptop from my hostel to campus, campus to hostel. It is very
    convenient for me. So, I would like to share my knowledge to you. It is also good when you are away
    from your computer, you can still access your computer from the distance. For example, if you were
    in Italy and studied there, you should not need to bring your computer, but you could manage your
    computer. It is very simple and very easy. I would like to explain with pictures. There....
  6. Php An Js Window.open Pages Trouble.
    I need a way to set hidden input values to the new window. (3)
    I have 2 main pages Page A(events_locked.php) and Page B(add_attendance.php). Both are php files.
    Page A takes a post var from another page(not Page B ) and then used to query for displaying records
    in a mysql datase. This variable has set as a session variable because there is 1 <script
    LANGUAGE="JavaScript"> window.name="main_index"; function openFormWindow() {
    OpenWindow=window.open("add_attendance.php", "newwin", "height=250,
    width=400,toolbar=no,scrollbars=no,menubar=no,location=no,resizable=no"); var x =
    getElementByName("form1"); x.target="newwin"; x.s....
  7. Window Xp Registry Tweaks
    (0)
    Window XP registry tweaks How to show password in Dialup window As you know Windows XP hides
    passwords in dialup popup window, to show password in Dialup window: 1- Click start menu > click on
    Run and type "regedit" to run Windows Registry Editor. 2- Go to following address: CODE
    HKEY_LOCAL_MACHINE-SYSTEM—CurrentControlSet- Modify Services--RasMan—Parameters 3- Create a new
    DWORD entry, name it as DisableSavePassword. Give it value of 1. How to display Windows Built in
    number on desktop To display Windows Built in number on desktop do following: 1- Click s....
  8. Window Media Player License.
    having trouble with it. (1)
    Hey friends i m having trouble with some window media audio formats. when i try to play them it says
    download media player security license. i tried to download but it says url not found. Plz can
    some body help me? and i don't think that microsoft has designed this for some purpose! It
    is useless.. i'll must say that it is just a way to tease you. what do u think that microsoft
    should remove this feature?....
  9. Window Crystal
    Upgrade Graphics, new out look like vista (1)
    Hi, i am using new update windows Crystal, that have amazing graphics, QUOTE This no-frills
    program lets you adjust the transparency of open windows, but don't expect anything
    awe-inspiring. Crystal XP's comprehensive interface is reminiscent of Windows and offers its
    configurations in English and Dutch. The program lets you set the transparency of active and
    inactive windows along with that of your taskbar. Hot keys can be assigned to adjust window
    transparencies without opening the program's interface. It sits in your system tray at start-up,
    and you c....
  10. How To Restore Show Desktop Icon
    in Window XP (3)
    How to restore Show Desktop icon in Windows XP Show Desktop is an icon in the quick lunch that
    lets you minimize all open windows quickly. If you delete Show Desktop icon casually, you cannot
    restore it as usual. To restore Show Desktop icon do following; Open Notepad and copy/paste
    following code: CODE [Shell] Command=2 IconFile=explorer.exe,3 [Taskbar]
    Command=ToggleDesktop And finally save above file as Show Desktop.scf in the following address:
    QUOTE C:\ Document and Settings \ Username \ Application Data \ Micr....
  11. Window Defender Vs Spy Sweeper
    (11)
    Since I found there are many topics discussing about Window Defender and Spy Sweeper , which is
    better (Those topics not at Trap17). I need your idea , I am going to install one of those best
    security softwares but I don't really know which is better. Window Defender is free but I heard
    that it is weaker than Spy Sweeper . Thank you , please help me out /smile.gif"
    style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />....
  12. Autosizer 1.61
    automatically resizes any window specific (4)
    AutoSizer 1.61 This is the program that automatically resize your program specific.For example,some
    browsers doesn't open in the maximized window.Using this program you can set these windows to
    maximize every time when they open automatically.This program work with a lot other program like
    Notepad, web browser,etc.This program stays at tray while you are working. QUOTE AutoSizer
    automatically resizes any window you specify. For instance, some web browsers open up in a
    non-maximized window. Using AutoSizer, you can set those windows to automatically maximize eve....
  13. Width Of Display Area Of Browser Window
    is there a formula? (6)
    I am making a table in a website that's as big as the display area of the browser for instance:
    CODE <Table border=0 cellpadding=0 cellspacing=0 width=?? align=center> .... .....
    </table> How do I know the width of the browser display area? Better yet, is there a
    general formula for that for other screen resolutions? I know a little bit of javascript, are
    there functions for that?....
  14. Windows Vista Gui Vs Window Xp Gui
    (17)
    Hi, We have been seeing Windows Vista Screenshots and from that we can take a look at the new GUI
    for Windows. Its called Aero. But i believe it looks more like Linux. Dont you think so. Now the
    Windows GUI is no longer unique. The are back with same GUI that other Operating Systems Already
    have and Also just take a look at the icons. They are not good at all. Any information about Windows
    GUI or you views on it. Please Reply Thank You....
  15. Rose Colored Window
    Figured i'd pick a random place to post this, Wanted a Second Opin (2)
    Pink skies over my head raining down the thoughts of giving in, And as the wind changes the house
    upon the hill stays the same, Where the sun has gone I dont know but im feel it's far away, or
    has the sun turned to the moon never to shine its rays on my face again, Rose Mary Sugar Coated
    Glass Hiding the Truth About Our Past, And Up Ahead You Find Yourself Painting The Windows With A
    Brush, With Hate He Screams It's All A Lie, Ignorance Is Bless, It's A Lie, No, We Are Ready
    Follow Me We'll Crush The Windows and We'll See. He seems to wonder if the ....
  16. Maintaining Browser Size On Your Computer
    browser window size defined by you (4)
    I have the darnest time while navigating the internet these days. Has this happen to you? You visit
    a site for your research and enter a site that causes multiple browsers to open (but in different
    size). But your prefered browser size is not full but a certain size (probably you made it such wide
    and sich high). Or, you test your website for different resolutions. But the last browser window you
    closed caused your new browsers to open in different sizes... ack! My computer screens are
    either in 1280x1024 or widescreen mode. And thus i want my browser to be in fixed....
  17. Whats Problem With My Window
    (7)
    Here is mine a big problem with a little solution, which may be suggested by you :... When
    ever i get instaaled windows xp , it works very nice unless i not use my internet connection... the
    problem that i got with my window is that , when i am using mine net , with in 2 to three minutes i
    got an error message as: " Restart Windows" with a time limit of 1:00 minute. And the worst is that
    that error window can't be closed ' so i have to last all mine important work..Some one told
    me to "enable" the firewall of mine internet connection , i tried it but in va....
  18. Free Windows Color-grab / Window Capture Tool
    (2)
    It isn't just a zoom tool. I wrote it - if you need to copy colors (in many formats like HTML
    with or without the "#", photoshop, vb, c++, delphi, etc), or capture window screenshots, this is
    the free tool for you. http://freewareutils.frih.net/ZoomTool/ZoomTool_1_4.html I've had the
    program certified as 100% safe to download, install, etc. Check out awards / certifications here:
    http://freewareutils.frih.net/ZoomTool/Awards_Certs.htm . Just helping to spread some free
    tools........
  19. Language Pack For Window Xp ?
    (3)
    I have a friend that wants to install a korean language pack on your window xp. She wants everything
    to be in korean (like a korean version of window xp). I searched on microsoft.com and found the
    Multilingual User Interface. Which i believe you have to buy them separately. Does anyone know how
    to upgrade a english version of window xp to a korean version of window xp?.... Is it even possible
    to do that or do you have to purchase a korean version of window xp..... PS. I'm not looking
    for language packs that only let you type in different language packs.......
  20. Refresh Main Window By Clicking Link In Popup?
    (2)
    This is another refresh problem question. The project I'm doing uses tons of frames (I know,
    some of you will probably advise me not to use frames) and I'm having problems with refreshing
    the target frames. The problem is, I have a main page (main.html) that is a popup (so that I
    don't see the address bar and the other toolbar bits in my browser) and there are links in that
    page that when clicked also pops up a page. What I don't know is how to refresh the main page
    using a link in the other popup page. I've tried using this but this only works f....
  21. Seeking 3 Dimensional Interface
    about window showing (6)
    hey ,do me a favor that i am seeking a software now. there has been a software called MaDotate which
    can show a 3D window but not very ripe till now /sad.gif' border='0' style='vertical-align:middle'
    alt='sad.gif' /> like vista below...do you know some software which can simulate the style when a
    window showing.often we can use xpstyle or windowbinds to beautify or theme.although those software
    is run much memory,i do wanna have a try /smile.gif' border='0' style='vertical-align:middle'
    alt='smile.gif' /> Topic title is very important. Make it count! ....
  22. Any Good & Free Website Builders For Window Or Mac
    (7)
    hey you guys, i have been trying out some different programs, and trying to see which one is the
    best. so do you guys know any good and FREE, website building and desinging programs for mac or
    windows. thanks , i appreciate you help....
  23. Window Mover
    (6)
    The little man moves your window. ROFl.. awesome. http://www.lebonze.com/stuff/move.htm edit:
    make your windows small.. doesn't work if it's maximized XD....
  24. Remove Window Animation
    (1)
    make your computer run a little faster. You can shut off the animation displayed when you minimize
    and maximize Windows. 1. Open RegEdit 2. Go to HKEY_CURRENT_USER\Control panel
    \Desktop\WindowMetrics 3. Create a new string value "MinAnimate". 4. Set the value data of
    0 for Off or 1 for On this should put less stress on your graphics card if you have an older
    computer.....
  25. Javascript Close Window
    Javascript close window (12)
    Hi does anyone have a code to close the browser window. This code needs to be used to close an
    actual full sized window, not a pop-up window.....
  26. How To Reference Parent Browser Window From.....
    (2)
    i have a custom button on the local browser toolbar which points to a local html application (HTA).
    the browser launches the HTA when the custom button is clicked. i have to reference the parent
    browser window from the child HTA window. an instruction in the local HTA window.opener sets or
    retrieves a reference to the window (the browser) that created the current window (the HTA).
    however, window.opener is returning null. the HTA is run under the mshta.exe process. how do i
    reference the browser from the HTA or javascript? i have winxp sp2 with ie6.0 kvarnerexpress....
  27. Window Media Player Or Winamp?
    Which one you like? (34)
    Window Media Player or Winamp? Which one do you like? Reason. I like Both though I use Window Media
    Player to play movie instead of using it to listen to music. Window Media Player I use it when that
    I watch anime then having a codec attach to it. It is easier to watch it through Window Media
    Player. Winamp, I used it to play songs. It is easy to use and simple. You can have a movie on
    Winamp too but it is a bit hard (for me) to use through Winamp and play the movie. When you play
    songs you have adjust a sound too, or tune it.....
  28. Photoshop Registration
    concerning the pop-up window (6)
    hey, when you start installing photoshop, does the registration window pop up at the beginning ? or
    it doesn't come out until your 30 day trial is over? because i've reformatted my comp like 3
    times and i have ps on te cd saved but whenever i try to install it it never asks me to register
    it... also which is better? PHOTOSHOP cs OR PHOTOSHOP the newer version? and will the brushes for
    ps8 work on the newer one? thank you!....
  29. [help] Java Script: Window.open
    Works with Firefox, not IE (8)
    CODE <HEAD> var popUpWin=0; function popUpWindow(URLStr) {
     if(popUpWin)  {    if(!popUpWin.closed) popUpWin.close();  }
     popUpWin = open(URLStr, 'GunBound Tactics: Screenshots',
    'width=820,height=550,menubar=no,resizable=yes,scrollbars=yes,toolbar=no,top=90,left=90')
    ;; } </HEAD> <BODY> <a
    href="javascript:popUpWindow('/f11/clipped.php');"><b>Clips&
    #60;/b></a> This is a script for opening a new window. It works ....
  30. Interesting Google Search Window
    come in... (11)
    it is just a Chromatic Eggs Style For Google...lol usually you search something in google by
    visiting www.google.com.it is a popular and usual window in google site,which we use
    continually.recently my friend told me another kind of style for google,in which added a flash a
    lovely rabbit catchs balloons with some letter G,O,O,G,L and E on.lol: you should have a try in G
    o o g l e now /biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif' /> ....

    1. Looking for window, opener

Searching Video's for window, opener
Similar
Opening
Hyperlink In
New Window
Using Xhtml
1.0 Strict
Window
Shortcut -
Let's
play with
keyboard.
Open Any
Unknown File
Type With
Notepad -
Make Notepad
as default
file opener
Technology
Identifies
Invisible
Intruders On
Wireless
Lans -
System is a
window into
an invisible
world
Remote
Desktop
Connection -
How to set
up remote
desktop
connection
on Window
Php An Js
Window.open
Pages
Trouble. - I
need a way
to set
hidden input
values to
the new
window.
Window Xp
Registry
Tweaks
Window Media
Player
License. -
having
trouble with
it.
Window
Crystal -
Upgrade
Graphics,
new out look
like vista
How To
Restore Show
Desktop Icon
- in Window
XP
Window
Defender Vs
Spy Sweeper
Autosizer
1.61 -
automaticall
y resizes
any window
specific
Width Of
Display Area
Of Browser
Window - is
there a
formula?
Windows
Vista Gui Vs
Window Xp
Gui
Rose Colored
Window -
Figured
i'd pick
a random
place to
post this,
Wanted a
Second Opin
Maintaining
Browser Size
On Your
Computer -
browser
window size
defined by
you
Whats
Problem With
My Window
Free Windows
Color-grab /
Window
Capture Tool
Language
Pack For
Window Xp ?
Refresh Main
Window By
Clicking
Link In
Popup?
Seeking 3
Dimensional
Interface -
about window
showing
Any Good
& Free
Website
Builders For
Window Or
Mac
Window Mover
Remove
Window
Animation
Javascript
Close Window
- Javascript
close window
How To
Reference
Parent
Browser
Window
From.....
Window Media
Player Or
Winamp? -
Which one
you like?
Photoshop
Registration
- concerning
the pop-up
window
[help] Java
Script:
Window.open
- Works with
Firefox, not
IE
Interesting
Google
Search
Window -
come in...
advertisement



Window.opener



 

 

 

 

ADD REPLY / Got an Opinion! Remove these ADs! RAPID SEARCH! Free Web Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE