close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues


Ecart6 - Same As Billing to Shipping

Thread began 12/31/2020 12:31 pm by MAURIANS | Last modified 12/31/2020 2:14 pm by Ray Borduin | 101 views | 2 replies |


Ecart6 - Same As Billing to Shipping

Checkout page is created for paypal payment options only.

I searched forums for "SAME AS" feature to customize Checkout pages but not seeing anything for Ecart... would like to have this auto fill inputs when checkbox is checked via login SESSION binded to RECORDSET to populate.

I already have SESSION & RECORDSET created on page but not able to get SAME AS to work.

Sign in to reply to this post

Ray BorduinWebAssist

The eCart should create a script file: WA_SameAs.js

That file has a function:
setSame(check, tofieldset, fromfieldset)

It depends on the tofieldset form element ID values to match the fromfieldset with "_2" appended.

An example would be:

<fieldset id="shipping">
<input id="first">
<label>billing same as shipping <input type="checkbox" id="same" onclick="setSame(this, 'billing', 'shipping')"></label>
<fieldset id="billing">
<input id="first_2">


function wa_fireEvent(element,event){
if (document.createEventObject){
// dispatch for IE
var evt = document.createEventObject();
return element.fireEvent('on'+event,evt)
// dispatch for firefox + others
var evt = document.createEvent("HTMLEvents");
evt.initEvent(event, true, true ); // event type,bubbling,cancelable
return !element.dispatchEvent(evt);
function findIndexFromID(id, fromfieldset) {
var theSourceFieldset = document.getElementById(fromfieldset);
var theSourceInputs = theSourceFieldset.getElementsByTagName("select");
for (var y=0; y<theSourceInputs.length; y++) {
if (stripEnum(theSourceInputs[y].id,fromfieldset) == id) {
return theSourceInputs[y].selectedIndex;
return 0;

function findFieldValueFromID(id, fromfieldset) {
var theSourceFieldset = document.getElementById(fromfieldset);
var theSourceInputs = theSourceFieldset.getElementsByTagName("input");
for (var y=0; y<theSourceInputs.length; y++) {
if (theSourceInputs[y].id == id) {
return theSourceInputs[y].value;
return false;

function stripEnum(theID,theStart) {
var retID = theID;
if (theID.indexOf(theStart)==0) {
retID = retID.substring(theStart.length);
if (\d*$/)>0) {
retID = retID.substring(0,retID.lastIndexOf("_"));
return retID;

function setSame(check, tofieldset, fromfieldset) {
if (check.checked) {
var theDestinationFieldset = document.getElementById(tofieldset);
var theDestinationInputs = theDestinationFieldset.getElementsByTagName("input");
var theDestinationSelects = theDestinationFieldset.getElementsByTagName("select");
for (var x=0; x<theDestinationSelects.length; x++) {
theDestinationSelects[x].selectedIndex = findIndexFromID(stripEnum(theDestinationSelects[x].id,tofieldset), fromfieldset);
if (window.CountryChange && theDestinationSelects[x].id == "Country_2") CountryChange("_2");
for (var x=0; x<theDestinationInputs.length; x++) {
if (theDestinationInputs[x].type == "text") {
theDestinationInputs[x].value = findFieldValueFromID(stripEnum(theDestinationInputs[x].id,tofieldset), fromfieldset);

If you find the WA_SameAs.js file, then you don't need to include the <script> tag in the above example... all of those functions are defined in that file.

Sign in to reply to this post
Did this help? Tips are appreciated...


Thanks I will check file...

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...