Passing Vars From Window To Window

Apr 8, 2002

i have 2 file.. the 1st file have this code :

document.write('<form name="fHtmlEditor" method="GET" action="">');
document.write('<textarea name="EditorValue" style="display: none;">' + editorvalue + '</textarea>');

and there button when onclick will open new window, i need to pass vars from there to the opener window !

<script>window.opener.document.fHtmlEditor.EditorValue.value="dcd";</script>
i got no error and no result !

View 11 Replies


ADVERTISEMENT

Passing Vars To Window.open()?

Feb 23, 2009

I want to pass window size variables to javascript's window.open() function from a flash movie (actionscript) to javascript embedded in an html page. The idea is to generate a pop-up window when the user clicks a button in the flash movie. I've programmed the flash movie button like this:

on (release) {
getURL("javascript:open_win('http://www.mysite.com', winfeatures)"); }

where winfeatures is a string containing the pop-up window options, e.g. width=400,height=300,resizable=1 . I have 'traced' the string to make sure it is formed properly. These variables may change so I don't want to just insert them verbatim as the arguments. They are read from an xml file and made into a string - e.g.

(var winfeatures:String = "width="+myxml.attributes.width+",height="+myxml.attributes.height);

In the html page I have the following javascript:

<SCRIPT LANGUAGE=JavaScript>
function open_win(URLtoOpen, windowFeatures) {
newWindow=window.open(URLtoOpen, "myWin", windowFeatures);
}
</SCRIPT>

but it's not working. It seems the windowFeatures isn't being read (or read properly) and the pop-up opens with a default size.

View 2 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

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 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

AJAX :: Passing POST Vars In IE7/IE8?

Jul 12, 2010

Note: answers along the lines of 'use jquery' or 'use (insert wellknown framework)' is not helpful.Frameworks such as jquery includes alot of extra code which is not nessary at all for what I am doing. 'But, you can include one from Google', yes that may be the case, but I prefer to keep to my own code. With that in mind, lets proceed to the problem.

I have an ajax call which doesn't pass POST vars through on IE7/IE8, but only on odd occasions. It appears to be extremely random and the majority of the time it does work. I am had a look at jquery and cannot see much difference in the way it works compared to this custom one.

[Code]...

View 3 Replies View Related

Passing Vars/multiple Instances?

Aug 27, 2010

I'm building a comment system modeled after Tumblr's, where each post will have it's own comments. I've modded a system from 9lessons and am having an issue implementing it for multiple instances on a page. Each post has its own ID, so I'm trying to set this up using the post's ID. It works fine for a single post, but when there's more than one on a page it doesn't work.

Code Javascript:
<html>
<head>

[code]....

View 3 Replies View Related

Child Window Close Event - Opening Another Link In A Separate Window Using Window.open()

Jan 29, 2010

I have a HTML and I am opening another link in a separate window using window.open() . The child window is something like 'http://yahoo.com' which is out side html. I need to refresh the parent window when the child window is closed.

View 4 Replies View Related

Passing & (ampersand) To A New Window

Nov 22, 2007

Pretty simple, I am sure. I have a small JS script, which is

function OpenSomething(input)
{
win3=window.open("some_file.php?info=" +
input,"mywin","width=500,height=600,scrollbars=yes,resizable=yes");
return false;
}

The problem is that "input" comes from a text box, and can contain
ampersand.

All I need is to replace ampersand with %26, and do the same in PHP
(which I know how to do). But how do I do that in JS?

View 3 Replies View Related

Passing Value In Window.open?

Apr 9, 2009

passing values with url

alert(document.Form1.pid.value )
window.open('test.aspx?id=" + document.Form1.pid.value ','','scrollbars=yes,resizable=yes,width=800,height=400');

i have made this function and want to pass value.

in test page i use

x= request.querystring("id").ToString.Trim but in alert i do getthe value i am not getting any value

View 10 Replies View Related

Passing Variables From One Window To Another

Apr 18, 2005

We have a content management system that requires us to fill in 20 fields for metadata about a page. We store the metadata in a separate database for our records.

I'd like to be able to open a window with the data from our database, click a link, and have it fill in the form in the content management system (hosted by a different organization, so window.opener is out of the equation).

I tried this

<a href="#" onClick="window.open('http://www.google.com', 'Google'); window.Google.f.q.text.value='my name'">Enter my name in Google!</a>

In this example, I'd click a link that would open up Google, then pass the value "my name" to Google's search bar. Unfortunately for me, it didn't work.

Am I asking too much? I'd hate to have to rekey or copy/paste 20 fields worth of metadata each time I create a page.

View 6 Replies View Related

Passing A Window As A Parameter?

May 13, 2011

My WEB site opens an application window and then, from its original window it navigates to a status page.

Code:
var newWindow
function popUpApplication() {
newWindow = window.open(url, parameters...);

[Code]....

Now the problem with this solution is that if the window was closed by the user I will end up with a new pop up window, which I would like to avoid... Unless there is a way to check for window existence prior to attempting to create a new window.

View 1 Replies View Related

Passing Text String To A New Window?

Jul 23, 2005

Would there ever be any problems with the following script depending
on what type of characters are in the text string? I am appending the
value of hidden form field to the query string.

//Assume JavaScript enabled browsers and popups allowed....

View 2 Replies View Related

Open.window() And Passing URL String

Aug 25, 2005

I'm having some problems passing url parameters with an open.window command. I'm not terribly familiar with java script but here is the code below.

When executed it opens the window properly but does not pass the parameter. (this is part of a coldfusion template)

<a href="##"
,'prop1','location,menubar,height=600,width=800,sc rollbars,resizable,toolbar=yes');
return false;"><img src="#trim(photodir)#/#photoname4#" width="90"
height="60" hspace="2" vspace="2" border="2"></a>

View 29 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 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 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 Data From Parent Window?

Nov 13, 2011

I have a script that opens up another window and a task gets executed, all of that is fine, but is there anyway that the parent window (the window that gets open) can pass data to the window that opened it? (I pretty much want to enable a button on that page)

View 4 Replies View Related

Form Passing Data Into New Window?

Mar 29, 2009

Okay, I'm having a really bad day today mentally and can't get my brain to knock this out... *sigh*I've got a simply form with 4 options (radio buttons)Whichever is selected (you can only have 1 choice) is sent to a another html page to report what the data was.2 problems;1) I can't get the information passed to the 2nd page

<script type="text/javascript">
/* <![CDATA[ */
function confirmSubmit()

[code]....

View 1 Replies View Related

Passing Objects To Modal Window?

Aug 24, 2009

I'm trying to pass an object myObjCollection type to a modal window but it throws me an error:

Error: 'myCollection' is undefined

This is the code of my pu.html page:

HTML Code:
<html>
<head><title>Untitled Document</title></head>[code]....

View 1 Replies View Related

Passing Parameters In A Window Statement?

Dec 31, 2009

I am trying to grab firstname from the previous form page and pass it into my open window command.

<script type="text/javascript">
{
window.open("https://www.MyWebsite.com/Myform.html?firstname=getQueryStringVariable('firstname')")
}
</script>

The above does not come out properly, I get entire GetQueryString etc in the Target URL

What should the syntax be, I think I may also be using the wrong javascript command, I think it should be a FormRequest, hmm not really sure.

View 1 Replies View Related

Passing Value From Parent To Child Window Created By Pop Up

Dec 5, 2006

Passing value from parent to child window created by Pop up.

View 2 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 A Variable To Window.location.replace?

Aug 14, 2010

this is a newbie question, and probably really dumb, but If I create a function that looks like this...

function recall(tim)
{
setTimeout("window.location.replace('somepage.html')",tim);
}

it works fine when called. However; I want to be able to pass the page url in a variable, something like this.

[Code]...

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







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