Tilted Forum Project Discussion Community

Tilted Forum Project Discussion Community (https://thetfp.com/tfp/)
-   Tilted Technology (https://thetfp.com/tfp/tilted-technology/)
-   -   [html - javascript] Have one window send info to another (https://thetfp.com/tfp/tilted-technology/46112-html-javascript-have-one-window-send-info-another.html)

thecow 02-18-2004 10:00 AM

[html - javascript] Have one window send info to another
 
I have an admin page for adding new posts, and I am working on an edit posts function.

I can get an edit post form to pop up in a smaller window. When the user presses submit on the form, I would like to send that info back to the main page and close the smaller one. Is this possible, or would I have to use dhtml to do something like this (not even open a "real" new window, but pop up a dhtml window)?

Sorry if I am way off base, I'm used to php, but not javascript or dhtml.

Thanks for any help/ideas.

Latch 02-18-2004 12:49 PM

I'm not a huge fan of Javascript.. but that said:

http://developer.irt.org/script/40.htm

If that doesn't help, check out the complete JS FAQ:

http://developer.irt.org/script/script.htm

DonnChadh 02-21-2004 03:41 AM

Here's an example of a function that is used to pass an IP address back to a form in another window
You could probably modify it to produce the ouput that you're wanting

Function
Quote:

<script type='text/javascript'>
function sendtoOpener(theip)
{
window.opener.form_name.field_name.value=theip
self.close()
}
</script>
Usage
Quote:

<span onClick="sendtoOpener('192.168.0.1')">192.168.0.1</span>

kofspades 02-21-2004 08:33 AM

The thing about writing client-side javascript is that you are going to run into major browser compatibility issues. I personally hate writing applications to be "IE-only" apps. My suggestion is to advoid complex client-side javascript. And by complex, I'm saying pretty much anything besides "document.forms[0].submit();"


All times are GMT -8. The time now is 01:08 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0 PL2
© 2002-2012 Tilted Forum Project


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62