?
Solved

Javascript document.request - what does this do?

Posted on 2005-02-24
3
Medium Priority
?
852 Views
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.

Thanks!
0
Comment
Question by:jkwasson
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 32

Accepted Solution

by:
Batalf earned 1000 total points
ID: 13398393
Yes, this

window.dateField=document.request.start_date

doesn't look right.

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

Batalf
0
 
LVL 5

Author Comment

by:jkwasson
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!

Thanks!
0
 
LVL 32

Expert Comment

by:Batalf
ID: 13398421
Thanks!

Glad it worked out for you!

Batalf
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

In my daily work (mainly using ASP.net), I need to write a lot of JavaScript code. One of the most repetitive tasks I do are the jQuery Ajax calls. You know: (CODE) I don't know if for you it's the same, but for me is soooo tedious to write the …
I've been trying to accomplish this for a while and it just struck me yesterday how to accomplish this task. I have done searches all over the internet looking for ways to email pages from my applications and finally I have done it!!! Every single s…
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

777 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