Solved

onClick="changeAction('  Script missng and needed

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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

In Part 1 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
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…

730 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