Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Javascript document.request - what does this do?

Posted on 2005-02-24
Medium Priority
Last Modified: 2008-02-01
I am working on making some changes to an app that I did not write. I have encountered some code that I am unsure what it does...

When the link below is clicked, a little calendar page is loaded as a popup so user can selected a date. Here is the code in question:

<img src="../shared/pics/calendar.gif" border=0 width=16 height=16 alt="Calendar Selection Wizard" onClick="window.dateField=document.request.start_date;window.open('../shared/asp/cal.asp','start_date_calendar','width=255,height=255');" style="cursor: hand">

what I am particularly interested in is what is that code in the onClick event doing?

When I click on the link in my app I get an error stating that document.request.start_date is either null or not an object.

Question by:jkwasson
  • 2
LVL 32

Accepted Solution

Batalf earned 1000 total points
ID: 13398393
Yes, this


doesn't look right.

Search for request.start_date in your HTML file and post what you find.


Author Comment

ID: 13398419
lol, I think I figured it out. I am a JavaScript noob....

request is the name of a form on this page.  I was thinking request was the request object, which I wasn't finding much info on...

I am going to give you the points Batalf because your idea to search the html page for request.start_date is what led me to find out that was the name of a form!

LVL 32

Expert Comment

ID: 13398421

Glad it worked out for you!


Featured Post

[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

572 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question