473,396 Members | 2,061 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,396 software developers and data experts.

VBSCRIPT with autopostback - VS2005

I have a problem with client-side VBSCRIPT on a page with auto-postback
controls.
I have generated a simple page with a listbox, set to autopostback. This
works OK. If I then generate some client-side VBSCRIPT, VS creates a VBSCRIPT
script block. Even if I delete everything within the block, just leaving the
<script</scripttags, I get an error on the page if I click an item in the
list box. If I use JScript, rather than VBScript, I don;t see the issue. This
was all working with VS2003, but not with 2005. The only difference I can
see, is that, for the postback, VS2005 generates

javascript:settimeout(__DoPostback(...),0)

whereas VS2003 does not generate the settimeout:-

javascript:__DoPostback(...)

Anyone come across this problem? I'm converting quite a large VS2003 app to
VS2005, and don't really want to have to rewrite all my client-side scripts
in JScript.

Aug 21 '07 #1
3 1699
Do your client side <scripttags specify the type? e.g.

<script type="text/vbscript">

</script>

Aug 21 '07 #2


"ca****@aspnetlibrary.com" wrote:
Do your client side <scripttags specify the type? e.g.

<script type="text/vbscript">

</script>

Yes. as I say, the annoying thing is it all worked fine in VS2003.

Aug 21 '07 #3


"JohnHorb" wrote:
>

"ca****@aspnetlibrary.com" wrote:
Do your client side <scripttags specify the type? e.g.

<script type="text/vbscript">

</script>

Yes. as I say, the annoying thing is it all worked fine in VS2003.
Well after some hours of hard googling, found that the answer is to move the
vbscript block from the top of the file, where VS2005 puts it, to after the
</bodytag. (I suspect the crtical thing is to ensure it goes after the
jscript __DoPostback block).
Aug 21 '07 #4

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

Similar topics

2
by: Susan van Houen | last post by:
Hi All, How do I intercept an autopostback on the client side and prevent it from executing the submit? In classic ASP I used to intercept the on_submit and just return false;
8
by: Matthew Louden | last post by:
why need to set autopostback property to be true?? I know autopostback event means to send the form to the server automatically. I tried checkbox, checkbox list, radio button, and radio button...
6
by: Sunil | last post by:
Dear All I am a bit confused about AutoPost Back. My concept about AutoPostBack is that If AutoPostBack i "TRUE" for a Web Form the Web Form Goes back to the server and displays a fresh copy of...
2
by: ChucRock | last post by:
Hi, I have the following code where there is some client side VBScript that does something and needs to pass a variable back to the ASP.NET page. When the page is updated through a postback, the...
2
by: Tom Edelbrok | last post by:
Question: Why does a button event (ie: Button1_Click) get executed on the first click for a textbox control which has 'autopostback=false', but doesn't get executed until a second click when...
4
by: Patrick Dugan | last post by:
I am trying to launch a vbscript from within vb.net (vs2005) The script itself requires a parameter of a filename to process. I have tried: Dim P As Process =...
2
by: rn5a | last post by:
Assume that a user control has a TextBox (Page1.ascx) <asp:TextBox ID="txtName" runat="server"/> I am encapsulating the above user control in a ASPX page named Page1.aspx i.e. the ASPX page...
3
by: andyjgw | last post by:
OK, this is weird. Just installed VS2008 from MSDN RTM build (this machine has never had any beta builds on it). When I open a vbscript file on same machine in VS2005, code-completion and...
6
by: Peter | last post by:
ASP.NET 2.0 Visual Studio 2008 I have the following code and when the textbox displays and I press Enter while in the text box I get AutoPostBack, how do I stop AutoPostBack? TextBox txt =...
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?
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...
0
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,...
0
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...
0
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...

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.