DTP


 
Lively discussions on the graphic arts and publishing — in print or on the web


Go Back   Desktop Publishing Forum > General Discussions > Web Site Building & Maintenance

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 09-01-2005, 09:05 AM   #1
ilox
Member
 
ilox's Avatar
 
Join Date: Aug 2005
Location: Adelaide, South Australia
Posts: 104
Default Help with JavaScript coding

I'm in the middle of a web design course and the current assignment is about using JavaScript to verify entries on an order form. I have pretty well all the work done but am having trouble on a couple of areas.
First one is this script given to us in the tutorial to demonstrate a simple script.
Code:
<script language="JavaScript" >
 currentDate=new Date(); 
with (currentDate){document.write( getDate() +"/" + getMonth()
 + "/" + getYear())}
</script>
I need to provide a page which has this date component in it but the darn thing is giving the wrong month! When I run it I get the month as 8 instead of 9. My computer is running at the correct date (I just double checked) so why is this thing showing August?

Second problem is a page that brings up a Help page when a button is pushed. This runs under a set of frames (blech!) so the code for this is
Code:
 function openHelp() {
    parent.frames[1].location.href="joeshelp.html";
   }

 <input type="button" value="Click to open the Help page"
  onclick="openHelp(event);">
What I was hoping to do was set it up so the help page could be opened whether the order form was in the frames or running on its own.

Anybody able to give me some clues or point me in the right direction about this stuff?

   
__________________
Cheers, Ian
ilox is offline   Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Firefox 1.5 JavaScript Console Kelvyn Web Site Building & Maintenance 0 12-13-2005 12:01 PM


All times are GMT -8. The time now is 11:38 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Contents copyright 2004–2014 Desktop Publishing Forum and its members.