Jump to content
Sign in to follow this  
JoennAquilino

Edit The Concatenated

Recommended Posts

Hi!

 

I'm trying to figure out what's wrong this code(http://forums.caspio.com/index.php/topic/3200-js-concatenatecombine-two-fields-into-one-field/) when editing data. I'm not going anywhere. Is there another way to edit a concatenated table field? Or maybe, is there a way to combine two fields and edit certain table field when submitted?

 

Thank you.

 

EDIT

 

Oh, I made it work. Thanks.

Share this post


Link to post
Share on other sites

So in the edit page you need to add the same code with the changes mentioned

<SCRIPT LANGUAGE="JavaScript">

function concatenate()
{
var position1 = document.getElementById("EditRecordPosition1").value;
var position2 = document.getElementById("EditRecordPosition2").value;

var allpositions = position1 + position2;

document.getElementById("EditRecordAllPositions").value = allpositions;

}

document.getElementById("caspioform").onsubmit=concatenate;
</SCRIPT>

Share this post


Link to post
Share on other sites

I've tried that one actually but still didn't work. :) I tried this one...

<SCRIPT LANGUAGE="JavaScript">

function concatenate()
{
var field1= document.getElementById("EditRecordField1").value;
var field2= document.getElementById("EditRecordField2").value;
var allfield= field1+field2;
document.getElementById("EditRecordAllField").value = allfield;
}

var v_btn = document.getElementById("Mod0EditRecord");
        if(v_btn.addEventListener){
v_btn.addEventListener('mouseover', concatenate);
}else if(v_btn.attachEvent){
v_btn.attachEvent('onmouseover', concatenate);
}else{
var prevEvt = v_btn.onmouseover
v_btn.onmouseover= function(){
concatenate();
prevEvt && prevEvt();
};
}
</SCRIPT>

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...