Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SIMPLE QUESTIONS ABOUT WINDOWS

Status
Not open for further replies.

alexfusion

Programmer
Feb 5, 2001
94
AR
Hello Everyone,
This is the first time I enter to this Javascript Forum.I'm not an expert Javascripter,so these question seem basic to you,the experts:
1-I have a main page.I don't want to open another window,just I would like that the main page appears in the way I like,I mean with no scroolbars,no toolbars,etc.
How can I do this?
2-I have a form page and a result page.How can I pass the form variables to the result page so I can use "document.write" to show, for instance"Thank you (here goes visitor name or whatever" for sending your comments).I did this using ASP or CF or PHP,but I would like to use Javascript,to show the messages and not a server side language.
I hope this is clear enough.

Any help welcome !

Many Thanks

Alexfusion

mixale@hotmail.com

 
I think you've asked two very good questions.

1. I'm not sure if there's a direct way of doing this. But what you can do is to open up a new browser without toolbar etc and close down the previous browser.

location=whateverhtmfile;
myWin=open(location,'anewwin','toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=no,resizable=no,copyhistory=yes,personaltoolbar=yes');
t=window.close();

2. You can do this at least two ways.

function confirmmessage() {
var ms = document.formname.details.value;
w = window.open(", ", 'popup', 'toolbar = no, status = no');
w.document.write("Thanks you Mr "+ms+"blah,blah,...");
}

<form name=formname>
<textarea name=details cols=35 rows=8>
</textarea>
<br>
<input type=&quot;button&quot; value=&quot;send&quot; onClick=confrimmessage();>
</form>

Also, you can use JavaScript to read the form values on the URL like other server-side language, Perl, ASP, CF, etc.
I just can't remember where I've read an example of that. If anyone know, please let me know.

Regards
 
hi
i either haven't heard of removing something from the current window (but i guess there is something in netScrap with location.visibility or something, but you have to mess with security for this porposes - meaning confirms with user.. ugly-ugly..)

about the second -

<form .. method=&quot;get&quot; action=&quot;other.html&quot;>
..
</form>

& in the result page you have to work with location.search (yeah, just almost like on Server Side)

take a look at the example:
thread216-132557 Victor
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top