Hi,

I have a form on my Intranet webpage for my company to submit trouble
tickets. Part of it fills in the current date and time to a text box.
THis works great in Firefox but not in IE. Nothing shows up at all in
the text box.

<tr>
<td>Date Requested: </td><td align = right><input type = "text"
name = "date" value = '
<%
postDate = FormatDateTime(Now,0)
Response.Write(postDate)
%>
' readonly=yes></td>
</tr>

This is the chunk of code that it is in.

Thanks for any guidance.

Re: ASP Error only in Internet Explorer by bob

bob
Mon Nov 13 10:34:11 CST 2006

sorry, screwed up last post...
try this

strTest = "this is a test"
<input type="text" value="<%= strTest %>">


"K.J. 44" <Holleran.Kevin@gmail.com> wrote in message
news:1163434955.013303.173120@b28g2000cwb.googlegroups.com...
> Hi,
>
> I have a form on my Intranet webpage for my company to submit trouble
> tickets. Part of it fills in the current date and time to a text box.
> THis works great in Firefox but not in IE. Nothing shows up at all in
> the text box.
>
> <tr>
> <td>Date Requested: </td><td align = right><input type = "text"
> name = "date" value = '
> <%
> postDate = FormatDateTime(Now,0)
> Response.Write(postDate)
> %>
> ' readonly=yes></td>
> </tr>
>
> This is the chunk of code that it is in.
>
> Thanks for any guidance.
>



Re: ASP Error only in Internet Explorer by bob

bob
Mon Nov 13 10:32:38 CST 2006

try a simple test?
<input type="text" value="<%= testing... %>">

that really has no choice but to work



"K.J. 44" <Holleran.Kevin@gmail.com> wrote in message
news:1163434955.013303.173120@b28g2000cwb.googlegroups.com...
> Hi,
>
> I have a form on my Intranet webpage for my company to submit trouble
> tickets. Part of it fills in the current date and time to a text box.
> THis works great in Firefox but not in IE. Nothing shows up at all in
> the text box.
>
> <tr>
> <td>Date Requested: </td><td align = right><input type = "text"
> name = "date" value = '
> <%
> postDate = FormatDateTime(Now,0)
> Response.Write(postDate)
> %>
> ' readonly=yes></td>
> </tr>
>
> This is the chunk of code that it is in.
>
> Thanks for any guidance.
>



Re: ASP Error only in Internet Explorer by Evertjan

Evertjan
Mon Nov 13 10:41:12 CST 2006

K.J. 44 wrote on 13 nov 2006 in microsoft.public.scripting.vbscript:

> Hi,
>
> I have a form on my Intranet webpage for my company to submit trouble
> tickets. Part of it fills in the current date and time to a text box.
> THis works great in Firefox but not in IE. Nothing shows up at all in
> the text box.
>
> <tr>
> <td>Date Requested: </td><td align = right><input
> type = "text"
> name = "date" value = '
> <%
> postDate = FormatDateTime(Now,0)
> Response.Write(postDate)
> %>
> ' readonly=yes></td>
> </tr>
>

Wrong NG, the error is not in tha ASP-Vbscript.

[As expected, because serverside code does not run on a browser,
and so must be browser independent.]

The debugging is in the viewsourcing of the html stream,
however it is clear that:

value = '
<%
postDate = FormatDateTime(Now,0)
Response.Write(postDate)
%>
'

leads to an HTML with nort allowed new lines
inside the single quotes of the value = '...'

Try:

<input type = "text" name = "date"
value = '<% Response.Write FormatDateTime(Now,0) %>'
readonly=yes>

or:

<input type = "text" name = "date"
value = '<% = FormatDateTime(Now,0) %>'
readonly=yes>


--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

Re: ASP Error only in Internet Explorer by K

K
Mon Nov 13 10:51:31 CST 2006

Well, making that change definitely did the trick. Thanks! I wonder
why it worked in Firefox and not in IE though...

Thanks.

Evertjan. wrote:
> K.J. 44 wrote on 13 nov 2006 in microsoft.public.scripting.vbscript:
>
> > Hi,
> >
> > I have a form on my Intranet webpage for my company to submit trouble
> > tickets. Part of it fills in the current date and time to a text box.
> > THis works great in Firefox but not in IE. Nothing shows up at all in
> > the text box.
> >
> > <tr>
> > <td>Date Requested: </td><td align = right><input
> > type = "text"
> > name = "date" value = '
> > <%
> > postDate = FormatDateTime(Now,0)
> > Response.Write(postDate)
> > %>
> > ' readonly=yes></td>
> > </tr>
> >
>
> Wrong NG, the error is not in tha ASP-Vbscript.
>
> [As expected, because serverside code does not run on a browser,
> and so must be browser independent.]
>
> The debugging is in the viewsourcing of the html stream,
> however it is clear that:
>
> value = '
> <%
> postDate = FormatDateTime(Now,0)
> Response.Write(postDate)
> %>
> '
>
> leads to an HTML with nort allowed new lines
> inside the single quotes of the value = '...'
>
> Try:
>
> <input type = "text" name = "date"
> value = '<% Response.Write FormatDateTime(Now,0) %>'
> readonly=yes>
>
> or:
>
> <input type = "text" name = "date"
> value = '<% = FormatDateTime(Now,0) %>'
> readonly=yes>
>
>
> --
> Evertjan.
> The Netherlands.
> (Please change the x'es to dots in my emailaddress)


Re: ASP Error only in Internet Explorer by Evertjan

Evertjan
Mon Nov 13 11:30:40 CST 2006

K.J. 44 wrote on 13 nov 2006 in microsoft.public.scripting.vbscript:

> Evertjan. wrote:
>>
>> leads to an HTML with nort allowed new lines

no[r]t

>> inside the single quotes of the value = '...'
>>
>> Try:
>>
>> <input type = "text" name = "date"
>> value = '<% Response.Write FormatDateTime(Now,0) %>'
>> readonly=yes>
>>
>> or:
>>
>> <input type = "text" name = "date"
>> value = '<% = FormatDateTime(Now,0) %>'
>> readonly=yes>

[Please do not toppost on usenet]

> Well, making that change definitely did the trick. Thanks! I wonder
> why it worked in Firefox and not in IE though...

Because the browsers have different error tolerance handling.

However it is an HTML error either way.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)