Click to See Complete Forum and Search --> : any of you know......output.doc.....


xataku_nakusute
07-23-2003, 09:57 PM
do any of you want to "tutor" me on the output.document.write attribute and the other stuff related to it?
if not, may you provide me with a lnik to a site where i may find out more about this topic?

thanx

pyro
07-23-2003, 10:09 PM
What is output referencing?

xataku_nakusute
07-23-2003, 10:26 PM
im not sure whether youre asking if thats what i mean or if thats just what youre asking me.....

but basically.....i just wanted to know cuz i got this javascript site search script and ive been modifying it a bit to suite my sites color and layout schemes, and though all of my mods to the script are successful, im very unsure of what im doing most of the time....so basically, i just wanted to learn about controlling and manipulating output data and stuff like that....

pyro
07-23-2003, 10:31 PM
output.document.write is not an attibute. output is probably referencing a popup window. If so, what it will do is write content into the popup window.

xataku_nakusute
07-23-2003, 10:39 PM
check out the code i have.....
all of the output is displayed in the current window...
but if you have any links or something to help me with the output function/attribute/whatever you wanna call it, pleaz tell me

thanx(sorry if im sounding rude)

xataku_nakusute
07-23-2003, 10:46 PM
sorry bout my stubborn-ness(if such word exists), it took me a while to figure out.....but i have a question now(a real one this time):

how can you create a form that takes the user-submitted input and displays it either in:
a) a poopup
or
b) the same window

???

thanx if ya got something for me

pyro
07-23-2003, 10:47 PM
This is the key line:

output = self;

It is telling it to write to the same window...

pyro
07-23-2003, 10:54 PM
Take a look at this:

<html>
<head>
<script type="text/javascript">
function writeWin() {
newwin = window.open();
newwin.document.write(document.myform.mytext.value);
}
</script>
</head>

<body>
<form name="myform">
<input type="text" name="mytext">
<input type="button" value="Submit" onclick="writeWin();">
</form>
</body>
</html>

xataku_nakusute
07-23-2003, 11:01 PM
the thing i really need to know is how to make user input/data accessible.....
in other words, how do you give user input a var name?

pyro
07-23-2003, 11:09 PM
You need to reference it through the form, so you could do something like this:

var userinput = document.myform.mytext.value;

xataku_nakusute
07-23-2003, 11:14 PM
ooooooh! thats what you meant......

sorry it took me soo long to figure it out....
im in somewhat of a "dazed" mood at....every moment of each day of the year :P

thanx for the help

xataku_nakusute
07-23-2003, 11:20 PM
for some reason, when i use the code and replace "self;" with "window.open();", it pops up two new windows instead of just one...

??????????????????????????????????????????????????????????
:confused: :confused: :confused: :confused: :confused: :confused: