|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Combining ASP and Javascrip
Is it possible to put this ASP code in a JS function?
<% If Request("submitted") Then Dim Item For Each Item In Request.Form("Photog_ID") sql= "INSERT INTO Photog_Agency_Link VALUES ("&Item&", "&Agency_ID&", 1);" cn.Execute (sql) Next end if %> As I need to combine the above with: function RedirectOpen(value1) { window.opener.location.href = 'photog_list.asp?Agency_ID=' + value1 this.close() } Then I can put the whole thing in the onclick of my submit button? Thank you so much! |
|
#2
|
|||
|
|||
ok, ended up doing it like this:<% If Request.Form("submitted") Then Dim Item For Each Item In Request.Form("Agency_ID") sql= "INSERT INTO Photog_Agency_Link VALUES ("&Photog_ID&", "&Item&", 1);" cn.Execute (sql) Next %> <script> window.opener.location.replace(window.opener.locat ion); self.close(); </script> <% end if |
![]() |
| Viewing: Dev Articles Community Forums > Programming > JavaScript Development > Combining ASP and Javascrip |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|