473,587 Members | 2,447 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Java script problem while using Asp:Wizard Control

13 New Member
I've got two cute editor controls each in a different WIZARD step. My javascript seems to be working from the first step and javascript events firing but when I go to the second step (containing a second editor) and then go back to the first step I find that the OnInitialized and OnChange events are no longer firing for the first editor.

I had assumed that these events would always fire for any cute editors on a page?

Thx in advance
Oct 30 '07 #1
9 4691
r035198x
13,262 MVP
I've got two cute editor controls each in a different WIZARD step. My javascript seems to be working from the first step and javascript events firing but when I go to the second step (containing a second editor) and then go back to the first step I find that the OnInitialized and OnChange events are no longer firing for the first editor.

I had assumed that these events would always fire for any cute editors on a page?

Thx in advance

Java != Javascript
Moved to Javascript forum.
Oct 30 '07 #2
acoder
16,027 Recognized Expert Moderator MVP
Can you post some code that we can look at?
Oct 30 '07 #3
T0mm0
12 New Member
I'm having the same problem. Here's some code... the OnChanged event fires only when viewing Editor1 for the first time only... doesn't fire for Editor2 at all...

[HTML]<%@ Page Language="VB" AutoEventWireup ="false" CodeFile="Test. aspx.vb" Inherits="Test" %>

<%@ Register Assembly="CuteE ditor" Namespace="Cute Editor" TagPrefix="CE" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt d">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitl ed Page</title>
</head>
<body>
<form runat="server">
<asp:Wizard ID="Wizard1" runat="server">
<WizardSteps>
<asp:WizardSt ep ID="WizardStep1 " runat="server" Title="Step 1">
<CE:Editor ID="Editor1" runat="server">
</CE:Editor>
</asp:WizardStep>
<asp:WizardSt ep ID="WizardStep2 " runat="server" Title="Step 2">
<CE:Editor ID="Editor2" runat="server">
</CE:Editor>
</asp:WizardStep>
</WizardSteps>
</asp:Wizard>
</form>
</body>
<script type="text/javascript" language="javas cript">
[/HTML]
Expand|Select|Wrap|Line Numbers
  1. var editor1 = document.getElementById('<%= Editor1.ClientID%>');
  2. var oldColour = editor1.style.borderColor;
  3.  
  4. function CuteEditor_OnChange(editor)
  5. var editdoc = editor.GetDocument();
  6. alert(editdoc.body.scrollWidth>800)
  7. if(editdoc.body.scrollWidth>800)
  8. {
  9. editor1.style.borderWidth=3;
  10. editor1.style.borderColor="#FF0000";
  11. }
  12. else
  13. {
  14. editor1.style.borderColor=oldColour;
  15. }
  16. }
  17. </script>
  18. </html>
Nov 7 '07 #4
acoder
16,027 Recognized Expert Moderator MVP
You're not referring to Editor2 in your code. You've used the global variable editor1 within the function.
Nov 7 '07 #5
T0mm0
12 New Member
To simplify my code... see below. OnInitialized and OnChanged events fire only on the first initialization and viewing of Editor1. They never fire for Editor2 or for subsequent changes on Editor1 after having gone to wizardstep2.

Expand|Select|Wrap|Line Numbers
  1. <script type="text/javascript" language="javascript">
  2.  
  3. function CuteEditor_OnChange(editor)
  4. alert("OnChange")
  5. }
  6.  
  7. function CuteEditor_OnInitialized(editor)
  8. {
  9. alert("OnInitialized")
  10. }
  11. </script>
Nov 7 '07 #6
acoder
16,027 Recognized Expert Moderator MVP
Can you show the client-side code (how it turns out in the browser) for Editor2?
Nov 7 '07 #7
T0mm0
12 New Member
They're quite long... too long that it's not letting me post it... let me think of another way to put it up
Nov 7 '07 #8
T0mm0
12 New Member
view source on each of these...

Wizard Step 1

Wizard Step 2
Nov 7 '07 #9
acoder
16,027 Recognized Expert Moderator MVP
The second link doesn't work.

I noticed that the code includes a script:[HTML]<script src="/ShoptalkProduct ion/CuteSoft_Client/CuteEditor/Load.ashx?type= scripts&amp;fil e=IE_Loader">[/HTML] This may contain the code which attaches the initialize and change events.
Nov 8 '07 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

2
2702
by: Harry Simpson | last post by:
My boss is an ol' Microsoft Script Control 1.0 script guru. So when we needed to calculate fees he wanted to use the Script Control interopted to feed in a script (VBS) along with "objects" and then just run it to calc all the fees and save them into a datatable. Of course when i run the following I get an error: Private Sub CalculateTheQuote() Dim results As String Dim obj As New MSScriptControl.ScriptControlClass
4
3140
by: ..::M:O:R:B:I:L:L:O::.. | last post by:
hi to all ... i need to execute a string script in my vb.net project, Is there a way to do it ? the Ms Script Control is a com abject.. is there one for dot net? thanks Reguards
3
4545
by: VladimirT | last post by:
in vba is used windows script control 1.0 for molded got from txtFunction as possible do this in vb.net? thank you I have written code but he does not work Function FunctionEval(ByVal X As Double) As Double ScriptControl.ExecuteStatement("X=" & X)
4
1534
by: AB | last post by:
Hi All, I would like to add controls that stored in DB dynamically, and I don't know their names or their number. The names of the controls is important therefore I can't create cmbArr(0), cmbArr(1),and so on. The importance of the control array is because I need to use events such as MouseDown, MouseClick for all the controls in order to resize and change their location in runtime. Anyone know if it is possible? (Using control array...
6
2061
by: Douglas J. Badin | last post by:
Earlier this month, there was a posting about this without a definitive answer. If you place a Wizard inside a FormView's EditItemTemplate the bound fields contained within the View will display the data from the fields to which they are bound; yet they will return null values when the 'Update' LinkButton is clicked. The responder thought this might have something to do with naming containers. If so, this is similar to an issue in...
1
1486
by: prabhuene | last post by:
Hi, i am new to using microsoft script control. I am trying a execute a code in a text file for example Private function test1() result1 = temperature(100+200)
4
2574
by: steve waugh | last post by:
Hi I m using asp:wizard contol in my application . i m using Javascript for calculation, the problem is when i perform the calculation and move to next step the calculated value of previous step got destroyed.. but i want to retain the values through out wizard. Plz help, Its very urgent... Thx in advance
3
1192
by: =?Utf-8?B?bWFyaw==?= | last post by:
I asked this question in another newsgroup but I didn't get a complete answer. I have a web page served by an IP Camera. The web page has a java control that shows the image. I want to work with that image locally (do some recognition stuff). I know a representation of that image is on my computer because it shows up in a web browser control and it persists after disconnecting the network. I admit it is pretty unconventional and...
0
972
by: =?Utf-8?B?TWFya19C?= | last post by:
I have a webbrowser that loads a page and displays a java control. It works great on this machine but when I run the application on another machine it fails to load. I am able to open the page and view the Java control in IE on that machine. I seen some stuff on setting JAVA_PLUGIN_WEBCONTROL_ENABLE. But I am unsure of how to set environment variables in my application. Can anyone give me some directions (My skills are limited to the...
3
1642
by: Derek Hart | last post by:
I am using the Microsoft Script Control on a VB.Net winforms form, and I use it to evaluate text based calculations that come from a database. For example, it evaluates "1+1" or "True And False Or True". It does that with code that looks like the following: If myForm.fScriptControl.ScriptControl1.Eval("1+1") = 2 Then Return True I now need this type of functionality to be used in web services, and I cannot figure out how to use this...
0
7854
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8219
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8349
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7978
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
5722
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5395
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2364
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
1455
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1192
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.