Solved

onClick="changeAction('  Script missng and needed

Posted on 2009-07-05
2
226 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Today I would like to talk about localizing (Internationalization) JavaScript applications. Introduction When creating an application that is going to be used by many people around the globe, it is important to remember that not everyone speak…
When you need to keep track of a simple list of numbers or strings, the Array object is your most direct tool.  As we saw in my earlier EE Article (http://www.experts-exchange.com/A_3488.html), typical array handling might look like this: (CODE) B…
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…

760 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now