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)