JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old May 30th, 2004, 04:47 PM
gbaia gbaia is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 24 gbaia User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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!

Reply With Quote
  #2  
Old May 31st, 2004, 02:40 PM
gbaia gbaia is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 24 gbaia User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Smile Please ignore! Problem solved :-)

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

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJavaScript Development > Combining ASP and Javascrip


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT