Ask a Question related to ASP.NET General, Design and Development.
-
Daniel Bass #1
why doesn't this script creation, from .aspx.vb work, for this event handler???
where szStartDate, szEndDate, szStatus, szMsgType,
szClient, szFilter are all strings declared and
containing data as this code executes...
' hook up a refresh event to the refresh button
Dim RefreshScript As New System.Text.StringBuilder
RefreshScript.Append("<SCRIPT
language=""javascript"">")
RefreshScript.Append("function RefreshGrid(
szStartDate, szEndDate, szStatus, szMsgType, szClient,
szFilter )")
RefreshScript.Append("{")
RefreshScript.Append(" alert( ""HOOTS
ALORS!!!"" );")
RefreshScript.Append(" var url
= ""overview.aspx?StartDate="",
szStartDate, ""&EndDate="", szEndDate, ""&Status="",
szStatus,""&MsgType="", szMsgType,""&Client="",
szClient,""&Filter="", szFilter ;""")
RefreshScript.Append(" alert ( "" The URL to
be refreshed iiiissssssss...."");")
RefreshScript.Append(" alert ( url ); ")
RefreshScript.Append("
parent.overview.location.href = url; ")
RefreshScript.Append("}")
RefreshScript.Append("</SCRIPT>")
RegisterClientScriptBlock("RefreshScript",
RefreshScript.ToString)
Dim ProcCall = "javascript:RefreshGrid( """ &
szStartDate & """, """ & _
szEndDate
& """, """ & _
szStatus
& """, """ & _
szMsgType
& """, """ & _
szClient
& """, """ & _
szFilter
& """ );"
btnRefresh.Attributes("onclick") = ProcCall
clicking on the button, "btnRefresh" does nothing.
all i'm trying to do is get a the "overview" frame to
refresh with the listed frames, calling upto the parent,
then back down to the frame in question.
i don't even get the first alert to fire off, so the
function's not even being entered.
i've tried :
- executing the function with no parameters present
- putting the script in script tags on the aspx page
at best if i replace the call to the function with just
an "alert..." call in the attributes.add call, i see the
alert, but only when pressing the button a second time???
why is that?!?!
Thanks!
Dan.
Daniel Bass Guest
-
Use standard ASPX page as a HTTP handler
Hi I would like to use an existing ASPX page as a HTTP handler so that I can do something like this.... <system.web> <httpHandlers> <add... -
DataGrid's UpdateCommand event handler and CancelCommand handler problem
I am having the same problem: the wrong event handler is being fired when column headings and page changes are clicked. I am using the datagrid... -
Assign Javascript event handler function dynamically to a Flash object event?
I have a Flash player object embedded in one of my web pages. I want to assign code to the OnReadyStateChange event for the object. Every... -
Event Handler
I had made an UserControl (.ascx) which include a datalist control. The datalist control had contains an imagebutton. Next, I would like to... -
Dynamic creation of web pages without .aspx files
I am experimenting with dynamically creating pages containing custom controls in response to http requests caught by an http handler, in place of... -
Daniel Bass #2
formatted better... why doesn't this script creation, from .aspx.vb work, for this event handler???
where szStartDate, szEndDate, szStatus, szMsgType,
szClient, szFilter are all strings declared and
containing data as this code executes...
' hook up a refresh event to the refresh button
Dim RefreshScript As New System.Text.StringBuilder
RefreshScript.Append("<SCRIPT language=""javascript"">")
RefreshScript.Append("function RefreshGrid( szStartDate, szEndDate, szStatus, szMsgType, szClient, szFilter )")
RefreshScript.Append("{")
RefreshScript.Append(" alert( ""HOOTS ALORS!!!"" );")
RefreshScript.Append(" var url = ""overview.aspx?StartDate="", szStartDate, ""&EndDate="", szEndDate, ""&Status="", szStatus,""&MsgType="", szMsgType,""&Client="", szClient,""&Filter="", szFilter ;""")
RefreshScript.Append(" alert ( "" The URL to be refreshed iiissssssss...."");")
RefreshScript.Append(" alert ( url ); ")
RefreshScript.Append(" parent.overview.location.href = url; ")
RefreshScript.Append("}")
RefreshScript.Append("</SCRIPT>")
RegisterClientScriptBlock("RefreshScript", RefreshScript.ToString)
Dim ProcCall = "javascript:RefreshGrid( """ & szStartDate & """, """ & _
szEndDate & """, """ & _
szStatus & """, """ & _
szMsgType & """, """ & _
szClient & """, """ & _
szFilter & """ );"
btnRefresh.Attributes("onclick") = ProcCall
clicking on the button, "btnRefresh" does nothing.
all i'm trying to do is get a the "overview" frame to
refresh with the listed frames, calling upto the parent,
then back down to the frame in question.
i don't even get the first alert to fire off, so the
function's not even being entered.
i've tried :
- executing the function with no parameters present
- putting the script in script tags on the aspx page
at best if i replace the call to the function with just
an "alert..." call in the attributes.add call, i see the
alert, but only when pressing the button a second time???
why is that?!?!
Thanks!
Dan.
Daniel Bass Guest
-
Daniel Bass #3
Re: why doesn't this script creation, from .aspx.vb work, for this event handler???
"Marina" <zlatkinam@nospam.hotmail.com> wrote in message
news:uJcOQeWQDHA.1072@TK2MSFTNGP10.phx.gbl...yep, i took the HTML text I originally put in and just placed quotes around> Have you looked at the rendered HTML to see what it looks like?
it... i moved it here because i wasn't sure if the aspx page was in the
scope of the aspx.vb page.
i don't know, how do i tell?> Is the client side event handler being registered properly?
yep.> Does the HTML look the way it is supposed to?
Daniel Bass Guest
-
Marina #4
Re: why doesn't this script creation, from .aspx.vb work, for this event handler???
Well, you can tell if everything is registered properly by looking at the
HTML and seeing if the onclick handler is pointing to the right function
etc. By looking at your function and making sure it's valid javascript.
If your page is then not behaving normally, then this is a
browser/javascript issue, not an ASP.NET issue. Once this stuff is on the
client, asp.net is not involved. If your javascript is right, and the
button's onclick handler is set correctly, and things are still not
functioning properly - then asp.net is not involved.
"Daniel Bass" <danielbass@postmaster.co.uk> wrote in message
news:uDe7NtWQDHA.3236@TK2MSFTNGP10.phx.gbl...around>
> "Marina" <zlatkinam@nospam.hotmail.com> wrote in message
> news:uJcOQeWQDHA.1072@TK2MSFTNGP10.phx.gbl...>> > Have you looked at the rendered HTML to see what it looks like?
> yep, i took the HTML text I originally put in and just placed quotes> it... i moved it here because i wasn't sure if the aspx page was in the
> scope of the aspx.vb page.
>>> > Is the client side event handler being registered properly?
> i don't know, how do i tell?
>
>>> > Does the HTML look the way it is supposed to?
> yep.
>
>
Marina Guest



Reply With Quote

