ASP events and Initialization of variables on ASP pages 
Author Message
 ASP events and Initialization of variables on ASP pages

Hi,

I'm trying to initialize a couple of edit boxes on my ASP pages to certain
values in the "thisPage.onenter" event. The annoying thing is that this
event is executed again when the user clicks the OK button, and thus
re-initializing the edit boxes and thus losing any changes from the server.

I have looked everywhere in the help file to find another event which I
could use, but can't find a list of events. Does anybody know how I can
solve this problem??

Thanks,
Radboud.



Sat, 17 Mar 2001 03:00:00 GMT  
 ASP events and Initialization of variables on ASP pages
Please include your code as I am not sure what you are trying to do.
Instead of using 'thisPage.onenter' use windows.onload:

<script>

function window.onload() {
frmMyForm.cmbMyComboBox.value = <%= myASPvariable%>

Quote:
}

</script>

OR

<input type="text" value="<%= myASPvariable%>">


Quote:
>Hi,

>I'm trying to initialize a couple of edit boxes on my ASP pages to certain
>values in the "thisPage.onenter" event. The annoying thing is that this
>event is executed again when the user clicks the OK button, and thus
>re-initializing the edit boxes and thus losing any changes from the server.

>I have looked everywhere in the help file to find another event which I
>could use, but can't find a list of events. Does anybody know how I can
>solve this problem??

>Thanks,
>Radboud.



Sat, 17 Mar 2001 03:00:00 GMT  
 ASP events and Initialization of variables on ASP pages
You might try doing an if...then statement that tests against one of the
edit boxes.  If the contents aren't empty, display something else.  it
they are empty, display the box.

Just a thought that has worked for me.

Ben Adams

Quote:

> Hi,

> I'm trying to initialize a couple of edit boxes on my ASP pages to certain
> values in the "thisPage.onenter" event. The annoying thing is that this
> event is executed again when the user clicks the OK button, and thus
> re-initializing the edit boxes and thus losing any changes from the server.

> I have looked everywhere in the help file to find another event which I
> could use, but can't find a list of events. Does anybody know how I can
> solve this problem??

> Thanks,
> Radboud.



Mon, 19 Mar 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. New article on porting ASP pages to ASP .NET available on MSDN

2. Cannot run ASP pages anymore - COM+ and ASP error

3. ObjectContext vs. Passing ASP objects from ASP page

4. Asp - How to pass variables to another page?

5. Passing Variables between ASP pages

6. Variables NOT Clearing in an ASP Page

7. Intercepting User Defined Event fired from dll in ASP page

8. ActiveX control event not working when in asp.net page

9. Need help with ASP initialization..

10. calling asp page from another asp page

11. ASP Session variables on VBScript event-fire routines

12. COM events in ASP page?

 

 
Powered by phpBB® Forum Software