Passing A Reference To The Popup Window

Nov 23, 2005

Is there a way, I could pass the reference to a pop up window to
another function?

Basically, this is what I want to
var win= window.open("x.htm".....)

SetValue(win,"txtName");

//-------------------------------------------
function SetValue (win, ctlID)
{
var obj=win.getElementByID(ctlID);
ctlID.value="Hi";
}

View 1 Replies


ADVERTISEMENT

Get Reference To A Possible Popup Window

Jan 4, 2006

Since a few years I make use of an online service which provides me
statistics about visits to my web site. The only thing I have to do is
to include a few lines of Javascript in the most important page. The
company providing this service - Nedstat - has been acquired by a more
commercial party called Webstats4U and they have now decided to cause a
popup window to appear with a commercial message, every new day you
start up the page. Given the nature of the web page, this is
unacceptable. Does anybody know how to check whether a window has been
opened from a page and - if so - how to get a reference to that popup
window so that I can close it?

View 1 Replies View Related

How To Reference Original Window From Popup?

Nov 20, 2003

I have a webpage with a link that produces a popup using javascript. I have another link in the popup. When the popup link is clicked I want only the original window to change location, while the popup remains the same. How can this be done?

View 6 Replies View Related

Way Of Passing Variable From Parent Window To Popup Window

Jun 27, 2002

I need the most efficient way of passing a variable from a parent window to a popup window.The reason i say "most efficient" is because i currently do it like this from the parent:[code]But this is inefficient because at times it randomly alerts "undefinded".Anyways, can someone tell me a more fail safe way to pass a var to a popup so that i will be able to access it 100% correctly.

View 1 Replies View Related

Passing Variables To A Popup Window

Aug 31, 2005

<a href="view_details.php"
onClick="window.open('view_details.php?id=<?=$row['id'];?>&sname=<?=$row['sname'];?>')">
details</a>


Have got this so far but need to get the width and height set. Cannot seem
to get he syntax right.

View 1 Replies View Related

Passing Variables To Popup Window?

Feb 28, 2009

I want to pass variables to pop up window.How can i do this.

The code to pop up new window is as follows

<td id="add" bgcolor="#FFFFFF" width="80" height="16" onMouseOver="this.style.backgroundColor='#EFEFEF'" onMouseOut="this.style.backgroundColor='#FFFFFF'"> <a href="http://172.16.0.145/zm/index.php?view=monitor "

[Code].....

basically i want to pass values of "xcoord" and "ycoord" to pop up window.

View 1 Replies View Related

Passing Value From Popup To Parent Window

Jul 1, 2009

All three values are received at the JavaScript function. Have problems in translating and passing it to the parent. Trying to do the following from popup

<a href="#" onclick="javascript: post_value('<%=key%>', '<%=val%>', '<%=callingElement%>');"></a>
function post_value(partNumber, partDesc, callingElement){
opener.document.caseLineupDetailForm[productNum[callingElement]].value = partNumber.replace(/`/g, "'");
self.close();
}
[Code]....

View 1 Replies View Related

Passing Parameter To A Popup Window Without Using Querystring

Jul 20, 2005

I have a search page im asp.net. the user enter the criterias in
textboxes and dropdownlists and on submit i want the results to be
displayed in a popup window.

so the easy way is to pass the criterias in a querystring to the new
window. but if it's possible i don't want to use query string.

in asp, i could use the folowing:
i open a temporary blank window, on load I take the values of the search
page using the window.opener and submit them to the server.
Unfortunately this can't be done in asp.net coz window.opener isn't
working.

so is there a way to do that ? or the only way is to pass the parameters
in a querystring ?

View 3 Replies View Related

Passing Values From Popup Window To The Many Page

Dec 30, 2007

Suppose that I have a main page with a link that opens a popup window which has a link with a parameter and I want to pass the parameter to a text input in the main page,
how to do that?

View 2 Replies View Related

Passing Variables From A Popup To Main Window

Jul 24, 2004

I have two PHP scripts. The popup script (calendar.php) is linked from the main navigation of the website. When it is clicked, the calendar popups up and the dates are linked. For example; the 24th July 2004 would read: events.php?day=24&month=7&year=2004

However, I require this information to be passed back to the MAIN window so that it can be displayed in a full screen.

View 6 Replies View Related

Passing Object By Reference?

Jan 3, 2011

My question is commented in the script:

function Love(){
var req = {
ring : 'gold',

[Code]...

console.log(details.ring); // why does this return gold and not silver if req is passed by reference and we already changed its value above and so it's pointing to the same memory position?

View 11 Replies View Related

Passing Object Reference As A Parameter?

Apr 1, 2010

I have a function that changes the innerHTML of a DIV element. I want to pass to that function as a parameter a reference to the DIV to be changed. In the example below it works the first time (executed with the body onLoad event). As the subsequent function declaraton is rewritten by the function itself, it can no longer reference the targeted DIV. I tried to pass a string teference and use eval(), but this time it fails the third time it is executed.

Code:
<html>
<head>
<title>Passing Parameters to a Function (with object prameter)</title>
<script type="text/javascript">

[Code].....

View 6 Replies View Related

Passing A Parameter By Reference To An ActiveX Function

Dec 12, 2005

I have develop an ActiveX with Visual C++ 6

And I will call functions on this ActiveX from a javascript.
I know how to instantiate the activex object (with the balise <object>).

But how can I do to call a function of my ActiveX and pass to this function
some parameter by reference.

Here is what I have :
the function in the ActiveX :

void test(long *t, long FAR* nb)
{
t = 3 ;
}

And here is what I try to call this function in javascript:

var myT = 0;
my_control.test(myT); // here is the problem that
alert("T : " + myT);

But I receive the value 0

So how can I do to pass parameter by reference to a function of an ActiveX?
Is there anything to change in my function in the ActiveX?

View 2 Replies View Related

Passing Reference To Form From Non-input Field

May 27, 2004

I have a bunch of forms in my page, and want to pass a reference to the current form to a javascript function - when, say, a user clicks on a particular element. Normally, within any type of input field, I'd just add something like this:

onclick="my_function(this.form)"

Then, in my_function( form ) I could refer to form. No worries.

But here's the interesting bit. I also want to run the same function when the user clicks on any <a> tag within a form, like:

<a href="javascript: my_function(this.form)"> ... </a>

Problem is, with this code, the form reference isn't passed to the javascript function. the "this.form" bit doesn't work...

I find this rather curious. So the question is, how do I pass a reference to the current form from within a non input field?

View 5 Replies View Related

Window.open Reference In Url ?

Aug 10, 2010

I'm working on a JSP based project. On myJsp1.jsp, I open a new window using window.open and store reference in a variable myWin like:

From here i submit the form to myJsp2.jsp. In this file, I want the reference myWin to close the opened window. What I'm doing while submitting form is:

I've read that this way JavaScript references can be passed in url.

Now when I do getParameter in myJsp2.jsp as

I get JavaScript error that this winRef do not support the close() property.

View 1 Replies View Related

How To Open A New Window In Firefox And Keep The Reference?

Sep 3, 2007

For an in-house web application (it will only be deployed on Firefox
browsers with JavaScript turned on), I need to open a preview window
(which needs to be a separate window, even if Firefox is set to open
targeted links in new tabs) and be able to change the preview window's
location.href from the opening window, even after a new page is loaded
into that window.

View 4 Replies View Related

Can't Reference Parent Window From Within An Iframe

Feb 27, 2011

I have an iframe that can successfully reference its parent window, using the following code:

var elm = window.parent.document.getElementById('iframesID');

This works flawlessy in all browsers, EXCEPT for some reason, Safari 5 on Mac (Safari 5 on Windows works fine).

After debugging a bit, I found that the script breaks exactly on that line, and alerting the value of window.parent returns undefined. Going nuts! I Googled this specific question way too long and found no responses.

View 3 Replies View Related

Get The Reference Of An Already Opened Child Window?

Jun 3, 2011

In one of my webpage, I have a child window gets opened. How to get the child window's reference in to my javascript and access its elements? I am aware of the method: child = window.open(....) However, I can't use this logic because, I can't change the code of the web page since I am not the developer. So, I want logic to get the reference of an already opened child window.

View 4 Replies View Related

Dynamically Open A Popup Window But Ie8 Blocks It With The Popup Blocker

Jan 22, 2010

I am trying to dynamically open a popup window but ie8 blocks it with the popup blocker. basically within a ajax fuction I have a confirm button and if the user clicks yes it opens a popup window. now I tried it with a javascript function but it got blocked, so I have tried it by creating a form with a button in it and instead of calling the popup function direct I call document.form.button.click and in the form my button has onclick"popup('<? echo url; ?>')" but this also is detected as a unwarranted popup and is blocked.

now I understand that the popup blocker works when a popup is called without user interaction, but allows popups on say button clicks. how can I get the popup to work

View 3 Replies View Related

Opening Popup Window By Avoiding Popup Blocker?

Sep 22, 2010

In my application i use window.showmodaldialog() to pop up a window. When i run it in IE pop up blocker wont blocks the window... But when run it in FireFox pop up blocker will blocks the pop up window.. is there any way to open a window with out blocking(avoiding ) by the pop up blocker?

View 1 Replies View Related

Passing A String To A Popup

Dec 21, 2005

I want to popup a page, but I want to send a string through to the
popup. Then I want to set a multiline Textbox on the popup equal to that
string.

View 2 Replies View Related

Passing Url Vars And Popup?

Jul 22, 2009

This sends variables to the page okay (on a version without the onClick, opening a normal page).

Problem seems when onClick is added: where the # would normally be following the url to open the popup from colors.htm

PHP Code:

if ($row_results['Mcolor']> 2) {echo'<a href="http://www.mysite.com/colors.htm?UsrID='.$row_results['UsrID'].'" class="linebar" onClick="MM_openBrWindow('../s/shades.php','','status=yes,scrollbars=yes,width=620,height=450')">more</a>';} 

Is there always a conflict between javascript and php when sending vars since javascript is client side and php is server side? Is there another way to size the opened page, for instance, on... /shades.php itself? - Only doing the popup for this reason.

Inserted this in head of the destination page; shades.php itself, but not as a function. Might there be a way to activate this when the page loads, without onClick of a button from prior page?:

Code:
<script>
windowresize.To(400, 600);
</script>

View 7 Replies View Related

Passing Variable To Popup

Oct 4, 2006

I've perused the posts on popups and variable and can't seem to get what I need. Can someone take a look at my code and tell me what I'm missing.

I want to open a popup window and provide a variable that I grab from a select list on the main page using javascript. This code works to grab the selected option in the list and open a new page but I want it to do this in a pop up so I can still see the main page.

HTML Code:

View 1 Replies View Related

Passing Variables From One Window To A Newly Opened Window

Jan 3, 2011

Here is the program: [URL] Basically, I want to input a number in the input box, which assigns a number to the variable numval located at document.box1.b1. When clicking on the "new window" button, an alert displays the input box value, then another window opens and displays the integers 1 through 12 and the amount squared.

I would like the new window to obtain the number from the previous window so that the new window will display integers (and their squares) from 1 to the value of numval.

View 3 Replies View Related

Form Opening In The Main Window/ Simeltaneiously Closes Popup Window

Jan 8, 2004

I have a popup window which has the search form in. What I want to do is for the popup window to close once the form is submitted, and to post the form data to a page on the main window.

Is anyone able to advise. As the main page is dynamic, it is not possible to give the page a name.

View 4 Replies View Related

JQuery :: Create A Hidden Form Field In A Parent Window From Within A Child Window - Popup

Jun 13, 2011

Im trying to create a hidden form field in a parent window from within a child window (popup). I am trying to use jQuery, but unfortunately the hidden field does not get created.

Code JavaScript:

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved