Jump to content
Fórum Script Brasil
  • 0
Sign in to follow this  
GiVeNs

Pegando Valor Da Janela Popup

Question

ae galera, eu tenho um formulario com um campo data, do lado dele tenho uma imagem q é um link para um POPUP onde eu mostro o calendario do mes corrente... ate ai tudo bem... eu queria saber se tem como eu fazer q quando o usuario clicar em um dia retornar para a pagina principal no campo data o dia que ele escolheu?

não sei se fui claro, qualquer coisa só pedir q eu tento explicar de novo...

valeu!

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

[examplejs1.html]

<HTML><HEAD></HEAD>

<script LANGUAGE="JavaScript"><!--

function openChild(file,window) {

    childWindow=open(file,window,'resizable=no,width=200,height=400');

    if (childWindow.opener == null) childWindow.opener = self;

    }

//--></SCRIPT>

<BODY>

<FORM NAME="parentForm">

<INPUT TYPE="button" VALUE="Open child" onClick="openChild('examplejs2.html','win2')">

<BR><INPUT NAME="pf1" TYPE="TEXT" VALUE="">

<BR><INPUT NAME="pf2" TYPE="TEXT" VALUE="">

</FORM></BODY></HTML>

[examplejs2.html]

<HTML><HEAD>

<script LANGUAGE="JavaScript"><!--

function updateParent() {

    opener.document.parentForm.pf1.value = document.childForm.cf1.value;

    opener.document.parentForm.pf2.value = document.childForm.cf2.value;

    self.close();

    return false;

}

//--></SCRIPT>

</HEAD><BODY>

<FORM NAME="childForm" onSubmit="return updateParent();">

<BR><INPUT NAME="cf1" TYPE="TEXT" VALUE="">

<BR><INPUT NAME="cf2" TYPE="TEXT" VALUE="">

<BR><INPUT TYPE="SUBMIT" VALUE="Update parent">

</FORM></BODY></HTML>

Edited by fercosmig

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  



  • Forum Statistics

    • Total Topics
      148380
    • Total Posts
      643761
×
×
  • Create New...