CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 After Insert run JavaScript

Print topic Send  topic

Author Message
smalloy

Posts: 107
Posted: 07/13/2005, 2:33 PM

After I insert a record I'd like to run a JavaScript function. I've experimented with many differing methods but can't quite come up with a solution.

My best geuss is to create a lable then set its content to HTML and After Insert do this:

vw_Contacts.lblJava.Value = "<script language=""Javascript"">function doneupdate(){ CloseWin();}</script>"

Alas, it doesn't work.

Any assistance is very appreciated!

PS, if you chosse to run the javascript in the onclick event of a button (i.e. the Add Button), the javascript fires and since it contains a closewindow, teh record is never inserted.
_________________
Anything can be done, just give me time and money.
View profile  Send private message
Tuong Do
Posted: 07/13/2005, 5:48 PM

If you want to close the window after the insert then the best option is to
have a separate page with the java script to close the window onload, then
after the insert check if there is an error, if there is no error then
redirect your page to the above self closing page.


"smalloy" <smalloy@forum.codecharge> wrote in message
news:642d588c7bd002@news.codecharge.com...
> After I insert a record I'd like to run a JavaScript function. I've
> experimented
> with many differing methods but can't quite come up with a solution.
>
> My best geuss is to create a lable then set its content to HTML and After
> Insert do this:
>
>
vw_Contacts.lblJava.Value = "<script   
> language=""Javascript"">function  
> doneupdate(){ CloseWin();}</script>"
>
> Alas, it doesn't work.
>
> Any assistance is very appreciated!
>
> PS, if you chosse to run the javascript in the onclick event of a button
> (i.e.
> the Add Button), the javascript fires and since it contains a closewindow,
> teh
> record is never inserted.
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
>

smalloy

Posts: 107
Posted: 07/14/2005, 8:30 AM

Ahh, I see, works exactly as I wanted!

Thank you.
_________________
Anything can be done, just give me time and money.
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.