Note that in ASP.Net 2.0, this method (and related) has been superceded by
the ClientScriptManager's methods for doing the same things. The
ClientScriptManager is a property of the System.Web.UI.Page class, and is
exposed in the Page.ClientScript property. See:
http://msdn2.microsoft.com/en-us/lib...pt(VS.80).aspx http://msdn2.microsoft.com/en-us/lib...ptmanager.aspx
--
HTH,
Kevin Spencer
Microsoft MVP
Printing Components, Email Components,
FTP Client Classes, Enhanced Data Controls, much more.
DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net
"Jouni Karppinen" <Jo************@discussions.microsoft.comwrote in
message news:20**********************************@microsof t.com...
Most likely that Response.Write has rendered your JavaScript block outside
HTML-tag.
Best way to add JavaScripts from codebehind is to use
RegisterClientScriptBlock
this.RegisterClientScriptBlock("jsGoogleMap","<scr ipt
>language='javascript'>showAddress("+getAddress+ "</script>");
"moni" wrote:
>Hi..
I am trying to use javascript for google maps display.
If I call the javascript function from my aspx file I use:
<input type="text" id="addresstext" value="Huntington Avenue,
Boston, MA" name="yourName" style="width: 287px" />
<input type="button" id="addressclick" value="Display Map"
onclick="showAddress(addresstext.value)" /><br />
and it works.
But using the Response.Write from the aspx.cs file it
does not display it. I need to pass an argument to the function
call.Am I passing the value wrongly??
I am calling it this way:
Response.Write("<script
language='javascript'>showAddress("+getAddress+") ;</script>");
where, getAddress is the comma-seperated Address string.
This is not displaying the map, I am creating using Javascript.
I have also tried all combinations of singel quotes, and double quotes
wrt calling the javascript function
Thx