473,382 Members | 1,441 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

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.
Nov 17 '05 #1
3 3010
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.
Nov 17 '05 #2

"Marina" <zl*******@nospam.hotmail.com> wrote in message
news:uJ**************@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 around
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.
Nov 17 '05 #3
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" <da********@postmaster.co.uk> wrote in message
news:uD**************@TK2MSFTNGP10.phx.gbl...

"Marina" <zl*******@nospam.hotmail.com> wrote in message
news:uJ**************@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

around 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.

Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Gordon Smith | last post by:
I have four (4) ASP.NET Web applications/Web sites on a IIS/6 - Windows Server 2003 production server. 3 of them work fine. I just installed the 4th one and it's Application_Start event is not...
9
by: Neo Geshel | last post by:
I have strip-mined, strip-searched, and completely exhausted the Internet (up to the 30th page on Google, with 100 results per page!!), all without finding an answer to my question AS TO WHY IT...
3
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - I have window.status="Moomin"; why doesn't the statusbar change?...
17
by: Eric | last post by:
I'm new to JavaScript and I wrote this code to play with. Oddly, if I enter text in a box and then press the button, I only get the onChange event for the text box and not the button's onclick...
8
by: Radu | last post by:
Hi. I have an ASP control on my page: <asp:Calendar ID="calStart" ................ Etc </asp:Calendar> and I have a Custom Validator defined as <asp:CustomValidator
3
by: Joey | last post by:
I am working on an asp.net 1.1 web app in C#. I downloaded some sample code that is supposed to allow for me to persist session state. The code is as follows: private void PersistSessionState()...
2
by: John Kotuby | last post by:
Hi guys, I am converting a rather complicated database driven Web application from classic ASP to ASP.NET 2.0 using VB 2005 as the programming language. The original ASP application works quite...
3
by: Scott M. | last post by:
In a new VS 2005 ASP .NET Web Application Project (WAP), I'm looking at the ..designer.cs file to see how the event handlers for my page controls are wired up to the events. I was expecting to...
3
by: =?Utf-8?B?Um9nZXIgTWFydGlu?= | last post by:
Note: My apologies for repeating this post from last week, but my nospam alias and profile account were incorrect. I think I have fixed this, so hopefully this post will trigger MS into a response...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.