Wrox Programmer Forums
|
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 14th, 2004, 03:50 AM
SoC SoC is offline
Authorized User
 
Join Date: Jul 2004
Posts: 65
Thanks: 0
Thanked 0 Times in 0 Posts
Default Hide toolbar

Hi,

This is a bit difficult to explain, so please bare with me.

I have a page that displays records from a database.

Some of these records also display a submit button. Clicking on this button will take users to another page that displays additional information about that particular record.

For example, record 1 has 5 columns of information. The 6th column holds a hidden field but also displays a submit button. Clicking on this submit button will submit the value of the hidden field to a second ASP page that then shows records based on the value from the hidden field.

I want this second page to pop up in front, but without showing any toolbars etc.

I'm not sure how to go about this.

I can set the size of the child page using resizeTo(x,y) on the child page. Can you do something similar on the child page to hide the toolbar? Or is there a way of setting this value from the parent page, remembering that the child has to be opened through a submit button?

thanks

s

 
Old September 14th, 2004, 04:21 AM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 683
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi s,

AFAIK there is no way to hide the toolbar after the window has been opened.

You could call a function from the onsubmit event of the form & open the window styled as you want with the required form field parameter attached to the url...
Code:
<form name="myForm" id="myForm" onsubmit="return SubmitThis(this);" target="_blank" action="myUrl.asp" method="get">
    <input type="hidden" name="myHiddenField" id="myHiddenField" value="myHiddenValue" />
    <input type="submit" value="go" />
</form>

...

function SubmitThis(form){
    var w = window.open("myUrl.asp?myHiddenField=" + encodeURIComponent(form.myHiddenField.value), "myWin",
                        "width=500, height=500, toolbar=no");    
    return false;                            
}
HTH,

Chris

 
Old September 14th, 2004, 08:39 PM
SoC SoC is offline
Authorized User
 
Join Date: Jul 2004
Posts: 65
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks ChrisScott, that worked really well - just what I was after.

You obviously know what you're talking about. Any career advice for a newbie? I'm doing an IT degree, but that's a bt of a slow process.

Any good books you know about, or online tutorials.

Thanks heaps

 
Old September 15th, 2004, 01:15 PM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 683
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hey s,

Career advice - hard to say, I was a builder by trade but changed tack due to a recession, then managed supermarkets for 8 years before getting into IT!!! An IT degree sounds like an excellent base to build on, but IMHO having your own web site and/or other programs to show potential employers would carry a lot of weight when you start looking for work.

As far as javascript goes, I've read the wrox beginning & professional books & found both very good.

I haven't spent much time with online tutorials, but find forums such as this one a great source of knowledge & spend quite a bit of time trawling the net for ideas & looking at how other people do things, these two sites are a couple of my favorites...

http://www.dynamicdrive.com
http://webfx.eae.net

Loads of luck,

Chris







Similar Threads
Thread Thread Starter Forum Replies Last Post
how to hide IE's addressbar, toolbar and menubar? MTLedari ASP.NET 2.0 Basics 6 April 12th, 2007 09:02 AM
Hide the Crystal Toolbar while printing reports smartconsultant Crystal Reports 0 July 31st, 2006 12:42 PM
ToolBar Help reyboy VB.NET 2002/2003 Basics 2 April 19th, 2005 08:35 PM
Toolbar amantona Crystal Reports 0 May 12th, 2004 09:41 AM
Toolbar sangata VS.NET 2002/2003 2 April 13th, 2004 05:14 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.