473,545 Members | 1,995 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.Str ingBuilder
RefreshScript.A ppend("<SCRIPT
language=""java script"">")
RefreshScript.A ppend("function RefreshGrid(
szStartDate, szEndDate, szStatus, szMsgType, szClient,
szFilter )")
RefreshScript.A ppend("{")
RefreshScript.A ppend(" alert( ""HOOTS
ALORS!!!"" );")
RefreshScript.A ppend(" var url
= ""overview.aspx ?StartDate="",
szStartDate, ""&EndDate= "", szEndDate, ""&Status=" ",
szStatus,""&Msg Type="", szMsgType,""&Cl ient="",
szClient,""&Fil ter="", szFilter ;""")
RefreshScript.A ppend(" alert ( "" The URL to
be refreshed iiiissssssss... ."");")
RefreshScript.A ppend(" alert ( url ); ")
RefreshScript.A ppend("
parent.overview .location.href = url; ")
RefreshScript.A ppend("}")
RefreshScript.A ppend("</SCRIPT>")

RegisterClientS criptBlock("Ref reshScript",
RefreshScript.T oString)

Dim ProcCall = "javascript:Ref reshGrid( """ &
szStartDate & """, """ & _
szEndDate
& """, """ & _
szStatus
& """, """ & _
szMsgType
& """, """ & _
szClient
& """, """ & _
szFilter
& """ );"
btnRefresh.Attr ibutes("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 3014
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.Str ingBuilder
RefreshScript.A ppend("<SCRIPT language=""java script"">")
RefreshScript.A ppend("function RefreshGrid( szStartDate, szEndDate, szStatus, szMsgType, szClient, szFilter )")
RefreshScript.A ppend("{")
RefreshScript.A ppend(" alert( ""HOOTS ALORS!!!"" );")
RefreshScript.A ppend(" var url = ""overview.aspx ?StartDate="", szStartDate, ""&EndDate= "", szEndDate, ""&Status=" ", szStatus,""&Msg Type="", szMsgType,""&Cl ient="", szClient,""&Fil ter="", szFilter ;""")
RefreshScript.A ppend(" alert ( "" The URL to be refreshed iiissssssss.... "");")
RefreshScript.A ppend(" alert ( url ); ")
RefreshScript.A ppend(" parent.overview .location.href = url; ")
RefreshScript.A ppend("}")
RefreshScript.A ppend("</SCRIPT>")

RegisterClientS criptBlock("Ref reshScript", RefreshScript.T oString)

Dim ProcCall = "javascript:Ref reshGrid( """ & szStartDate & """, """ & _
szEndDate & """, """ & _
szStatus & """, """ & _
szMsgType & """, """ & _
szClient & """, """ & _
szFilter & """ );"
btnRefresh.Attr ibutes("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*******@nosp am.hotmail.com> wrote in message
news:uJ******** ******@TK2MSFTN GP10.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********@pos tmaster.co.uk> wrote in message
news:uD******** ******@TK2MSFTN GP10.phx.gbl...

"Marina" <zl*******@nosp am.hotmail.com> wrote in message
news:uJ******** ******@TK2MSFTN GP10.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
2435
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 firing. I have double-checked everything (and rechecked) and I haven't found anything that would explain why the Application is not starting. Here...
9
2756
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 IS IMPOSSIBLE TO PROGRAMMATICALLY ADD A BUTTON TO A DYNAMICALLY CREATED PAGE. Or, to be more precise, why it is impossible to have an onClick sub ...
3
4193
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - I have window.status="Moomin"; why doesn't the statusbar change? ----------------------------------------------------------------------- When changing the status in an event (e.g. onmouseover) you should return true from the event. Also a number of browsers...
17
9627
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 event. But if I press the button without entering text first, the button click event does work. What's up? <html> <body> <h3>Events on Buttons and...
8
3910
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
2720
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() { int MilliSecondsTimeOut = (this.Session.Timeout * 60000) - 30000; string Script = @" <script type='text/javascript'> var Count=0;
2
3902
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 well, so at times it is tempting just to port parts of it over mostly as-is. In fact, one MSDN article I read suggested using straight HTML wherever...
3
1797
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 see the delegates being associated with the event handling methods in the page (like in a Windows app), but instead found nothing in either the...
3
689
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 per their MSDN policy. -------------------- I have a web site under .NET 2.0 that renders videos using the Silverlight media player. The web...
0
7478
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7410
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7668
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7923
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7773
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
3448
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1901
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1025
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
722
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.