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

Java script problem while using Asp:Wizard Control

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 4670
r035198x
13,262 8TB
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 Expert Mod 8TB
Can you post some code that we can look at?
Oct 30 '07 #3
T0mm0
12
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="CuteEditor" Namespace="CuteEditor" TagPrefix="CE" %>

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

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form runat="server">
<asp:Wizard ID="Wizard1" runat="server">
<WizardSteps>
<asp:WizardStep ID="WizardStep1" runat="server" Title="Step 1">
<CE:Editor ID="Editor1" runat="server">
</CE:Editor>
</asp:WizardStep>
<asp:WizardStep 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="javascript">
[/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 Expert Mod 8TB
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
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 Expert Mod 8TB
Can you show the client-side code (how it turns out in the browser) for Editor2?
Nov 7 '07 #7
T0mm0
12
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
view source on each of these...

Wizard Step 1

Wizard Step 2
Nov 7 '07 #9
acoder
16,027 Expert Mod 8TB
The second link doesn't work.

I noticed that the code includes a script:[HTML]<script src="/ShoptalkProduction/CuteSoft_Client/CuteEditor/Load.ashx?type=scripts&amp;file=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
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...
4
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
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...
4
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),...
6
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...
1
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
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...
3
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...
0
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...
3
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...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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...

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.