 |
| 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
|
|
|
|

March 3rd, 2004, 03:23 PM
|
|
Friend of Wrox
|
|
Join Date: Sep 2003
Posts: 451
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|
|

March 3rd, 2004, 04:52 PM
|
|
Friend of Wrox
|
|
Join Date: Nov 2003
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
|
|
What happens when you click the button? Nothing?
And please post more of your code...
----------
---Snib---
----------
|
|

March 3rd, 2004, 05:03 PM
|
|
Friend of Wrox
|
|
Join Date: Sep 2003
Posts: 451
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|
|

March 3rd, 2004, 06:51 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 344
Thanks: 0
Thanked 1 Time in 1 Post
|
|
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')">
|
|

March 3rd, 2004, 07:01 PM
|
|
Friend of Wrox
|
|
Join Date: Sep 2003
Posts: 451
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|
|

March 4th, 2004, 01:15 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
|
|
in order to Submit to new page use target="_blank" in ur [u]form tag</u>.
HTH.
Always:),
Hovik Melkomian.
|
|
 |