javascript in the page

J

jhcorey

I'm using a javascript datepicker. In a sample html page, this
datepicker
is positioned on the page by adding the following script within an html
element:

<script type="text/javascript">
var d = new Date();
var dp = new DatePicker(d);
document.body.appendChild(dp.create());
</script>

I'm trying to add this to an aspx page in a number of ways: (1) I've
hard-coded it; (2) I've added parts of this as a function using
RegisterClientScriptBlock; (3) I've tried to add it using a literal
control.

The results are that the datepicker renders, but I get a message box
saying that IE could not open the page. It works fine in FireFox, and
I don't see any errors there, or problems with the source html.

If I call the code using a button it works, but I would like to have
the datepicker on the page when it renders (I've tried in the PreRender
event, too).

The IE message is "Internet Explorer could not open the Internet
site...Operation aborted"

Any idea why this is happening?
 
J

jhcorey

Oops, save your time. I think the issue is that I have a reference to
a js file enclosed in single quotes, and IE doesn't like it.
 
J

jhcorey

Actually found that this particular datepicker evidently can't be
placed in a table in IE for some reason. No idea why.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top