Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript
|
Javascript General Javascript discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript 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 March 3rd, 2004, 03:23 PM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 451
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Ben Horne
Default Web Page Not Opening Correctly

Hi all,

I'm having problems with this little bit of Javascript code in my Intro page

This is the code that is in the function:

function Submit_onclick() {
//Open the DonateTemplate page in a new window
window.open("DonateTemplate.html")


I want the button to open the DonateTemplate.html page that is on my personal drive here on campus. I tested the button and I could not get the page to open. Any ideas on what to do?

FYI!!!!! Both the Intro.html and DonateTemplate.html pages reside on my personal drive on campus which is as follows:

H:\InternetProg\DonateTemplate.html
and
H:\InternetProg\Intro.html


Thanks in advance,
__________________
Ben Horne
-------------------------
I don\'t want to sound like I haven\'t made any mistakes. I\'m confident I have.

Most likely using FireFox and concocting my next Macromedia Flash project
Snibworks Forums Moderator

Welcome to the New Age
 
Old March 3rd, 2004, 04:52 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
Default

What happens when you click the button? Nothing?

And please post more of your code...

----------
---Snib---
----------
 
Old March 3rd, 2004, 05:03 PM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 451
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Ben Horne
Default

I get a "Page Not Found" error whenever I click the button. The code for the main function is as follows:

function Submit_onclick() {
//Open the DonateTemplate page in a new window
window.open("DonateTemplate.html")
}


I also have a piece of Javascript code for the button which is:

onclick="Submit_onclick()">(I'm referencing the main function)


Quote:
quote:Originally posted by Snib
 What happens when you click the button? Nothing?

And please post more of your code...

----------
---Snib---
----------
Ben Horne
Madison Area Technical College student
-------------------------
http://community.webshots.com/user/valerian114

Go there. I have a lot of awesome photos that I rendered myself
 
Old March 3rd, 2004, 06:51 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 344
Thanks: 0
Thanked 1 Time in 1 Post
Default

try something like :

<input type="button" value="submit" onclick="window.open('http://www.greggriffiths.org/','newwin','toolbar=no, directories=no, location=no, status=yes, menubar=no, resizable=no, scrollbars=yes,width=900, height=700')">
 
Old March 3rd, 2004, 07:01 PM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 451
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Ben Horne
Default

GOT IT!

The two HTML files had conflicting extensions(.htm and html. As of now, that problem has been fixed.

Quote:
quote:Originally posted by Greg Griffiths
 try something like :

<input type="button" value="submit" onclick="window.open('http://www.greggriffiths.org/','newwin','toolbar=no, directories=no, location=no, status=yes, menubar=no, resizable=no, scrollbars=yes,width=900, height=700')">
Ben Horne
Madison Area Technical College student
-------------------------
http://community.webshots.com/user/valerian114

Go there. I have a lot of awesome photos that I rendered myself
 
Old March 4th, 2004, 01:15 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
Send a message via Yahoo to melvik
Default

in order to Submit to new page use target="_blank" in ur [u]form tag</u>.
HTH.

Always:),
Hovik Melkomian.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Opening a Template from the WEB aml Word VBA 0 April 9th, 2007 01:47 PM
How to diplay web page inside another web page win cyberjoe C# 2 March 1st, 2007 05:35 AM
Opening web application from VS 2003 tobymatthews ASP.NET 1.0 and 1.1 Basics 1 May 22nd, 2006 08:14 AM
step of opening a web page somnath.kartic VS.NET 2002/2003 0 March 30th, 2006 03:24 AM
ASP page not loading correctly phreakgrrrl Classic ASP Databases 1 July 6th, 2005 02:59 PM





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