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. |
 |
 |
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. |
 |
 |
|