Solved

onClick="changeAction('  Script missng and needed

Posted on 2009-07-05
2
228 Views
Last Modified: 2012-05-07
I've been running this site for years with this page working fine.  I updated IE to 8 and now if shows a warning on this line.  I searched for the changeadction funtion and it's not there.  The problem is the form name is the shopping cart which is dynamic.  Any suggestions on how to add the funtion and make the warning go away?
<form action="<%=cStr(Request.ServerVariables("SCRIPT_NAME"))%><%=WA_eCart_IIf((Request.ServerVariables("QUERY_STRING") <> ""), "?" & Request.ServerVariables("QUERY_STRING"), "")%>" method="post" name="eCart_1_ATC_<%=product_details.Fields("Product_ID").value%>" class="formstyle" id="eCart_1_ATC_<%=product_details.Fields("Product_ID").value%>">
 
<input type="image" src="Elements/addtoregistry.gif" border="0" value="Add To Cart" name="registry_1_ATC" onClick="changeAction('<%=cStr(Request.ServerVariables("SCRIPT_NAME"))%><%=WA_eCart_IIf((Request.ServerVariables("QUERY_STRING") <> ""), "?" & Request.ServerVariables("QUERY_STRING"), "")%>');" alt="Add to Registry">

Open in new window

0
Comment
Question by:stroudtx
2 Comments
 
LVL 10

Accepted Solution

by:
bugada earned 500 total points
ID: 24783415
You can substitute the changeAction with this.form.action = ...
<input type="image" src="Elements/addtoregistry.gif" border="0" value="Add To Cart" name="registry_1_ATC" onClick="this.form.action='<%=cStr(Request.ServerVariables("SCRIPT_NAME"))%><%=WA_eCart_IIf((Request.ServerVariables("QUERY_STRING") <> ""), "?" & Request.ServerVariables("QUERY_STRING"), "")%>';" alt="Add to Registry">

Open in new window

0
 

Author Closing Comment

by:stroudtx
ID: 31600018
Thank you!! Perfect!
0

Featured Post

ScreenConnect 6.0 Free Trial

Discover new time-saving features in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses how to create an extensible mechanism for linked drop downs.
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question